links
October 14th, 2008, 10:40 AM
I'm trying to write a simple application with a dialog as main window containing one tab control with two tabs.
After struggling with the tab control I figured there must be an easier way and found Property sheets on MSDN. While they work great they don't seem to be all that flexible (e.g looks like you are stuck with the OK and Cancel buttons).
So I'm back to plain tabs. The property sheet concept did give me some ideas on how to handle multiple tabs, which is great since my previous approach was driving me insane. So I'm trying to mimick some property sheet functionality in my application.
1.PNG is what I now have and it is also what it should look like all the time. It consists of a modeless dialog box. The "Close"-button and the tab control are children of the dialog box. I have another dialog box (I used the PROPPAGE_LARGE for this) on which I put the static control and progress bar. I am however encountering some painting (that is what it looks like to me) issues. 2.PNG occurs sometimes when another window is opened which overlaps my dialog window. When I move my mouse around in the client area and over the controls the tabs and Close-button appear as in 3.PNG.
While trying to figure out whats wrong I noticed that when I call UpdateWindow(handle to PROPPAGE) after I created all my controls, the controls on the PROPPAGE dialog disappear as seen in 4 UpdateWnd.PNG.
Now I'm stuck. The only thing I can think of is that it is a paint issue or some window relationship thing which I have no idea how to resolve. Anyone have any ideas please?
After struggling with the tab control I figured there must be an easier way and found Property sheets on MSDN. While they work great they don't seem to be all that flexible (e.g looks like you are stuck with the OK and Cancel buttons).
So I'm back to plain tabs. The property sheet concept did give me some ideas on how to handle multiple tabs, which is great since my previous approach was driving me insane. So I'm trying to mimick some property sheet functionality in my application.
1.PNG is what I now have and it is also what it should look like all the time. It consists of a modeless dialog box. The "Close"-button and the tab control are children of the dialog box. I have another dialog box (I used the PROPPAGE_LARGE for this) on which I put the static control and progress bar. I am however encountering some painting (that is what it looks like to me) issues. 2.PNG occurs sometimes when another window is opened which overlaps my dialog window. When I move my mouse around in the client area and over the controls the tabs and Close-button appear as in 3.PNG.
While trying to figure out whats wrong I noticed that when I call UpdateWindow(handle to PROPPAGE) after I created all my controls, the controls on the PROPPAGE dialog disappear as seen in 4 UpdateWnd.PNG.
Now I'm stuck. The only thing I can think of is that it is a paint issue or some window relationship thing which I have no idea how to resolve. Anyone have any ideas please?