Click here to Skip to main content
15,910,886 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncreating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 19:23
K. Sushilkumar7-Dec-08 19:23 
AnswerRe: creating dialogs in a loop Pin
sushrut837-Dec-08 19:43
sushrut837-Dec-08 19:43 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 20:17
K. Sushilkumar7-Dec-08 20:17 
AnswerRe: creating dialogs in a loop Pin
Randor 7-Dec-08 20:16
professional Randor 7-Dec-08 20:16 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 20:21
K. Sushilkumar7-Dec-08 20:21 
GeneralRe: creating dialogs in a loop Pin
KarstenK7-Dec-08 21:02
mveKarstenK7-Dec-08 21:02 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 22:19
K. Sushilkumar7-Dec-08 22:19 
GeneralRe: creating dialogs in a loop Pin
Randor 7-Dec-08 21:28
professional Randor 7-Dec-08 21:28 
Perhaps I fail to see what problem you are having. The solution I gave you will work for 2 dialogs or 20 dialogs if you modify it to a switch statement. In addition it should work for any CDialog derived class. What exactly is the problem you are having?

Here are some points:

1.) If your dialogs have a unique dialog resource ID associated with each CDialog derived class then you can easily identify which dialog belongs to which class.
2.) You can assign the CDialog pointer in your DLG_INFO structure to your derived class using the dynamic_cast operator[^] or the STATIC_DOWNCAST[^] macro.
3.) You can regain the type information by upcasting the CDialog pointer to access members.

Maybe I do not fully understand the problems you are having, if this is the case please clarify.

Best Wishes,
-David Delaune
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 21:35
K. Sushilkumar7-Dec-08 21:35 
GeneralRe: creating dialogs in a loop Pin
Randor 7-Dec-08 22:38
professional Randor 7-Dec-08 22:38 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 22:58
K. Sushilkumar7-Dec-08 22:58 
AnswerRe: creating dialogs in a loop Pin
Iain Clarke, Warrior Programmer8-Dec-08 0:42
Iain Clarke, Warrior Programmer8-Dec-08 0:42 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar8-Dec-08 1:46
K. Sushilkumar8-Dec-08 1:46 
GeneralRe: creating dialogs in a loop Pin
Iain Clarke, Warrior Programmer8-Dec-08 2:11
Iain Clarke, Warrior Programmer8-Dec-08 2:11 
AnswerRe: creating dialogs in a loop Pin
David Crow8-Dec-08 3:51
David Crow8-Dec-08 3:51 
QuestionHook on a HWND Pin
Tony Pottier7-Dec-08 19:22
Tony Pottier7-Dec-08 19:22 
AnswerRe: Hook on a HWND Pin
Malli_S7-Dec-08 19:40
Malli_S7-Dec-08 19:40 
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:15
Tony Pottier7-Dec-08 20:15 
GeneralRe: Hook on a HWND Pin
Randor 7-Dec-08 20:34
professional Randor 7-Dec-08 20:34 
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:45
Tony Pottier7-Dec-08 20:45 
AnswerRe: Hook on a HWND Pin
Randor 7-Dec-08 19:49
professional Randor 7-Dec-08 19:49 
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:16
Tony Pottier7-Dec-08 20:16 
QuestionAccess system Folder Pin
john56327-Dec-08 18:59
john56327-Dec-08 18:59 
AnswerRe: Access system Folder Pin
enhzflep7-Dec-08 19:20
enhzflep7-Dec-08 19:20 
GeneralRe: Access system Folder Pin
john56328-Dec-08 0:09
john56328-Dec-08 0:09 

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.