Click here to Skip to main content
15,926,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dialog app Pin
Rage20-Dec-02 1:26
professionalRage20-Dec-02 1:26 
GeneralRe: dialog app Pin
Raphael Kindt20-Dec-02 1:36
Raphael Kindt20-Dec-02 1:36 
GeneralRe: dialog app Pin
Rage20-Dec-02 2:18
professionalRage20-Dec-02 2:18 
GeneralRe: dialog app Pin
Raphael Kindt20-Dec-02 2:30
Raphael Kindt20-Dec-02 2:30 
GeneralGet info from DLL Pin
3EN20-Dec-02 1:01
suss3EN20-Dec-02 1:01 
GeneralRe: Get info from DLL Pin
Rage20-Dec-02 1:29
professionalRage20-Dec-02 1:29 
GeneralRe: Get info from DLL Pin
jmkhael20-Dec-02 3:41
jmkhael20-Dec-02 3:41 
GeneralMDI ChildFrame positioning and Toolbars Pin
Dov Sherman20-Dec-02 0:59
Dov Sherman20-Dec-02 0:59 
I'm working on a MDI application which has a couple of dockable toolbars. When a document loads, I want the childframe to start at a certain height and width depending on the data in the attached document. I don't want to move the child frame; I just want to change its width and height. This is what I tried...
<br />
CRect lChildRect;<br />
pChildWnd->GetWindowRect(&lChildRect);<br />
lChildRect.NormalizeRect();<br />
pMainWnd->ScreenToClient(&lChildRect);<br />
<br />
pChildWnd->MoveWindow(lChildRect->left, lChildRect->top, iNewWidth, iNewHeight, TRUE);<br />


It sets the new width and height correctly but the position is wrong. Depending on how many toolbars are docked to the top or left side of the main frame, the child frame position winds up increasingly offset. It seems that the ScreenToClient() function fails to take into account toolbars but the client area, used by the MoveWindow() function, does take toolbars into account.

How do I get the correct client coordinates for my MoveWindow() call?
GeneralRe: MDI ChildFrame positioning and Toolbars Pin
Pavel Klocek20-Dec-02 2:42
Pavel Klocek20-Dec-02 2:42 
GeneralUnicode Debug Pin
Suren20-Dec-02 0:35
Suren20-Dec-02 0:35 
GeneralRe: Unicode Debug Pin
Rage20-Dec-02 1:02
professionalRage20-Dec-02 1:02 
GeneralRe: Unicode Debug Pin
Suren20-Dec-02 1:50
Suren20-Dec-02 1:50 
GeneralRe: Unicode Debug Pin
Rage20-Dec-02 3:17
professionalRage20-Dec-02 3:17 
GeneralRe: Unicode Debug Pin
Andreas Saurwein20-Dec-02 2:18
Andreas Saurwein20-Dec-02 2:18 
Generaldialog box problems Pin
r i s h a b h s19-Dec-02 23:18
r i s h a b h s19-Dec-02 23:18 
GeneralRe: dialog box problems Pin
Rage20-Dec-02 0:02
professionalRage20-Dec-02 0:02 
GeneralRe: dialog box problems Pin
Fredrik Skog20-Dec-02 0:06
Fredrik Skog20-Dec-02 0:06 
GeneralRe: dialog box problems Pin
r i s h a b h s20-Dec-02 0:27
r i s h a b h s20-Dec-02 0:27 
GeneralRe: dialog box problems Pin
Rage20-Dec-02 0:59
professionalRage20-Dec-02 0:59 
GeneralRe: dialog box problems Pin
Fredrik Skog20-Dec-02 1:01
Fredrik Skog20-Dec-02 1:01 
GeneralRe: dialog box problems Pin
helloyu20-Dec-02 2:29
helloyu20-Dec-02 2:29 
GeneralRe: dialog box problems Pin
Alvaro Mendez20-Dec-02 5:29
Alvaro Mendez20-Dec-02 5:29 
GeneralLine Object in MFC! Pin
Alex H 198319-Dec-02 22:32
Alex H 198319-Dec-02 22:32 
GeneralRe: Line Object in MFC! Pin
Iain Clarke, Warrior Programmer19-Dec-02 22:49
Iain Clarke, Warrior Programmer19-Dec-02 22:49 
GeneralRe: Line Object in MFC! Pin
Jörgen Sigvardsson21-Dec-02 10:09
Jörgen Sigvardsson21-Dec-02 10:09 

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.