Click here to Skip to main content
16,018,394 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNot drawing full dialog Pin
aquawicket23-Feb-07 14:14
aquawicket23-Feb-07 14:14 
AnswerRe: Not drawing full dialog Pin
David Crow23-Feb-07 14:59
David Crow23-Feb-07 14:59 
GeneralRe: Not drawing full dialog Pin
aquawicket23-Feb-07 15:30
aquawicket23-Feb-07 15:30 
GeneralRe: Not drawing full dialog Pin
Rajesh R Subramanian23-Feb-07 18:43
professionalRajesh R Subramanian23-Feb-07 18:43 
QuestionVisual styles without MFC Pin
Lamgi-Mari23-Feb-07 12:01
Lamgi-Mari23-Feb-07 12:01 
AnswerRe: Visual styles without MFC Pin
John R. Shaw23-Feb-07 16:51
John R. Shaw23-Feb-07 16:51 
QuestionTired of copy/pasting code....... Pin
pblais23-Feb-07 10:40
pblais23-Feb-07 10:40 
AnswerRe: Tired of copy/pasting code....... [modified] Pin
Mark Salsbery23-Feb-07 12:23
Mark Salsbery23-Feb-07 12:23 
What if you make a common base class and derive your dialog classes from it - something like:
class CMyDialog : public CDialog
{
public:
   CMyDialog() : CDialog()  {}
   explicit CMyDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL) :
                                    CDialog(lpszTemplateName, pParentWnd)  {}
   explicit CMyDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL) :
                                    CDialog(nIDTemplate, pParentWnd)  {}
 
   void DisplayNow(int, LPCTSTR);
};
...
void CMyDialog::DisplayNow(int nID, LPCTSTR lpszString)
{
   CWnd* pDISPLAY_Wnd = GetDlgItem(nID);
 
   //if (pDISPLAY_Wnd && ::IsWindow(*pDISPLAY_Wnd))  <code>*edit* ::IsWindow() call is redundant here</code>
   if (pDISPLAY_Wnd)
   {
      pDISPLAY_Wnd->SetWindowText(lpszString);
      pDISPLAY_Wnd->UpdateWindow();
   }
}



-- modified at 18:39 Friday 23rd February, 2007

"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."

AnswerRe: Tired of copy/pasting code....... Pin
PJ Arends23-Feb-07 12:33
professionalPJ Arends23-Feb-07 12:33 
AnswerRe: Tired of copy/pasting code....... Pin
S Douglas24-Feb-07 23:28
professionalS Douglas24-Feb-07 23:28 
QuestionActiveX returning custom types from methods?? Pin
jhinze23-Feb-07 10:13
jhinze23-Feb-07 10:13 
QuestionReferences vs. Pointers Pin
Yonggoo23-Feb-07 9:15
Yonggoo23-Feb-07 9:15 
AnswerRe: References vs. Pointers Pin
Joe Woodbury23-Feb-07 9:32
professionalJoe Woodbury23-Feb-07 9:32 
GeneralRe: References vs. Pointers Pin
Yonggoo23-Feb-07 9:46
Yonggoo23-Feb-07 9:46 
GeneralRe: References vs. Pointers Pin
David Crow23-Feb-07 10:28
David Crow23-Feb-07 10:28 
GeneralRe: References vs. Pointers Pin
Joe Woodbury23-Feb-07 10:34
professionalJoe Woodbury23-Feb-07 10:34 
GeneralRe: References vs. Pointers Pin
Jörgen Sigvardsson23-Feb-07 11:35
Jörgen Sigvardsson23-Feb-07 11:35 
GeneralRe: References vs. Pointers Pin
PJ Arends23-Feb-07 12:54
professionalPJ Arends23-Feb-07 12:54 
GeneralRe: References vs. Pointers Pin
Jörgen Sigvardsson23-Feb-07 13:42
Jörgen Sigvardsson23-Feb-07 13:42 
AnswerRe: References vs. Pointers Pin
Mark Salsbery23-Feb-07 10:44
Mark Salsbery23-Feb-07 10:44 
QuestionStrange errors related to getline()... Pin
CoffeeAddict1923-Feb-07 9:12
CoffeeAddict1923-Feb-07 9:12 
AnswerRe: Strange errors related to getline()... Pin
Newbie0023-Feb-07 9:51
Newbie0023-Feb-07 9:51 
GeneralRe: Strange errors related to getline()... Pin
CoffeeAddict1923-Feb-07 9:55
CoffeeAddict1923-Feb-07 9:55 
QuestionRe: Strange errors related to getline()... Pin
Newbie0023-Feb-07 10:00
Newbie0023-Feb-07 10:00 
AnswerRe: Strange errors related to getline()... Pin
Newbie0023-Feb-07 10:18
Newbie0023-Feb-07 10: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.