Click here to Skip to main content
15,898,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to link the edit box and spin control Pin
Code-o-mat8-Dec-08 0:14
Code-o-mat8-Dec-08 0:14 
GeneralRe: How to link the edit box and spin control Pin
Member 46517418-Dec-08 0:16
Member 46517418-Dec-08 0:16 
GeneralRe: How to link the edit box and spin control Pin
Member 46517417-Dec-08 23:48
Member 46517417-Dec-08 23:48 
AnswerRe: How to link the edit box and spin control Pin
SandipG 7-Dec-08 22:46
SandipG 7-Dec-08 22:46 
AnswerRe: How to link the edit box and spin control Pin
David Crow8-Dec-08 3:25
David Crow8-Dec-08 3:25 
QuestionDraw image on other bitmap image in pocket pc Pin
~Khatri Mitesh~7-Dec-08 20:26
~Khatri Mitesh~7-Dec-08 20:26 
AnswerRe: Draw image on other bitmap image in pocket pc Pin
Code-o-mat7-Dec-08 22:12
Code-o-mat7-Dec-08 22:12 
Questioncreating dialogs in a loop Pin
K. Sushilkumar7-Dec-08 19:23
K. Sushilkumar7-Dec-08 19:23 
Hi everybody,

I am trying to create dialogs in a loop.
I am having pointer to each dialog and resource id.
Problem is while creating an object of that dialog using new operator.
As new requires the typename which i am unable to provide in a loop.

Please refer the code below.

DlgA *pDlgA;
DlgB *pDlgB;

typedef struct tagDLG_INFO
{
CDialog *pDlg;
DWORD dwDlgID;

} DLG_INFO, *P_DLG_INFO;

DLG_INFO arrDlgInfo[2] =
{
{pDlgA, IDD_A},
{pDlgB, IDD_B}
};

for (DWORD dwLoopCount = 0; dwLoopCount < 2; ++dwLoopCount)
{
arrDlgInfo[dwLoopCount].pDlg = new XXX; //(How to provide typename in a loop).
arrDlgInfo[dwLoopCount].pDlg->Create(arrDlgInfo[dwLoopCount].dwDlgID, this);
}

I tried using macros, templates, RTTI, typeinfo,
but i did'nt find any proper solution.


Thanks in advance.
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 
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 

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.