Click here to Skip to main content
16,006,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCWnd::SetWindowText Pin
28-Aug-01 5:07
suss28-Aug-01 5:07 
GeneralRe: CWnd::SetWindowText Pin
gordingin28-Aug-01 5:23
gordingin28-Aug-01 5:23 
GeneralRe: CWnd::SetWindowText Pin
28-Aug-01 5:39
suss28-Aug-01 5:39 
GeneralRe: CWnd::SetWindowText Pin
gordingin28-Aug-01 6:12
gordingin28-Aug-01 6:12 
GeneralRe: CWnd::SetWindowText Pin
28-Aug-01 6:17
suss28-Aug-01 6:17 
GeneralRe: CWnd::SetWindowText Pin
gordingin28-Aug-01 7:20
gordingin28-Aug-01 7:20 
GeneralRe: CWnd::SetWindowText Pin
28-Aug-01 7:49
suss28-Aug-01 7:49 
GeneralRe: CWnd::SetWindowText Pin
Derek Waters28-Aug-01 14:04
Derek Waters28-Aug-01 14:04 
If you still want your dialogs to be modal (ie all input is directed to the About Box), you can add a member variable (and accessors if you want to be purist about it) in the AboutBox class, set that from your other dialog, THEN call DoModal():

class CMyAboutDlg
{
public:
    SetTitle(LPCTSTR apszTitle)
    {
        m_cstrTitle = apszTitle;
    }

protected:
    CString m_cstrTitle;
}


Then, in your CMyAboutDlg::OnInitDialog:

SetWindowText(m_cstrTitle);


So, when you call your dialog:

CMyAboutDlg vdlgAbout;
if (type == 1)
    vdlgAbout.SetTitle("apple");
else if (type == 2)
    vdlgAbout.SetTitle("banana");
else
    vdlgAbout.SetTitle("grapes");

vdlgAbout.DoModal();


Hope this helps.


------------------------
Derek Waters
derek@lj-oz.com
GeneralRe: CWnd::SetWindowText Pin
Carlos Antollini28-Aug-01 14:24
Carlos Antollini28-Aug-01 14:24 
GeneralNeed some advice Pin
gordingin28-Aug-01 4:51
gordingin28-Aug-01 4:51 
GeneralRemoving Start Bar Pin
28-Aug-01 4:38
suss28-Aug-01 4:38 
GeneralRe: Removing Start Bar Pin
gordingin28-Aug-01 6:25
gordingin28-Aug-01 6:25 
GeneralRe: Removing Start Bar Pin
29-Aug-01 9:56
suss29-Aug-01 9:56 
GeneralRe: Removing Start Bar Pin
Paolo Messina28-Aug-01 6:38
professionalPaolo Messina28-Aug-01 6:38 
GeneralRe: Removing Start Bar Pin
29-Aug-01 10:05
suss29-Aug-01 10:05 
GeneralRe: Removing Start Bar Pin
Simon Capewell29-Aug-01 0:27
Simon Capewell29-Aug-01 0:27 
GeneralSending ALT+CTRL+DEL to the system Pin
Vijay S28-Aug-01 3:47
Vijay S28-Aug-01 3:47 
GeneralRe: Sending ALT+CTRL+DEL to the system Pin
Zoltan Csizmadia28-Aug-01 4:14
Zoltan Csizmadia28-Aug-01 4:14 
GeneralRe: Sending ALT+CTRL+DEL to the system Pin
Vijay S28-Aug-01 5:33
Vijay S28-Aug-01 5:33 
GeneralRe: Sending ALT+CTRL+DEL to the system Pin
Zoltan Csizmadia28-Aug-01 5:46
Zoltan Csizmadia28-Aug-01 5:46 
GeneralRe: Sending ALT+CTRL+DEL to the system Pin
Vijay S28-Aug-01 5:48
Vijay S28-Aug-01 5:48 
GeneralCreating CFormView-form from dialog Pin
28-Aug-01 3:22
suss28-Aug-01 3:22 
GeneralRe: Creating CFormView-form from dialog Pin
Joel Holdsworth28-Aug-01 9:59
Joel Holdsworth28-Aug-01 9:59 
GeneralRe: Creating CFormView-form from dialog Pin
29-Aug-01 1:57
suss29-Aug-01 1:57 
GeneralWSAAsyncselect winsock problem Pin
Kuniva28-Aug-01 2:54
Kuniva28-Aug-01 2:54 

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.