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 General Discussion » OnGetMinMaxInfo Collapse All
Subject Author Date
Jeremy Ruth Jan 3, 2007 - 8:45 AM

I have an MDI application and I changed my CChildFrame class declaration to the following:

class CChildFrame : public CExtNCW < CMDIFrameWnd >

so the child frames would be painted with the current theme. I have code in this class to ensure a minimum size for the frame. The code is handled in the "OnGetMinMaxInfo" handler. Since I changed the class declaration, it seems that this code is ignored. In other words, I am now able to resize the frame beyond the minimum.

Am I doing something wrong in regards to my class declaration? Do I need to now handle the sizing differently?

Technical Support Jan 4, 2007 - 6:30 AM

The CExtNCW template is not fully compatible with CMDIChildWnd at the moment. We are working on this feature now.

Sergiy Lavrynenko Jan 4, 2007 - 1:33 AM

Dear Jeremy,

Please override the CWnd::WindowProc() virtual method to handle the WM_GETMINMAXINFO message:

LRESULT CChildView::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
    if( message == WM_GETMINMAXINFO )
    {
        MINMAXINFO * pMMI = (MINMAXINFO *)lParam;

        . . .

        return 0;
    }
    return CExtNCW < CMDIFrameWnd > :: WindowProc( message, wParam, lParam );
}

Jeremy Ruth Jan 4, 2007 - 11:41 AM

Sergiy,

I also received a message from ’Technical Support’ that states CMDIFrameWnd is not supported for the CExtNCW template class. I did some searching on the forum and found others to have had some problems (other than just frame size) with CMDIFrameWnd and CExtNCW. So I guess what I am trying to ask is, should we use it? If so, can we use it with confidence?

Technical Support Jan 5, 2007 - 6:57 AM

Please note that we did not say that CMDIFrameWnd is not supported for the CExtNCW template class. What we said is that CExtNCW is not fully compatible with CMDIChildWnd. So we do not recommend you use this template for MDI child windows at the moment.