Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3670
Number of posts: 9122

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem with controls in the window, please help!!!!! Posted by edocecrous on 7 Nov 2002 at 7:37 AM
Hi!

- My program handles the WM_ERASEBKGND message in the window callback procedure, to paint the background of the window. /It puts out a BMP picture/
- In the WinMain, i also put out a couple controls, like buttons, edit boxes, etc.

The problem:When the controls are drawn to the screen, WM_ERASEBKGND gets called, and erases the controls. Also, when the window is minimized, then restored, the controls are not viewable. What a heck i'm doing wrong?
/I alo tried to filter out the WM_ERASEBKGND messages sent to clear the background of the controls, and in those cases i called the DefWindowProc. In that case initially the controls are viewable, but i still have the same problem upon minimizing-restoreing the window, the controls are erased (not erased, just not painted. If you click on them, they reappear.)/

Edocecrous

ps.:So what the heck is responsible for repainting the controls?


Report
Re: ...where the heck some code?.. Posted by AsmGuru62 on 7 Nov 2002 at 7:46 AM

Report
Re: ...where the heck some code?.. Posted by pingpong on 7 Nov 2002 at 10:01 AM
Try adding WS_CLIPCHILDREN in your main window styles.
Report
Re: ...where the heck some code?.. Posted by edocecrous on 8 Nov 2002 at 8:17 AM
It lives, IT LIVES!!!!!
Thanks, you are the best... ...I was wasting time for 3 days because of this stupid error. It's always like this. I'm writing a 32bit disassembler in assembly, and so on... ...and i sometimes can't find a stupid mistake. When you look at your code the 1000x times, it's hard to find an error you made at line 3.

Thanx again!

Edocecrous

ps.:Do you happen to know, how could i get access to a DirectX program's secondary surfaces? /The specific case is, i'd like to take a peek at the game, Diablo's (the first one, writen in DX3) secondary surfaces.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.