Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: pass command line arguments to dll Pin
Joaquín M López Muñoz25-Feb-03 0:29
Joaquín M López Muñoz25-Feb-03 0:29 
GeneralRe: pass command line arguments to dll Pin
xxhimanshu25-Feb-03 0:48
xxhimanshu25-Feb-03 0:48 
Generalanother problem pass command line arguments to dll Pin
xxhimanshu25-Feb-03 1:06
xxhimanshu25-Feb-03 1:06 
General2 CDialog questions Pin
raner25-Feb-03 0:22
raner25-Feb-03 0:22 
GeneralRe: 2 CDialog questions Pin
Joaquín M López Muñoz25-Feb-03 0:32
Joaquín M López Muñoz25-Feb-03 0:32 
GeneralRe: 2 CDialog questions Pin
Joan M25-Feb-03 0:36
professionalJoan M25-Feb-03 0:36 
GeneralRe: 2 CDialog questions Pin
raner25-Feb-03 2:01
raner25-Feb-03 2:01 
GeneralRe: 2 CDialog questions Pin
Joan M25-Feb-03 3:04
professionalJoan M25-Feb-03 3:04 
raner wrote:
if i name all the dialog instances identically

What do you mean? the name of the variable that represents the dialog?

If you meant that:
you cannot do it because you'll reassign a new dialog to the same variable and this would generate memory leaks... (at it's best).

You must create an array of dialog variables and then assign the right one in the for clause in order to do what you want (see below)
CDlg dlgArray[4];
for(int i=0;i<4;i++)
{
dlgArray[i]=new CDlg;
dlgArray[i]->Create(...);
dlgArray[i]->ModifyStyle(0,WS_VISIBLE);
dlgArray[i]->SetWindowText(...);
}
if you want to dynamically allocate a different number of dialogs you can take a look at the wrapper CArray (easy way to generate arrays of various kind of variables).

Well, I have no idea about if you meant that or not, but I hope this helps (my english is not my best)...

PS:
Remember the "rule": always that you've used a new you must use a delete. Or what is the same, whatever you create whatever you must destroy.

Sample: delete dlgArray[i];
GeneralNew problem Pin
raner25-Feb-03 2:46
raner25-Feb-03 2:46 
GeneralRe: New problem Pin
Joan M25-Feb-03 3:06
professionalJoan M25-Feb-03 3:06 
GeneralRe: New problem Pin
raner25-Feb-03 3:53
raner25-Feb-03 3:53 
GeneralRe: New problem Pin
Joan M25-Feb-03 4:33
professionalJoan M25-Feb-03 4:33 
GeneralRe: New problem Pin
raner25-Feb-03 5:28
raner25-Feb-03 5:28 
GeneralRe: New problem Pin
Joan M25-Feb-03 6:23
professionalJoan M25-Feb-03 6:23 
GeneralRe: New problem Pin
raner27-Feb-03 5:42
raner27-Feb-03 5:42 
GeneralRe: New problem Pin
Joan M27-Feb-03 7:02
professionalJoan M27-Feb-03 7:02 
GeneralRe: New problem Pin
raner27-Feb-03 17:06
raner27-Feb-03 17:06 
GeneralRe: New problem Pin
Joan M27-Feb-03 20:00
professionalJoan M27-Feb-03 20:00 
GeneralRe: 2 CDialog questions Pin
xxhimanshu25-Feb-03 0:37
xxhimanshu25-Feb-03 0:37 
GeneralCListView Pin
ROK_RShadow25-Feb-03 0:15
ROK_RShadow25-Feb-03 0:15 
GeneralRe: CListView Pin
João Paulo Figueira25-Feb-03 0:37
professionalJoão Paulo Figueira25-Feb-03 0:37 
GeneralCalculating duration of internet connections Pin
Captain Kirk24-Feb-03 23:47
Captain Kirk24-Feb-03 23:47 
GeneralOverlapped IO with WriteFile Pin
zecodela24-Feb-03 23:28
zecodela24-Feb-03 23:28 
GeneralCHtmlView Problems!!! Pin
arunbooboo24-Feb-03 23:15
arunbooboo24-Feb-03 23:15 
GeneralRe: CHtmlView Problems!!! Pin
Big Art25-Feb-03 6:16
Big Art25-Feb-03 6:16 

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.