Resizing the Property Sheet
Posted
by Zafir Anjum
on August 6th, 1998
CRect rectWnd; GetWindowRect(rectWnd); SetWindowPos(NULL, 0, 0, rectWnd.Width() + 100, rectWnd.Height(), SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
One of the effects of resizing the property sheet is that the standard buttons get left behind in an aesthetically undesirable position. Its usually a good idea to follow the resize of the property sheet with a move of the standard buttons. Assuming that the Cancel, OK and Apply buttons are visible, code below moves them 100 pixels to the right to match the increase in width of the property sheet.
int ids[] = { IDOK, IDCANCEL, ID_APPLY_NOW };
for( int i =0; i < sizeof(ids)/sizeof(ids[0]); i++)
{
GetDlgItem(ids[i])->GetWindowRect(rectWnd);
ScreenToClient(rectWnd);
rectWnd.right += 100;
rectWnd.left += 100;
GetDlgItem(ids[i])->MoveWindow(rectWnd);
}

Comments
PropertyPages and the Tab
Posted by AliRafiee on 01/14/2009 11:13amWhat about the Tab control and the PropertyPages?
Replyweird property sheet
Posted by Legacy on 04/20/2000 12:00amOriginally posted by: vincenzo
i have a problem , i am writing a sdi application with a dialogbar , in this dialog i embedded a property sheet , but it remains horizontal fixed , i have tried anything , but no way it remains always fixed at 300 pixel , why ?
Replyif anyone can help me i would REALLY gratefull to him
Resizing the property sheet dynamically (like resizing a window) at run time -works great!
Posted by Legacy on 02/16/1999 12:00amOriginally posted by: Syed Hameed
ReplyProperty Sheet Resizable By User
Posted by Legacy on 02/11/1999 12:00amOriginally posted by: Ernesto Perales
Replyhow to resize a property sheet dynamically just like resizing a application window?
Posted by Legacy on 01/15/1999 12:00amOriginally posted by: Ye Hai Bei
can you upload the code for derived class and demo project that meet my need. i think it is better for my digest.
Replythank you.