Drawing only happens when the window receives a WM_PAINT event. WinXUpdate is
responsible for sending that event.
Long story short, while your loop is running, the Windows event loop is not.
If the event loop is not running, the WM_PAINT event does not get dispatched,
and nothing gets drawn.
I think WinX is the wrong tool for the job here. If you're drawing in a loop
you probably want SDL or OpenGL. OpenGL can be set up for 2D graphics, and it
is good for lines and shapes. SDL just gives you a framebuffer, which is good
for bitmaps. There are XBlite bindings for both libraries, and there should
be a few examples lurking around too.
example:
CASE $$Menu_File_EditFile :
mydc=GetDC(hWnd)
SetPixel(mydc,pointX-xCurrentScroll,pointY-yCurrentScroll,0xFFFFFF)
ReleaseDC(hWnd,mydc)
' and also.....
hdc=BeginPaint(hWnd,&ps)
hdcMem=CreateCompatibleDC(hdc)
SelectObject(hdcMem,hBmp)
SetPixel(hdcMem,pointX,pointY,0xFFFFFF)
BitBlt(mydc,0,0,bmp.width,bmp.height,hdcMem,0,0,$$SRCCOPY)
DeleteDC(hdcMem)
EndPaint(hWnd,&ps)
2012/2/10 Callum Lowcay <cal...@callumscode.com>:
--
You received this message because you are subscribed to the Google Groups "xblite" group.
To post to this group, send email to xbl...@googlegroups.com.
To unsubscribe from this group, send email to xblite+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xblite?hl=en.