Click here to Skip to main content
16,006,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMultiple Splitters in WTL Pin
Leo Smith5-Oct-01 11:22
Leo Smith5-Oct-01 11:22 
QuestionHas anybody programmed SNMP? Pin
Kelly Herald5-Oct-01 10:57
Kelly Herald5-Oct-01 10:57 
AnswerRe: Has anybody programmed SNMP? Pin
Masaaki Onishi5-Oct-01 15:21
Masaaki Onishi5-Oct-01 15:21 
QuestionHow can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
youssef5-Oct-01 10:23
youssef5-Oct-01 10:23 
AnswerRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Christian Graus5-Oct-01 10:59
protectorChristian Graus5-Oct-01 10:59 
AnswerRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Paolo Messina5-Oct-01 11:01
professionalPaolo Messina5-Oct-01 11:01 
AnswerRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Leo Smith5-Oct-01 11:05
Leo Smith5-Oct-01 11:05 
AnswerRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Fazlul Kabir5-Oct-01 11:27
Fazlul Kabir5-Oct-01 11:27 
I would use MFC's CPtrArray to store ptrs to your structs.

Thus, if you have two objects of a struct called MyStruct, like this:

MyStruct struct1, struct2;

You can declare a CPtrArray object and then add them like:

CPtrArray m_Array;
m_Array.Add(&struct1);
m_Array.Add(&struct2);

You can get the structs back later like:

MyStruct* pStruct1 = (MyStruct*)m_Array.GetAt(0);
MyStruct* pStruct2 = (MyStruct*)m_Array.GetAt(1);


Hope this helps.

// Fazlul



Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com

GeneralRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Christian Graus5-Oct-01 16:53
protectorChristian Graus5-Oct-01 16:53 
GeneralRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Fazlul Kabir6-Oct-01 11:28
Fazlul Kabir6-Oct-01 11:28 
GeneralRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Christian Graus6-Oct-01 11:51
protectorChristian Graus6-Oct-01 11:51 
GeneralRe: How can I do a Dynamic Array like CByteArray for a STRUCT array ? Pin
Fazlul Kabir6-Oct-01 18:06
Fazlul Kabir6-Oct-01 18:06 
GeneralCListView with a Timer Pin
daniel995-Oct-01 10:14
daniel995-Oct-01 10:14 
GeneralRe: CListView with a Timer Pin
Andres Manggini5-Oct-01 10:43
Andres Manggini5-Oct-01 10:43 
QuestionHow do I use CButton::Create() to make a push button check box? Pin
Bart-Man5-Oct-01 10:12
Bart-Man5-Oct-01 10:12 
AnswerRe: How do I use CButton::Create() to make a push button check box? Pin
Fazlul Kabir5-Oct-01 10:17
Fazlul Kabir5-Oct-01 10:17 
GeneralRe: How do I use CButton::Create() to make a push button check box? Pin
Bart-Man5-Oct-01 10:22
Bart-Man5-Oct-01 10:22 
AnswerFinal Solution Pin
Bart-Man5-Oct-01 10:55
Bart-Man5-Oct-01 10:55 
GeneralConnect() timeout Pin
Alex Griffing5-Oct-01 9:27
Alex Griffing5-Oct-01 9:27 
GeneralOverriding CWndClassInfo in ATL Pin
5-Oct-01 8:05
suss5-Oct-01 8:05 
GeneralDisplay attributes Pin
john john mackey5-Oct-01 7:32
john john mackey5-Oct-01 7:32 
GeneralRe: Display attributes Pin
5-Oct-01 7:36
suss5-Oct-01 7:36 
GeneralDisabling item in CListCtrl Pin
5-Oct-01 7:02
suss5-Oct-01 7:02 
GeneralRe: Disabling item in CListCtrl Pin
Masaaki Onishi5-Oct-01 9:59
Masaaki Onishi5-Oct-01 9:59 
GeneralCreating window like Taskbar Pin
5-Oct-01 6:57
suss5-Oct-01 6:57 

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.