I've encountered a strange visual glitch when I attempt to enlarge a window with a property sheet in it. Somehow a white space appears at the bottom. Can anyone suggest what that is? (Screen shot attached)
I am using MFC, CPropertySheet and CPropertyPage classes. This property page is a modeless child window of the dialog.
I am not very sure what the problem may be since I use Windows 2000 SP4. However as far my guess goes the History property page height is less than that of Favorites property page.
Last edited by MrBeans; May 5th, 2006 at 05:15 AM.
U are getting this problem because the default sizes are different !!!
Simple solution -> on the Redraw message, do GetDlgItem in a loop, and for ever item do Item->MoveWindow(pos). this way ur form will always be dynamic and will always keep the same aspect ratios as u want ..
If you found my reply to be useful, please dont hesitate to rate it.
DO NOT kick the Axe if it doesnt fall on your foot.
U are getting this problem because the default sizes are different !!!
What do you mean? How can I change this default size?
I did some research and it looks like the problem is in XP's Themes. I did not mention but this dialog is resizable and I am using GetDlgItem and MoveWindow to resize all controls inside.
I know it looks like that white margin is actually unresized window, but it is not. (I checked it with WinID.) The dialog inside tab control is actually stretching all the way down. This is simply a visual theme. If you remove manifest from the file the problem goes away.
I never dealt with those themes. If you look at the screenshot the size of "drawn" part of the page is actually 600 pixels. Strange. Almost like a default value for something. I also tried creating another tall static property sheet and the same visual glitch happens there.
Yes, that's a known issue with the visual themes of Windows XP.
The problem is that the standard theme for a property page contains some kind of gradient texture. This gradient texture has a fixed size and when you property page is bigger than this fixed gradient texture size, the gradient texture will be tiled and that's what you're seeing.
Well, that "known issue" was a real pain in the ***. I spent two days on something that should 've taken two hours, but.... I was able to find a solution. Check attached sample & code.
In a nutshell, I disabled themes and processed OnCtlColor for each page. Before that I prepared a brush that is a screenshot of a tab control's background, which for some reason doesn't have this size limitation. As you can see, it works (in case someone else stumbles upon it too).
I should add one thing though. This method works for a static property sheet (that is nonresizable). If it is resizable one should make a really large background brush the size of a desktop window. It could be done by first enlarging a tab control to a size of a maximized window.
And one last thing. To make this code operational on machines prior to Windows XP one should compile it without static linking to "UxTheme.lib" by loading the "UxTheme.dll" dynamically.
i have the same problem
but your code examples making me (compiled with vs2005) absolutely diffrent output - all ok for first one, all background black for second one
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.