Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing the size of a CMDIFrameWnd's border

Posted on 1997-03-01
1
Medium Priority
?
371 Views
Last Modified: 2013-11-20
Is it possible to change the size of a CMDIFrameWnd's border?  I have an MDI app and I want to paint some controls in along the left side (vertically) of the frame window.  Thus moving it's client area over to the right more.  

I only want to change the left side of the border, the other side can stay the same.


0
Comment
Question by:tdietz
1 Comment
 
LVL 1

Accepted Solution

by:
serge010697 earned 50 total points
ID: 1300212
You may try something like that:

void CMainFrame::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
CMDIFrameWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
if (bCalcValidRects)
          lpncsp->rgrc[0].left += 32;
}

Also you have to rewrite OnNcPaint:

void CMainFrame::OnNcPaint()
{
Default();
...Draw your stuff here
}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Integration Management Part 2

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question