Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: .NET Pin
Mark Salsbery7-Oct-07 14:19
Mark Salsbery7-Oct-07 14:19 
AnswerRe: .NET Pin
Michael Dunn7-Oct-07 17:52
sitebuilderMichael Dunn7-Oct-07 17:52 
QuestionMFC Pin
vaibhva7-Oct-07 11:44
vaibhva7-Oct-07 11:44 
AnswerRe: MFC Pin
Hamid_RT7-Oct-07 20:08
Hamid_RT7-Oct-07 20:08 
QuestionHow to resize client area without resizing window?? Pin
zarraza7-Oct-07 11:00
zarraza7-Oct-07 11:00 
AnswerRe: How to resize client area without resizing window?? Pin
Mark Salsbery7-Oct-07 14:52
Mark Salsbery7-Oct-07 14:52 
AnswerRe: How to resize client area without resizing window?? Pin
Hamid_RT7-Oct-07 20:11
Hamid_RT7-Oct-07 20:11 
AnswerRe: How to resize client area without resizing window?? Pin
Nelek7-Oct-07 20:51
protectorNelek7-Oct-07 20:51 
What about...

// Button pressed
	CSize sizeTotal;
	sizeTotal.cx = 950;	sizeTotal.cy = 1400;
	SetScrollSizes(MM_TEXT, sizeTotal);

	//More code to load the image or whatever...


and make your view derived from CScrollView.



But with SDI you may have problems, frame and client area are connected. You can always try it with an MDI App but limiting the number of opened documents to one. I make it so to have more functionality about client area and multiple views with same document.

In MDI you have the CMainFrame for the App window and the ChildFrame for the main view related with the document. You can change the size of the client area in the BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) and specify the size of the frame, change caption, properties and so on.

For example in my program.. My main frame (app window) is maximized to screen resolution. Then the MainView frame is 620x420 to be sure it has no problems in any monitor or resolution but te client area is 950x1400 (as I say in the snippet above), afterwards I have different secondary views with different frames size (some fix, some dinamics)

if (m_pDoc->m_szNewFrameName == "PCLayout")
{   cs.cx = 500;                cs.cy =  (40 + (25 * nMax)); //nMax = [1, 24]
}
else if (m_pDoc->m_szNewFrameName == "SPSMonitor")
{   cs.cx = 525;                cs.cy =  300;
}
else if (m_pDoc->m_pObjInput || m_pDoc->m_pObjOutput)
{   cs.cx = 415;                cs.cy = 260;    }
else if ((m_pDoc->m_pObjRegler) && (m_pDoc->m_pObjRegler->m_nRegType == 0))
{   cs.cx = 517;                cs.cy = 421;    }
else if ((m_pDoc->m_pObjRegler) && (m_pDoc->m_pObjRegler->m_nRegType == 2))
{   cs.cx = 610;                cs.cy = 435;    }


Hope it helps


Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

AnswerRe: How to resize client area without resizing window?? Pin
zarraza8-Oct-07 11:44
zarraza8-Oct-07 11:44 
QuestionAn easy way to embed flash swf files in C++/MFC .exe? Pin
CryHaven7-Oct-07 8:16
CryHaven7-Oct-07 8:16 
Questionmulti threading Pin
locoone7-Oct-07 7:36
locoone7-Oct-07 7:36 
AnswerRe: multi threading Pin
Mark Salsbery7-Oct-07 8:06
Mark Salsbery7-Oct-07 8:06 
GeneralRe: multi threading Pin
locoone7-Oct-07 9:28
locoone7-Oct-07 9:28 
GeneralRe: multi threading Pin
Mark Salsbery7-Oct-07 9:32
Mark Salsbery7-Oct-07 9:32 
JokeRe: multi threading Pin
Nelek7-Oct-07 21:01
protectorNelek7-Oct-07 21:01 
QuestionClient FTP error code 12029 Pin
dev246-Oct-07 16:02
dev246-Oct-07 16:02 
QuestionScrollBar movement by per click Pin
s196675m6-Oct-07 14:35
s196675m6-Oct-07 14:35 
AnswerRe: ScrollBar movement by per click Pin
Mark Salsbery7-Oct-07 5:46
Mark Salsbery7-Oct-07 5:46 
QuestionConvert HTML to XHTML Pin
Peishan, Wu6-Oct-07 5:50
Peishan, Wu6-Oct-07 5:50 
AnswerRe: Convert HTML to XHTML Pin
George L. Jackson6-Oct-07 7:37
George L. Jackson6-Oct-07 7:37 
QuestionScroll bars with CStatic Pin
shivrajbhosale6-Oct-07 0:08
shivrajbhosale6-Oct-07 0:08 
QuestionRe: Scroll bars with CStatic Pin
chandu0046-Oct-07 0:11
chandu0046-Oct-07 0:11 
AnswerRe: Scroll bars with CStatic Pin
shivrajbhosale6-Oct-07 0:22
shivrajbhosale6-Oct-07 0:22 
AnswerRe: Scroll bars with CStatic Pin
Hamid_RT6-Oct-07 1:32
Hamid_RT6-Oct-07 1:32 
GeneralRe: Scroll bars with CStatic Pin
shivrajbhosale7-Oct-07 21:40
shivrajbhosale7-Oct-07 21:40 

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.