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

C / C++ / MFC

 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Chuck O'Toole3-Jan-12 21:38
Chuck O'Toole3-Jan-12 21:38 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 23:12
ThatsAlok3-Jan-12 23:12 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_3-Jan-12 4:55
Vaclav_3-Jan-12 4:55 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 19:43
ThatsAlok3-Jan-12 19:43 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_4-Jan-12 7:16
Vaclav_4-Jan-12 7:16 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok5-Jan-12 2:44
ThatsAlok5-Jan-12 2:44 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_5-Jan-12 6:08
Vaclav_5-Jan-12 6:08 
Questionclass array, better understanding of it Pin
jkirkerx2-Jan-12 13:14
professionaljkirkerx2-Jan-12 13:14 
I'm working on a class array, but I thought it would structure my data different.

I'm working with this code below. I was hoping it would create a single object, with 2 internal members of [0] and [1] creating a single object uaListBoxPtrArray with 2 members [0] Tim and [1] John, Tim and John being inside uaListBoxPtrArray.

But it looks like it creates separate objects
uaListBoxPtrArray[0] which is Tim
uaListBoxPtrArray[1] which is John
and I would have to pass uaListBoxPtrArray[0], uaListBoxPtrArray[1] to a function.

I want to be able to pass the single object to a function in the future, and not separate objects. pass uaListBoxPtrArray by itself, with Time and John inside it.

Q: Is my result or implementation correct?, and that this is the correct result format for the method below?. Or do I now need to work on the constructor, to form a single object of records.

CSS
DWORD dwCount;
DB_UserAccount dbUA;
dwCount = dbUA._get_UserAccount_Listbox_Count();

// Create an Class Array Structure to hold the values
UA_Listbox **uaListBoxPtrArray;
uaListBoxPtrArray = new UA_Listbox*[dwCount];

uaListBoxPtrArray[0] = new UA_Listbox;
uaListBoxPtrArray[0]->iUserID = 47;
uaListBoxPtrArray[0]->szFirstName = L"Tim";
uaListBoxPtrArray[0]->szLastName = L"Parker";
uaListBoxPtrArray[0]->szAccountName = L"tparker";

uaListBoxPtrArray[1] = new UA_Listbox;
uaListBoxPtrArray[1]->iUserID = 48;
uaListBoxPtrArray[1]->szFirstName = L"Joe";
uaListBoxPtrArray[1]->szLastName = L"Smoe";
uaListBoxPtrArray[1]->szAccountName = L"jsmoe";

AnswerRe: class array, better understanding of it Pin
Richard MacCutchan2-Jan-12 22:02
mveRichard MacCutchan2-Jan-12 22:02 
GeneralRe: class array, better understanding of it Pin
jkirkerx3-Jan-12 7:22
professionaljkirkerx3-Jan-12 7:22 
GeneralRe: class array, better understanding of it Pin
Richard MacCutchan3-Jan-12 22:28
mveRichard MacCutchan3-Jan-12 22:28 
GeneralRe: class array, better understanding of it Pin
jkirkerx4-Jan-12 6:54
professionaljkirkerx4-Jan-12 6:54 
AnswerRe: class array, better understanding of it Pin
Stefan_Lang3-Jan-12 5:26
Stefan_Lang3-Jan-12 5:26 
GeneralRe: class array, better understanding of it Pin
jkirkerx3-Jan-12 7:24
professionaljkirkerx3-Jan-12 7:24 
GeneralRe: class array, better understanding of it Pin
Stefan_Lang3-Jan-12 22:41
Stefan_Lang3-Jan-12 22:41 
GeneralRe: class array, better understanding of it Pin
jkirkerx4-Jan-12 7:08
professionaljkirkerx4-Jan-12 7:08 
QuestionCreateThread Pin
columbos149272-Jan-12 5:14
columbos149272-Jan-12 5:14 
AnswerRe: CreateThread Pin
Richard MacCutchan2-Jan-12 6:18
mveRichard MacCutchan2-Jan-12 6:18 
AnswerRe: CreateThread Pin
Chris Losinger2-Jan-12 6:56
professionalChris Losinger2-Jan-12 6:56 
GeneralRe: CreateThread Pin
Richard MacCutchan2-Jan-12 7:31
mveRichard MacCutchan2-Jan-12 7:31 
GeneralRe: CreateThread Pin
Chris Losinger2-Jan-12 7:34
professionalChris Losinger2-Jan-12 7:34 
GeneralRe: CreateThread Pin
Richard MacCutchan2-Jan-12 21:52
mveRichard MacCutchan2-Jan-12 21:52 
AnswerRe: CreateThread Pin
Rajesh R Subramanian2-Jan-12 7:42
professionalRajesh R Subramanian2-Jan-12 7:42 
AnswerRe: CreateThread Pin
CPallini2-Jan-12 8:16
mveCPallini2-Jan-12 8:16 
QuestionWant to Do This for a Living Pin
DragonHeart3351-Jan-12 10:31
DragonHeart3351-Jan-12 10:31 

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.