Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is the include for CText Pin
Mark Salsbery18-Aug-08 10:21
Mark Salsbery18-Aug-08 10:21 
AnswerRe: What is the include for CText Pin
David Crow18-Aug-08 11:07
David Crow18-Aug-08 11:07 
AnswerRe: What is the include for CText Pin
vikas amin18-Aug-08 11:40
vikas amin18-Aug-08 11:40 
AnswerRe: What is the include for CText Pin
ThatsAlok19-Aug-08 20:27
ThatsAlok19-Aug-08 20:27 
QuestionToolbar with button controls Pin
Nathan Going18-Aug-08 7:44
Nathan Going18-Aug-08 7:44 
AnswerRe: Toolbar with button controls Pin
Mark Salsbery18-Aug-08 8:04
Mark Salsbery18-Aug-08 8:04 
QuestionRe: Toolbar with button controls Pin
Nathan Going18-Aug-08 10:00
Nathan Going18-Aug-08 10:00 
AnswerRe: Toolbar with button controls Pin
Mark Salsbery18-Aug-08 10:19
Mark Salsbery18-Aug-08 10:19 
Nathan Going wrote:
What would be the best way to make that CControlBar-Derived class the full width of it's parent.


I don't know the best way, but I use something like this:
CSize CMyControlBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
{
   // Get the parent's client window size
   //  in case we need that info to layout 
   //  controls
   CRect ParentClientRect;
   GetParent()->GetClientRect(&ParentClientRect);

   //
   // calc the layout of all the controls here
   // ...

   int desiredheight = ...;
 
   return CSize(ParentClientRect.Width(), desiredheight);
}

CSize CMyControlBar::CalcDynamicLayout(int nLength, DWORD dwMode)
{
   return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZ);
}


Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: Toolbar with button controls Pin
vikas amin18-Aug-08 8:11
vikas amin18-Aug-08 8:11 
Questionvc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror18-Aug-08 7:26
rolfhorror18-Aug-08 7:26 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
vikas amin18-Aug-08 7:49
vikas amin18-Aug-08 7:49 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror18-Aug-08 8:35
rolfhorror18-Aug-08 8:35 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
led mike18-Aug-08 8:08
led mike18-Aug-08 8:08 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror18-Aug-08 8:33
rolfhorror18-Aug-08 8:33 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
led mike18-Aug-08 8:36
led mike18-Aug-08 8:36 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror18-Aug-08 8:48
rolfhorror18-Aug-08 8:48 
QuestionRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
led mike18-Aug-08 8:53
led mike18-Aug-08 8:53 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror18-Aug-08 9:32
rolfhorror18-Aug-08 9:32 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
toxcct18-Aug-08 21:32
toxcct18-Aug-08 21:32 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror19-Aug-08 2:57
rolfhorror19-Aug-08 2:57 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
ThatsAlok19-Aug-08 20:29
ThatsAlok19-Aug-08 20:29 
QuestionRegSvr32 exit codes [modified] Pin
sashoalm18-Aug-08 5:51
sashoalm18-Aug-08 5:51 
QuestionRe: RegSvr32 exit codes Pin
David Crow18-Aug-08 7:18
David Crow18-Aug-08 7:18 
AnswerRe: RegSvr32 exit codes Pin
sashoalm18-Aug-08 7:31
sashoalm18-Aug-08 7:31 
QuestionRe: RegSvr32 exit codes Pin
David Crow18-Aug-08 7:45
David Crow18-Aug-08 7:45 

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.