FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFL wiki

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
tim



Joined: 24 Jul 2005
Posts: 26

PostPosted: Mon Jul 25, 2005 11:03 am    Post subject: DFL wiki Reply with quote

After hours of experimentation, I finally understood how you paint correctly in Windows and discovered that by default, DFL::Control instances do not have CS_HREDRAW and CS_VREDRAW in their WNDCLASS style.

I wanted to draw an edge around my window using DrawEdge, but the clipping rectangle that is set when you call BeginPaint when you handle WM_PAINT prevented the background from being erased when resizing occured - and when the window became bigger, the old edge was still visible inside its client area.

Then I discovered resizeRedraw, passed true to it and *oh joy* it fired a WM_PAINT messages with the whole client area as the update region when the window was resized.

Is that correct? Can I add a little description to the wiki so other Win32-newbies don't stumble upon the same obstacles as I do?

BTW, it's great fun to work with DFL! You get to know the Win32 API and the D programming language at the same time! Then, when you are asked to program a C++ program using the Win32 API next time, you're already well prepared.

C++ really slows you down (keeping header files and implementation files in sync, compile times and such), but D is an excellent language to explore an API.

Keep up the excellent work, Chris!
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Jul 25, 2005 12:43 pm    Post subject: Re: DFL wiki Reply with quote

tim wrote:
Is that correct? Can I add a little description to the wiki so other Win32-newbies don't stumble upon the same obstacles as I do?

Yes, that is correct. Go ahead, anyone is welcome to add to the wiki.
You can see existing pages on http://wiki.dprogramming.com/DflDoc/PageList to see how they're formatted, but you don't have to follow them; someone else can easily go back and fix up posts.

Quote:
Keep up the excellent work, Chris!

Thanks Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group