Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tab key not working to jump to next control Pin
Chaos Lawful2-Oct-01 20:24
Chaos Lawful2-Oct-01 20:24 
GeneralRe: Tab key not working to jump to next control Pin
Mr.Freeze2-Oct-01 20:31
Mr.Freeze2-Oct-01 20:31 
GeneralKeyboard events Pin
Ever12342-Oct-01 14:52
Ever12342-Oct-01 14:52 
GeneralRe: Keyboard events Pin
Andres Manggini3-Oct-01 8:29
Andres Manggini3-Oct-01 8:29 
GeneralRe: Keyboard events Pin
Ever12345-Oct-01 15:22
Ever12345-Oct-01 15:22 
GeneralRe: Keyboard events Pin
Andres Manggini10-Oct-01 11:36
Andres Manggini10-Oct-01 11:36 
GeneralHelp CList or? I'm lost. Pin
Jay Beckert2-Oct-01 14:49
Jay Beckert2-Oct-01 14:49 
GeneralRe: Help CList or? I'm lost. Pin
Christian Graus2-Oct-01 19:19
protectorChristian Graus2-Oct-01 19:19 
MFC container classes were written as a sropgap while STL was finalised. You should use STL over MFC container classes.

What you need here is map. A map is an associative container, so for example

map<cstring, int=""> m_map;

means that you use CStrings to index a list of integers. You can add CStrings to the list like this:

m_map["My String, could equally be a CString variable"] = 1;

Then you can add to the value like this:

m_map["My String, could equally be a CString variable"]++;

Finally, you can iterate through the list like this:

map<cstring, int="">::iterator it = m_map.begin();

for (;it != m_map.end; ++it)
{
AfxMessageBox(it.first()); // Just shows all the strings in message boxes
}

This is off the top of my head, I may have made a typo here or there, but it's fundamentally correct AFAIK.



Christian

As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.

Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
GeneralRe: Help CList or? I'm lost. Pin
Jay Beckert3-Oct-01 11:15
Jay Beckert3-Oct-01 11:15 
GeneralRe: Help CList or? I'm lost. Pin
Christian Graus3-Oct-01 11:34
protectorChristian Graus3-Oct-01 11:34 
GeneralRe: Help CList or? I'm lost. Pin
Jay Beckert3-Oct-01 11:45
Jay Beckert3-Oct-01 11:45 
GeneralRe: Help CList or? I'm lost. Pin
Christian Graus3-Oct-01 11:58
protectorChristian Graus3-Oct-01 11:58 
GeneralRe: Help CList or? I'm lost. Pin
Jay Beckert6-Oct-01 13:05
Jay Beckert6-Oct-01 13:05 
GeneralRe: Help CList or? I'm lost. Pin
Christian Graus6-Oct-01 13:13
protectorChristian Graus6-Oct-01 13:13 
GeneralRe: Help CList or? I'm lost. Pin
Jay Beckert6-Oct-01 13:26
Jay Beckert6-Oct-01 13:26 
GeneralRe: Help CList or? I'm lost. Pin
Jay Beckert9-Oct-01 15:25
Jay Beckert9-Oct-01 15:25 
GeneralRe: Help CList or? I'm lost. Pin
Christian Graus9-Oct-01 15:37
protectorChristian Graus9-Oct-01 15:37 
QuestionProperty list like visual studio?? Pin
mhowes2-Oct-01 12:31
mhowes2-Oct-01 12:31 
AnswerRe: Property list like visual studio?? Pin
Bret Faller2-Oct-01 13:21
Bret Faller2-Oct-01 13:21 
GeneralConstructors and (...) Pin
Sprudling2-Oct-01 11:39
Sprudling2-Oct-01 11:39 
GeneralRe: Constructors and (...) Pin
Tomasz Sowinski2-Oct-01 11:59
Tomasz Sowinski2-Oct-01 11:59 
GeneralRe: Constructors and (...) Pin
Sprudling2-Oct-01 12:58
Sprudling2-Oct-01 12:58 
GeneralRe: Constructors and (...) Pin
Tomasz Sowinski2-Oct-01 23:36
Tomasz Sowinski2-Oct-01 23:36 
GeneralConvert Integer to LPSTR Pin
2-Oct-01 11:14
suss2-Oct-01 11:14 
GeneralRe: Convert Integer to LPSTR Pin
Carlos Antollini2-Oct-01 11:41
Carlos Antollini2-Oct-01 11:41 

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.