Hola, I created a Listbox showing normal in my window, I can add strings to it and so on... everything looks quite normal, but when I click on another application or drag my window the listbox gets invisible (tho it's still there when I click on the listitems). Same as for the ComboBox style... Can someone tell me what I forgot? How does the Listbox update itself when moving or minimizing and such? TIA, JimmyClif
Posted on 2001-01-14 10:13:00 by JimmyClif
Check your CreateWindowEx line again.
  • Did you include WS_CHILD style? WS_CHILD and WS_POPUP cannot coexist.
  • Check the handle to the parent window and the child window ID
Posted on 2001-01-14 11:06:00 by Iczelion
I solved the problem... but the answer was WM_PAINT - At the beginning I had something in WM_PAINT but later I removed it leaving the .IF uMsg==WM_PAINT idle... Only after deleting it - it started working as it should be... Why was Windows angry at me leaving WM_PAINT idle? There was no ret or anything... usually it should have ignored it, true?
Posted on 2001-01-14 13:13:00 by JimmyClif
No, Windows doesn't ignore it. Because you deleted it, the WM_PAINT message is now handled by DefWindowProc. What does it do? It calls BeginPaint and EndPaint.
Posted on 2001-01-15 17:16:00 by tank