resizable window + GDI Drawing.

Archives Forums/Win32 Discussion/resizable window + GDI Drawing.

DredPirateRoberts(Posted 2004) [#1]
heres a c file that opens a window and lets you draw to it and access the pixels without going thru opengl, only windows native stuff.



Here are the extern things to add to your code
Extern
Function GfxInit()
Function WinCreate( x, y, width, height, title$z )
Function WinSetColor ( r, g, b )
Function WinSetTextColor ( r, g, b )
Function WinRect ( x, y, width, height, solid )
Function WinFlip()
Function WinCls(x,y,x2,y2)
Function WinSetFont ( fname$z )
Function WinText ( x, y, msg$z, centerx, centery )
Function WinLine ( x1, y1, x2, y2 )
Function WinDrawPixmap ( src:byte ptr, x, y, w, h, p, format )
Function WinMouseX()
Function WinMouseY()
Function WinMouseDown(num)
Function WinPoll()
Function WinSetUpdateRect ( ix1, iy1, ix2, iy2 )
Function WinEvent()
Function WinIsQuit()
Function WinGetWidth()
Function WinGetHeight()
End Extern


just Import"win32.c" ( first file )

then include the Externs in your code.

Also bmax images seem to be mode 6 ( for mac i think )
the draw image routine flips the bytes around right for PC's