I've been working with C/C++ off and on for serveral years and am self taught. I never have much time to learn, so I became good at finding answers on the web and in Books. However, the answers I found are all similar and are not working.
I am using M$ Visual C++ 6.0 using MFC for the first time in a real application.
I have the default setup chosen.
I want to allow my Title Bar to use a variable I created in the String Table.
I can't figure out how to accomplish this.
The code samples I found are all similar to:
CWnd * pWnd = (Cwnd *) GetDlgItem (IDC_EDIT);
pWnd->SetWindowText ("TEST"
however this doesn't work:
error C2660: 'GetDlgItem' : function does not take 1 parameters
i tried another posts solution:
HWND *pHWnd;
Wnd* pWnd = GetDlgItem(*pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2440: 'initializing' : cannot convert from 'struct HWND__ *' to 'class CWnd *'
and variations:
HWND *pHWnd;
Wnd* pWnd = GetDlgItem(pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'struct HWND__ ** ' to 'struct HWND__ *'
i mixed the two:
HWND *pHWnd;
Wnd* pWnd =(CWnd *) GetDlgItem(pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'struct HWND__ ** ' to 'struct HWND__ *'
HWND *pHWnd;
Wnd* pWnd =(CWnd *) GetDlgItem(*pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
warning C4700: local variable 'pHWnd' used without having been initialized
when i try to run it crashes. i've even tried using the dereferencing it with "&".
can someone please help?
I know i'm not initializing the *pHWnd, that's what GetDlgItem is supposed to do... isn't it?
Thank you.
I am using M$ Visual C++ 6.0 using MFC for the first time in a real application.
I have the default setup chosen.
I want to allow my Title Bar to use a variable I created in the String Table.
I can't figure out how to accomplish this.
The code samples I found are all similar to:
CWnd * pWnd = (Cwnd *) GetDlgItem (IDC_EDIT);
pWnd->SetWindowText ("TEST"
however this doesn't work:
error C2660: 'GetDlgItem' : function does not take 1 parameters
i tried another posts solution:
HWND *pHWnd;
Wnd* pWnd = GetDlgItem(*pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2440: 'initializing' : cannot convert from 'struct HWND__ *' to 'class CWnd *'
and variations:
HWND *pHWnd;
Wnd* pWnd = GetDlgItem(pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'struct HWND__ ** ' to 'struct HWND__ *'
i mixed the two:
HWND *pHWnd;
Wnd* pWnd =(CWnd *) GetDlgItem(pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'struct HWND__ ** ' to 'struct HWND__ *'
HWND *pHWnd;
Wnd* pWnd =(CWnd *) GetDlgItem(*pHWnd,IDD_COOKIELOGIN_DIALOG);
pWnd->SetWindowText(_T("Test");
warning C4700: local variable 'pHWnd' used without having been initialized
when i try to run it crashes. i've even tried using the dereferencing it with "&".
can someone please help?
I know i'm not initializing the *pHWnd, that's what GetDlgItem is supposed to do... isn't it?
Thank you.