Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUsability question... Pin
Matt Gullett10-Jul-02 15:32
Matt Gullett10-Jul-02 15:32 
GeneralRe: Usability question... Pin
Shog910-Jul-02 16:41
sitebuilderShog910-Jul-02 16:41 
GeneralRe: Usability question... Pin
benjymous11-Jul-02 4:00
benjymous11-Jul-02 4:00 
QuestionPThread in VC++??? Pin
ChiYung10-Jul-02 15:16
ChiYung10-Jul-02 15:16 
AnswerRe: PThread in VC++??? Pin
Rage10-Jul-02 22:17
professionalRage10-Jul-02 22:17 
AnswerRe: PThread in VC++??? Pin
Anonymous10-Jul-02 22:43
Anonymous10-Jul-02 22:43 
GeneralRe: problem with CColorDialog... Pin
Steve L.10-Jul-02 12:37
Steve L.10-Jul-02 12:37 
GeneralRe: problem with CColorDialog... Pin
Joaquín M López Muñoz10-Jul-02 12:37
Joaquín M López Muñoz10-Jul-02 12:37 
Well, this is a rather common misundertanding about MFC dialogs and the underlying windows. When you construct a CColorDialog (or some other type of dialog, for that matter), it is only the MFC wrapper that gets created. It is in the middle of DoModal that the underlying HWND is actually created and attached to the MFC object. Unfortunately, after calling DoModal is all too late for setting the caption (the dialog has already exited.) The way out of this dilemma is as follows:
  1. Create a class derived from CColorDialog, say CMyColorDialog.
  2. Provide a constructor accepting the caption that stores it in some member variable defined to that purpose, say m_caption.
  3. Add an OnInitDialog handler and set there the new caption with SetWindowText(m_caption).
Good luck!

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralSaving information in Registry. Pin
Speedy10-Jul-02 11:32
Speedy10-Jul-02 11:32 
GeneralRe: Saving information in Registry. Pin
ColinDavies10-Jul-02 11:42
ColinDavies10-Jul-02 11:42 
GeneralRe: Saving information in Registry. Pin
Nish Nishant10-Jul-02 17:46
sitebuilderNish Nishant10-Jul-02 17:46 
GeneralRe: Saving information in Registry. Pin
sudip11-Jul-02 6:45
sudip11-Jul-02 6:45 
GeneralVisual C++ and MFC Pin
Sid Kraft10-Jul-02 11:26
Sid Kraft10-Jul-02 11:26 
GeneralRe: Visual C++ and MFC Pin
Chris Losinger10-Jul-02 11:34
professionalChris Losinger10-Jul-02 11:34 
GeneralRe: Visual C++ and MFC Pin
Desmond Mardle12-Jul-02 8:54
Desmond Mardle12-Jul-02 8:54 
GeneralOnPrint() Help Pin
Desmond Mardle10-Jul-02 11:00
Desmond Mardle10-Jul-02 11:00 
GeneralRe: OnPrint() Help Pin
Joaquín M López Muñoz10-Jul-02 12:45
Joaquín M López Muñoz10-Jul-02 12:45 
GeneralRe: How to maximize dialog at start of Application and++ Pin
sudip10-Jul-02 11:08
sudip10-Jul-02 11:08 
GeneralRegions in GDI+ Pin
Anonymous10-Jul-02 10:35
Anonymous10-Jul-02 10:35 
GeneralRe: Regions in GDI+ Pin
567890123410-Jul-02 19:43
567890123410-Jul-02 19:43 
GeneralWhat is the diff. between GDI and GDI+? Pin
Srini Kella11-Jul-02 8:33
Srini Kella11-Jul-02 8:33 
GeneralRe: What is the diff. between GDI and GDI+? Pin
NormDroid11-Jul-02 9:01
professionalNormDroid11-Jul-02 9:01 
GeneralThank you very much. Pin
Srini Kella11-Jul-02 10:28
Srini Kella11-Jul-02 10:28 
GeneralRe: What is the diff. between GDI and GDI+? Pin
Jay Beckert11-Jul-02 16:30
Jay Beckert11-Jul-02 16:30 
GeneralRe: What is the diff. between GDI and GDI+? Pin
Jay Beckert12-Jul-02 8:18
Jay Beckert12-Jul-02 8:18 

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.