Professional UI Solutions
Site Map   /  Register


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 » Bug: NcFrame doesn't paint right side of frame correctly if the frame was resized lager then screen Collapse All
Subject Author Date
Daniel Semushin Nov 1, 2007 - 6:23 AM

I found, when the main frame window has a size larger then screen area and window was moved to left, NcFrame doesn’t paint right side of frame correctly (check this screenshot - (AviFrames sample)). Of course, you should override the default value in MINMAXINFO->ptMaxSize->x of WM_GETMINMAXINFO message, to make window larger then screen. I’ve tried it under WinXP - everything is OK! May be it’s Windows2000 bug?..

Thank you!

Technical Support Nov 2, 2007 - 5:54 AM

We added the following method in the CMainFrame class in the SDI sample that comes with Prof-UIS

LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
      if( message == WM_GETMINMAXINFO )
            MINMAXINFO * pMMI = (MINMAXINFO *) lParam;
            pMMI->ptMaxPosition.x = 0;
            pMMI->ptMaxPosition.y = 0;
            pMMI->ptMaxSize.x = 16000;
            pMMI->ptMaxSize.y = 16000;
            pMMI->ptMaxTrackSize.x = 16000;
            pMMI->ptMaxTrackSize.y = 16000;
            pMMI->ptMinTrackSize.x = 0;
            pMMI->ptMinTrackSize.y = 0;
            pMMI->ptReserved.x = 0;
            pMMI->ptReserved.y = 0;
            return 0L;
      return CExtNCW < CFrameWnd > ::  WindowProc(message, wParam, lParam);
And we were able to resize the main frame window larger than desktop size without any problems. The skinned non-client area was pointed correctly.

Please note CExtNCW based windows should handle the WM_GETMINMAXINFO message like above rather than adding a message map entry and a separate handler method.

Daniel Semushin Nov 7, 2007 - 6:25 AM

I added your code into SDI sample, but, unfortunately it didn’t work :( Perhaps I was caught wrong, I meant, that problem of skinned non-client area drawing was happened in Windows 2000 only (screenshot - I have tried it in Vista, XP and even Windows 98 – everything was OK! I think the problem is in ExcludeClipRect() function call (ExtNcFrame.cpp line 1534)

		dcPaint.ExcludeClipRect( &rcRealClient );

I’ve tried to comment that line, and in this case, non-client area is drawn perfectly! I have no idea what’s wrong...