Page 1 of 1

how to use win32 control in edgelib

PostPosted: Nov 27, 2008 @ 4:32am
by sunfred

PostPosted: Dec 1, 2008 @ 9:07am
by edge

PostPosted: Dec 4, 2008 @ 6:18am
by sunfred
hi edge,
Thank you for your help!
And yes, I did create the windows with WS_CHILD flag.But I couldn't capture the message I need by using your code.Maybe there is something wrong with my codes, i'll check them later.
Still I have a question about SHOWING a windows control in edgelib (surface).I successfully create a button in OnDisplayInit(), but how could I show it in edgelib surface?

Thanks!

PostPosted: Dec 4, 2008 @ 10:28am
by edge
Hi Sunfred,

The best way is to use the GDI display mode. In OnDisplayConfig set the config->openmethod to DOM_GDI. The button should be drawn over your EDGELIB surface.

PostPosted: Dec 9, 2008 @ 8:52am
by sunfred
Hi edge,
Unfortuantly, it does't seem to work even I set "config->openmethod = DOM_GDI".
The button has been created successfully and can response click action within it's rect.But it's black!When I click within the area, it changes to white.
Maybe I should draw controls myself.

Thanks for your help!

PostPosted: Dec 9, 2008 @ 4:18pm
by edge
Hi Sunfred,

I suggest drawing the controls yourself.

Another (more complicated) method is to show the backbuffer manually. This requires several calls to SetFlipRect and Flip to 'draw the backbuffer around your control'.