Click here to Skip to main content
16,006,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRE: only a suggestion... Pin
Joan M24-Apr-03 3:18
professionalJoan M24-Apr-03 3:18 
GeneralYes! That's exactly what I want! Thanks! Pin
kydfru24-Apr-03 3:42
kydfru24-Apr-03 3:42 
GeneralWSNMP32.DLL Pin
David Cunningham24-Apr-03 2:56
cofounderDavid Cunningham24-Apr-03 2:56 
GeneralRe: WSNMP32.DLL Pin
obmit24-Apr-03 5:01
obmit24-Apr-03 5:01 
GeneralUNZDLL.DLL Pin
Dave_24-Apr-03 2:47
Dave_24-Apr-03 2:47 
GeneralRe: UNZDLL.DLL Pin
Brian Delahunty24-Apr-03 3:37
Brian Delahunty24-Apr-03 3:37 
QuestionHow can I change a propertysheet' size Pin
Member 25731524-Apr-03 2:45
Member 25731524-Apr-03 2:45 
AnswerRe: How can I change a propertysheet' size Pin
Joan M24-Apr-03 3:15
professionalJoan M24-Apr-03 3:15 
you have to handle the WM_SIZE message of the property sheet parent.

There you have to do:
<br />
void CDialogThatresizesThePS::OnSize(UINT nType, int cx, int cy) <br />
{<br />
  CDialog::OnSize(nType, cx, cy);<br />
<br />
  ResizePS(this->m_rectPS);<br />
  ResizeTabCtrl(this->m_rectPS);<br />
  ResizeActivePage();<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizePS(CRect rectPS)<br />
{<br />
  this->m_PS->SetWindowPos(NULL, rectPS.left, rectPS.top, rectPS.Width(), rectPS.Height(), SWP_NOZORDER | SWP_NOACTIVATE);<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeTabCtrl(CRect rectTabCtrl)<br />
{<br />
  CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
  if (pTabCtrl != NULL)<br />
  {<br />
	pTabCtrl->ModifyStyle(0, TCS_MULTILINE);<br />
<br />
	pTabCtrl->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 6, rectTabCtrl.Height() - 10, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
  }<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeActivePage()<br />
{<br />
  CRect  rectTabCtrl;<br />
<br />
  CPropertyPage *pPage = this->m_PS->GetActivePage();<br />
<br />
  CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
  if (pTabCtrl != NULL)<br />
  {<br />
	pTabCtrl->GetClientRect(&rectTabCtrl);<br />
	<br />
	rectTabCtrl.right -= 6;<br />
	rectTabCtrl.bottom -= 22;<br />
<br />
	if (pPage != NULL)<br />
	{<br />
  	  pPage->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 2, rectTabCtrl.Height() - 4, SWP_NOMOVE | SWP_NOZORDER);<br />
	}<br />
  }<br />
}<br />


I've derived a PS and I've placed that code there, in this way is easy to resize it...

but I hope that using this piece of code you'll be able to resize the property sheet and that after having resized it you will arrange it in order to make it more useful to you.

Hope this helps.
Generalhandle exception in dynamically-linked DLL Pin
John Oliver24-Apr-03 2:40
John Oliver24-Apr-03 2:40 
GeneralRe: handle exception in dynamically-linked DLL Pin
Neville Franks24-Apr-03 2:57
Neville Franks24-Apr-03 2:57 
GeneralRe: handle exception in dynamically-linked DLL Pin
John Oliver24-Apr-03 6:03
John Oliver24-Apr-03 6:03 
Generalproblem using CADORecordset class Pin
ilgale24-Apr-03 2:39
ilgale24-Apr-03 2:39 
GeneralBad MFC printing architecure Pin
Anonymous24-Apr-03 2:15
Anonymous24-Apr-03 2:15 
GeneralRe: Bad MFC printing architecure Pin
Roger Allen24-Apr-03 7:12
Roger Allen24-Apr-03 7:12 
Generalfinding directory/folder path Pin
Anonymous24-Apr-03 2:08
Anonymous24-Apr-03 2:08 
GeneralRe: finding directory/folder path Pin
David Crow24-Apr-03 5:38
David Crow24-Apr-03 5:38 
Generalformating date and time Pin
Anonymous24-Apr-03 1:49
Anonymous24-Apr-03 1:49 
GeneralRe: formating date and time Pin
fabjoe24-Apr-03 2:21
fabjoe24-Apr-03 2:21 
GeneralRe: formating date and time Pin
fabjoe24-Apr-03 2:21
fabjoe24-Apr-03 2:21 
GeneralRe: formating date and time Pin
Jason Henderson24-Apr-03 5:30
Jason Henderson24-Apr-03 5:30 
GeneralRe: formating date and time Pin
David Crow24-Apr-03 5:46
David Crow24-Apr-03 5:46 
Generalmake user interface Pin
acaselli24-Apr-03 1:48
acaselli24-Apr-03 1:48 
GeneralRe: make user interface Pin
David Crow24-Apr-03 5:48
David Crow24-Apr-03 5:48 
GeneralRe: make user interface Pin
acaselli5-May-03 1:43
acaselli5-May-03 1:43 
GeneralQuestion about Time Zone. Pin
George224-Apr-03 0:12
George224-Apr-03 0:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.