Click here to Skip to main content
15,923,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: file nameing Pin
Bob Stanneveld21-Dec-03 20:55
Bob Stanneveld21-Dec-03 20:55 
GeneralAccessing struct members; Pin
Bo Hunter21-Dec-03 16:41
Bo Hunter21-Dec-03 16:41 
GeneralRe: Accessing struct members; Pin
Michael Dunn21-Dec-03 18:58
sitebuilderMichael Dunn21-Dec-03 18:58 
GeneralRe: Accessing struct members; Pin
Bo Hunter22-Dec-03 14:22
Bo Hunter22-Dec-03 14:22 
GeneralPrinting Text from and edit box in a dialog application Pin
JKohm21-Dec-03 11:40
JKohm21-Dec-03 11:40 
GeneralRe: Printing Text from and edit box in a dialog application Pin
Roger Allen22-Dec-03 0:53
Roger Allen22-Dec-03 0:53 
Generaldial-up connection Pin
Member 74005421-Dec-03 10:18
Member 74005421-Dec-03 10:18 
GeneralRe: dial-up connection Pin
pma21-Dec-03 11:36
pma21-Dec-03 11:36 
GeneralCompiler Error Pin
RedDragon2k21-Dec-03 9:44
RedDragon2k21-Dec-03 9:44 
GeneralRe: Compiler Error Pin
Niall Barr21-Dec-03 10:25
professionalNiall Barr21-Dec-03 10:25 
GeneralRe: Compiler Error Pin
RedDragon2k21-Dec-03 10:27
RedDragon2k21-Dec-03 10:27 
GeneralRe: Compiler Error Pin
Michael Dunn21-Dec-03 11:37
sitebuilderMichael Dunn21-Dec-03 11:37 
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 
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 
O.K., here's what I did:
I derived a class from CSplitterWnd so I could access the protected members relating to it's border size and the size of the splitter itself. Then in the precreatewindow() of my main frame I used this info to calculate the correct size of my main frame. I also added in the scrollbars sizes.


BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Set the size and style of the window
cs.style &= ~WS_MAXIMIZEBOX;
// cs.style &= ~WS_MINIMIZEBOX;
cs.style &= ~WS_THICKFRAME;
cs.style &= ~FWS_ADDTOTITLE;

int totalWidth = m_mapViewWidth +
m_tileViewWidth +
m_splitter.GetSplitterSize().cx +
(m_splitter.GetBorderSize().cx * 2) + (SCROLLBAR_WIDTH*2);

int totalHeight = m_mapViewHeight +
(m_splitter.GetBorderSize().cx * 2) + SCROLLBAR_HEIGHT;


CRect rect(0, 0, totalWidth, totalHeight);

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;
}

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 

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.