Problem with controls in the window, please help!!!!! - Programmers Heaven

Howdy, Stranger!

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

Categories

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

  • AsmGuru62AsmGuru62 Posts: 6,519Member
  • pingpongpingpong Posts: 937Member
    Try adding WS_CLIPCHILDREN in your main window styles.
  • edocecrousedocecrous Posts: 49Member
    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.

Sign In or Register to comment.