Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtTabPageContainerWnd Collapse All
Subject Author Date
Andrew Banks May 29, 2007 - 9:31 AM

Hi, I am trying to expand a CExtTabPageContainerWnd based on available screen size.
That works OK.

Naturally, I place a dialog into a CExtTabPageContainerWnd and I need to expand that contained dialog also.

I have to use 62 as the y differential to subtract from the CExtTabPageContainerWnd client window size.

How do I know how much the tabs and top overhead are for the CExtTabPageContainerWnd.leaving a true client area for a contained dialog?

Thanks

Technical Support May 30, 2007 - 4:17 AM

There is a CExtTabPageContainerWnd::GetSafeTabWindow() method that returns a pointer to the CExtTabWnd window used inside the tab page container. So having the tab window handle, you can retrieve its rectangle.

Andrew Banks May 30, 2007 - 6:28 AM

First the Page container dialog is created.
Next, the contained dialog is created. At this time the tab wnd has a zero client rect
Finally, page insertion occurs. At this point the tab window has a client rect.

Therefore, I would have to adjust the contained dialog window size after page insertion and therefore after OnInitDialog.

So, I would have to "reach" inside the contained dialog code from somewhere else to adjust its window size after OnInitDialog.

Do you have constants somewhere or something that control the tab window size?

Technical Support May 30, 2007 - 12:34 PM

In order to measure the exact size of the tab window when it is created, you should send the WM_SIZEPARENT MFC’s internal message. It is possible to compute its size before it created using the g_PaintManager->m_FontNormal font metrics and additional tab item/control margin constants. Could you provide us with more details about the dialog with the tab page container control inside? Is it a property sheet-like dialog with tab pages? This may help us provide a ready-to-use solution.