Click here to Skip to main content
16,008,469 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem moving mfc dll to another machine Pin
hemenders4-Dec-04 18:22
hemenders4-Dec-04 18:22 
GeneralBarCode progam Pin
akira323-Dec-04 16:34
akira323-Dec-04 16:34 
GeneralRe: BarCode progam Pin
ThatsAlok3-Dec-04 22:16
ThatsAlok3-Dec-04 22:16 
GeneralDirectX3D Book Pin
akira323-Dec-04 16:23
akira323-Dec-04 16:23 
GeneralRe: DirectX3D Book Pin
Stanciu Vlad4-Dec-04 9:41
Stanciu Vlad4-Dec-04 9:41 
GeneralToolTip rect size Pin
lowiq3-Dec-04 16:07
lowiq3-Dec-04 16:07 
GeneralRe: ToolTip rect size Pin
alex.barylski4-Dec-04 2:32
alex.barylski4-Dec-04 2:32 
GeneralResizing a static variable Pin
digwizfox3-Dec-04 14:50
digwizfox3-Dec-04 14:50 
Here is a description of my problem. I have a modal dialogue window. In my OnInitDialog function, I may have to adjust the size of the window and it's contents manually because sometimes when the dialogue is constructed, an argument is passed into the constructor that turns off the display of certain controls within the window. So when the controls are off, I want to change the size of the window and remaining controls so that everything looks nicer (I don't want a huge blank spot in the middle of the window in this case).

So everything was working fine; I tried changing the window size of the dialogue and that worked fine. I know I can move buttons around and adjust them just like you do when a dialogue box is resizable by the user. But how do I resize a static group control? The group box is a border rectangle that surounds the controls and is just inside of the main dialogue. When I run the below bits of code, the GetClientRectangle function causes my system to crash. The group box is a CStatic control which inherits from CWnd. So it must have a rectangle, within the object, to describe it's coordinates. So why does GetClientRect fail? Is this not a valid function call for a CStatic control? If not, how do I get it's coordinates?


mGroupBox.GetClientRect(&myRect); //Crash!!!
//This would then adjust the height by 25%
mGroupBox.SetWindowPos(NULL, 0, 0, myRect.Width(),
(myRect.Height() - (myRect.Height()/4)),
SWP_NOMOVE | SWP_NOZORDER);
GeneralRe: Resizing a static variable Pin
namaskaaram5-Dec-04 16:54
namaskaaram5-Dec-04 16:54 
GeneralRe: Resizing a static variable Pin
digwizfox8-Dec-04 14:12
digwizfox8-Dec-04 14:12 
GeneralMFC reference vs. value args Pin
Sid Kraft3-Dec-04 13:15
Sid Kraft3-Dec-04 13:15 
GeneralRe: MFC reference vs. value args Pin
Maximilien3-Dec-04 13:33
Maximilien3-Dec-04 13:33 
GeneralRe: MFC reference vs. value args Pin
Kevin McFarlane4-Dec-04 4:09
Kevin McFarlane4-Dec-04 4:09 
GeneralText Editor Source Code Pin
kefa73-Dec-04 9:24
kefa73-Dec-04 9:24 
GeneralRe: Text Editor Source Code Pin
Maximilien3-Dec-04 9:29
Maximilien3-Dec-04 9:29 
GeneralRe: Text Editor Source Code Pin
Timothy Grabrian3-Dec-04 16:03
professionalTimothy Grabrian3-Dec-04 16:03 
GeneralRe: Text Editor Source Code Pin
alex.barylski4-Dec-04 2:30
alex.barylski4-Dec-04 2:30 
GeneralActiveX and RecNavCntrl Pin
john john mackey3-Dec-04 9:00
john john mackey3-Dec-04 9:00 
Generalsupressing a unused variable warning Pin
hyling3-Dec-04 8:43
hyling3-Dec-04 8:43 
GeneralRe: supressing a unused variable warning Pin
PJ Arends3-Dec-04 8:54
professionalPJ Arends3-Dec-04 8:54 
GeneralRe: supressing a unused variable warning Pin
hyling3-Dec-04 9:53
hyling3-Dec-04 9:53 
GeneralRe: supressing a unused variable warning Pin
Gary R. Wheeler3-Dec-04 14:25
Gary R. Wheeler3-Dec-04 14:25 
Generalproblem resoting DB using VC++!! Pin
venadder3-Dec-04 8:08
venadder3-Dec-04 8:08 
GeneralRe: problem resoting DB using VC++!! Pin
David Crow3-Dec-04 9:09
David Crow3-Dec-04 9:09 
GeneralRe: problem resoting DB using VC++!! Pin
venadder3-Dec-04 11:43
venadder3-Dec-04 11:43 

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.