View previous topic :: View next topic |
Author |
Message |
tim
Joined: 24 Jul 2005 Posts: 26
|
Posted: Mon Jul 25, 2005 11:03 am Post subject: DFL wiki |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Jul 25, 2005 12:43 pm Post subject: Re: DFL wiki |
|
|
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 |
|
Back to top |
|
|
|
|
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
|