Click here to Skip to main content
15,900,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compiler Error Pin
ldaoust22-Dec-03 16:25
ldaoust22-Dec-03 16:25 
GeneralCProgressCtrl problem in long function Pin
IGx8921-Dec-03 9:21
IGx8921-Dec-03 9:21 
GeneralRe: CProgressCtrl problem in long function Pin
Michael Dunn21-Dec-03 11:40
sitebuilderMichael Dunn21-Dec-03 11:40 
GeneralRe: CProgressCtrl problem in long function Pin
IGx8921-Dec-03 12:57
IGx8921-Dec-03 12:57 
GeneralFinding out which button has focus Pin
blindcop21-Dec-03 8:22
blindcop21-Dec-03 8:22 
GeneralRe: Finding out which button has focus Pin
David Crow22-Dec-03 3:53
David Crow22-Dec-03 3:53 
GeneralUSB Pin
BladeIII21-Dec-03 4:40
BladeIII21-Dec-03 4:40 
GeneralAccurate window sizes Pin
nukenuts21-Dec-03 3:09
nukenuts21-Dec-03 3:09 
I've created an application with a splitter window and
two views. I want both views to have a height of 480 and
widths of 640 and 150 respectively

in the OnSize function of the main frame I have:

void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);

// Don't adjust the splitters if the application
// is minimized or the splitters have not been
// initialized.
if (m_initSplitters && nType != SIZE_MINIMIZED)
{
// Adjust the row/column info to compensate for
// the new size
m_splitter.SetRowInfo( 0, m_mainViewHeight, 0 );
m_splitter.SetColumnInfo(0, m_mainViewWidth, 0 );
m_splitter.SetColumnInfo(1, m_tileViewWidth, 0 );

// Apply our changes to the splitter
m_splitter.RecalcLayout();
}
}


in the PreCreate function of the main frame I have:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
CRect rect(0, 0, 640 + 150, 480);

AdjustWindowRectEx(&rect, cs.style, true, cs.dwExStyle);

cs.cx = rect.right - rect.left;
cs.cy = rect.bottom - rect.top;

if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;

return TRUE;
}


The height of the splitter is 480. (Used CSplitterWnd::GetClientRect())
However, the heights of the views is 476.

The splitter width is 790.
But the widths of the views are 640(correct) and 139 respectively.


How can I correct the sizes of the view windows?

GeneralRe: Accurate window sizes Pin
nukenuts21-Dec-03 3:18
nukenuts21-Dec-03 3:18 
GeneralRe: Accurate window sizes Pin
Johann Gerell21-Dec-03 5:19
Johann Gerell21-Dec-03 5:19 
GeneralRe: Accurate window sizes Pin
nukenuts22-Dec-03 3:03
nukenuts22-Dec-03 3:03 
GeneralRe: Accurate window sizes Pin
Johann Gerell22-Dec-03 11:40
Johann Gerell22-Dec-03 11:40 
General<b>Get Relations Betwwen The Tables</b> Pin
21-Dec-03 0:35
suss21-Dec-03 0:35 
GeneralChanging background and text color using microsoft visual c++ Pin
Asesh shrestha21-Dec-03 0:08
Asesh shrestha21-Dec-03 0:08 
GeneralRe: Changing background and text color using microsoft visual c++ Pin
Robert Kuster21-Dec-03 1:20
Robert Kuster21-Dec-03 1:20 
QuestionmsoControlSplitButtonPopup ??? Pin
YaronNir20-Dec-03 21:53
YaronNir20-Dec-03 21:53 
GeneralCONVERT RGBX to RGBTRIPLE Pin
Member 40481320-Dec-03 21:19
Member 40481320-Dec-03 21:19 
GeneralHide Installing Inf showing display progress bar popup window Pin
rohit.dhamija20-Dec-03 20:00
rohit.dhamija20-Dec-03 20:00 
Generalold c++ compiler Pin
mhmoud rawas20-Dec-03 19:22
mhmoud rawas20-Dec-03 19:22 
GeneralRe: old c++ compiler Pin
Monty220-Dec-03 19:50
Monty220-Dec-03 19:50 
GeneralRe: old c++ compiler Pin
mhmoud rawas20-Dec-03 19:59
mhmoud rawas20-Dec-03 19:59 
GeneralRe: old c++ compiler Pin
ZoogieZork20-Dec-03 19:55
ZoogieZork20-Dec-03 19:55 
GeneralRe: old c++ compiler Pin
mhmoud rawas20-Dec-03 20:00
mhmoud rawas20-Dec-03 20:00 
GeneralProblems with PRINTING Pin
Srdjan Mladenovic20-Dec-03 15:19
Srdjan Mladenovic20-Dec-03 15:19 
GeneralMDI Question Pin
Anonymous20-Dec-03 14:27
Anonymous20-Dec-03 14:27 

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.