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

C / C++ / MFC

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

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.