Click here to Skip to main content
15,908,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: iterator [modified] Pin
knoxplusplus29-Jun-06 7:38
knoxplusplus29-Jun-06 7:38 
GeneralRe: iterator Pin
Zac Howland29-Jun-06 8:12
Zac Howland29-Jun-06 8:12 
QuestionScope Pin
Jay0329-Jun-06 5:26
Jay0329-Jun-06 5:26 
AnswerRe: Scope Pin
Chris Losinger29-Jun-06 5:33
professionalChris Losinger29-Jun-06 5:33 
AnswerRe: Scope Pin
Zac Howland29-Jun-06 6:38
Zac Howland29-Jun-06 6:38 
GeneralRe: Scope Pin
Jay0329-Jun-06 7:40
Jay0329-Jun-06 7:40 
GeneralRe: Scope Pin
Blake Miller30-Jun-06 10:25
Blake Miller30-Jun-06 10:25 
QuestionHow to dynamically change a window class name? Pin
yjzh29-Jun-06 5:12
yjzh29-Jun-06 5:12 
AnswerRe: How to dynamically change a window class name? Pin
ovidiucucu29-Jun-06 5:24
ovidiucucu29-Jun-06 5:24 
GeneralRe: How to dynamically change a window class name? Pin
Tara1429-Jun-06 5:45
Tara1429-Jun-06 5:45 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu29-Jun-06 6:08
ovidiucucu29-Jun-06 6:08 
GeneralRe: How to dynamically change a window class name? Pin
Tara1429-Jun-06 7:15
Tara1429-Jun-06 7:15 
QuestionRe: How to dynamically change a window class name? Pin
yjzh29-Jun-06 16:51
yjzh29-Jun-06 16:51 
QuestionRe: How to dynamically change a window class name? Pin
yjzh29-Jun-06 15:33
yjzh29-Jun-06 15:33 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu29-Jun-06 23:34
ovidiucucu29-Jun-06 23:34 
QuestionRe: How to dynamically change a window class name? Pin
yjzh30-Jun-06 21:04
yjzh30-Jun-06 21:04 
Confused | :confused: En, Thank you very much for your new way to solve my trouble, but if I want to create modeless dialog, how to do that?

maybe override create() is not a practical way, because it will call "CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, HINSTANCE hInst)" after some steps, but this function is not a virtual one.

BOOL CMainDlg::Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
{
//omit some original code

//call function
HINSTANCE hInst = AfxFindResourceHandle(lpszTemplateName, RT_DIALOG);
HRSRC hResource = ::FindResource(hInst, lpszTemplateName, RT_DIALOG);
HGLOBAL hTemplate = LoadResource(hInst, hResource);
BOOL bResult = CreateIndirect(hTemplate, pParentWnd, hInst);
FreeResource(hTemplate);

return bResult;
}

BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,
CWnd* pParentWnd, HINSTANCE hInst)
{
//omit some original code

// create modeless dialog
AfxHookWindowCreate(this);
hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate, pParentWnd->GetSafeHwnd(),
AfxDlgProc);

//omit some original code
}

can you tell me how to do that? thank you very much.




virtual
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu1-Jul-06 22:38
ovidiucucu1-Jul-06 22:38 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 18:16
yjzh3-Jul-06 18:16 
QuestionRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 19:03
yjzh3-Jul-06 19:03 
AnswerRe: How to dynamically change a window class name? Pin
ovidiucucu3-Jul-06 22:33
ovidiucucu3-Jul-06 22:33 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 23:06
yjzh3-Jul-06 23:06 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 23:07
yjzh3-Jul-06 23:07 
QuestionRe: How to dynamically change a window class name? Pin
yjzh4-Jul-06 18:10
yjzh4-Jul-06 18:10 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu4-Jul-06 21:08
ovidiucucu4-Jul-06 21:08 
QuestionRe: How to dynamically change a window class name? Pin
yjzh4-Jul-06 23:40
yjzh4-Jul-06 23:40 

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.