1
votes

I am using resources with Win32 to create a dialog containing a single tab control. The tab works fine when changing tabs but somehow dragging the window off screen ( eg. dragging it past bottom of screen then back up ) will cause the tab contents to disappear. I think it may be a problem with how I've set the clipping properties but after much fiddling I still didn't get it working exactly how I expect.

I have uploaded a basic skeleton project here which has the bare minimum required to reproduce this problem and would be very grateful if someone could check it out.

http://localhostr.com/file/nPTbTTQ/skeleton.rar

1
does it have the same refresh problem if you drag another window over your app? It sounds like our app isn't handling WM_PAINT messages correctly. In Win32, the windows don't remember what's been drawn on them. Instead, any time a portion (or all) of your window becomes invalidated, like when you drag it off the screen, win32 will send WM_PAINT and ask the app to redraw. Usually if you just have controls, each one will redraw itself, but maybe something in your code intercepts WM_PAINT so it doesn't get to the right controls? Just guesses, didn't have time to look at your codeDXM

1 Answers

1
votes

It is a Z-order problem, the dialog is behind the tab control. Change the parent of the inner dialog from hwndDlg to hwndTab. I don't want to guess why you saw the static control text at all.