Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problem with controls in the window, please help!!!!!

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?


Comments

Sign In or Register to comment.