Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Concept/example for virtual list Pin
David Crow7-Jan-09 5:33
David Crow7-Jan-09 5:33 
GeneralRe: Concept/example for virtual list Pin
nobaq7-Jan-09 6:00
nobaq7-Jan-09 6:00 
AnswerRe: Concept/example for virtual list Pin
Maximilien7-Jan-09 5:42
Maximilien7-Jan-09 5:42 
GeneralRe: Concept/example for virtual list Pin
nobaq7-Jan-09 7:17
nobaq7-Jan-09 7:17 
Questionimapi2 cd name Pin
meme817-Jan-09 3:52
meme817-Jan-09 3:52 
Questionwhy SubclassWindow fails? [modified] Pin
SanjaySMK7-Jan-09 3:51
SanjaySMK7-Jan-09 3:51 
AnswerRe: why SubclassWindow fails? Pin
Code-o-mat7-Jan-09 5:05
Code-o-mat7-Jan-09 5:05 
Questionreplace CMapStringToOb by standard C Pin
RedSonja7-Jan-09 2:28
RedSonja7-Jan-09 2:28 
I have inherited some old code. Our sadistic project management has decided to forbid use of MFC in the hope of being more portable. I replaced all the CStrings with string, now I have got some tricky parts left.
The guy who wrote this used CMapStringToOb in what seems to be a very clever way and I think it is a fine piece of code. But I have to replace it - but with what? I can't use CObjects any more.

I have things like this:
CString csMsgID;
pCommand SACommand; //(which is a CObject)
CMapStringToOb m_knownCommands;
m_knownCommands.Lookup((LPCTSTR)csMsgID, (CObject*&) pCommand)
m_knownCommands.SetAt((LPCTSTR)csMsgID, apFba[i]);

I suppose I could plod through and dream up something complicated and slow, but does anyone have an idea how to do this in an elegant manner? Is this what the type Object is for?

-------------
Bibo ergo sum

AnswerRe: replace CMapStringToOb by standard C Pin
CPallini7-Jan-09 2:54
mveCPallini7-Jan-09 2:54 
GeneralRe: replace CMapStringToOb by standard C Pin
RedSonja7-Jan-09 2:58
RedSonja7-Jan-09 2:58 
GeneralRe: replace CMapStringToOb by standard C Pin
Cedric Moonen7-Jan-09 3:04
Cedric Moonen7-Jan-09 3:04 
GeneralRe: replace CMapStringToOb by standard C Pin
CPallini7-Jan-09 3:09
mveCPallini7-Jan-09 3:09 
GeneralRe: replace CMapStringToOb by standard C Pin
RedSonja7-Jan-09 3:26
RedSonja7-Jan-09 3:26 
GeneralRe: replace CMapStringToOb by standard C Pin
Cedric Moonen7-Jan-09 3:32
Cedric Moonen7-Jan-09 3:32 
GeneralRe: replace CMapStringToOb by standard C Pin
RedSonja7-Jan-09 3:36
RedSonja7-Jan-09 3:36 
QuestionXML Writer Pin
amit.code7-Jan-09 1:48
amit.code7-Jan-09 1:48 
AnswerRe: XML Writer Pin
Stuart Dootson7-Jan-09 2:02
professionalStuart Dootson7-Jan-09 2:02 
AnswerRe: XML Writer Pin
CPallini7-Jan-09 2:08
mveCPallini7-Jan-09 2:08 
GeneralRe: XML Writer Pin
Stuart Dootson7-Jan-09 3:32
professionalStuart Dootson7-Jan-09 3:32 
GeneralRe: XML Writer Pin
CPallini7-Jan-09 3:49
mveCPallini7-Jan-09 3:49 
GeneralRe: XML Writer Pin
amit.code8-Jan-09 18:09
amit.code8-Jan-09 18:09 
GeneralRe: XML Writer Pin
CPallini8-Jan-09 21:23
mveCPallini8-Jan-09 21:23 
QuestionManipulating BITMAPS Pin
KASR17-Jan-09 1:08
KASR17-Jan-09 1:08 
AnswerRe: Manipulating BITMAPS Pin
CPallini7-Jan-09 1:39
mveCPallini7-Jan-09 1:39 
JokeRe: Manipulating BITMAPS Pin
Luc Pattyn7-Jan-09 2:00
sitebuilderLuc Pattyn7-Jan-09 2:00 

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.