Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Writing a C++ DLL with VB-compatibility in mind Pin
l a u r e n1-Mar-01 3:28
l a u r e n1-Mar-01 3:28 
GeneralRe: Writing a C++ DLL with VB-compatibility in mind Pin
#realJSOP1-Mar-01 3:33
professional#realJSOP1-Mar-01 3:33 
GeneralRe: Writing a C++ DLL with VB-compatibility in mind Pin
l a u r e n1-Mar-01 3:41
l a u r e n1-Mar-01 3:41 
GeneralRe: Writing a C++ DLL with VB-compatibility in mind Pin
Chris Losinger1-Mar-01 3:57
professionalChris Losinger1-Mar-01 3:57 
GeneralRun a program Pin
1-Mar-01 1:11
suss1-Mar-01 1:11 
GeneralRe: Run a program Pin
1-Mar-01 1:15
suss1-Mar-01 1:15 
GeneralCMapStringToString Pin
28-Feb-01 23:51
suss28-Feb-01 23:51 
GeneralRe: CMapStringToString Pin
Steve Driessens2-Mar-01 3:05
Steve Driessens2-Mar-01 3:05 
G'day Jane,

I don't think you can do this as the CMapStringToString class doesn't
have an '=' operator.

If you derived you own class and added an '=' operator, you'd need to
pass it two values (a key and string) which I don't think would work.
(BTW: I'd be perfectly happy to be proved wrong here. Smile | :) )

Do you only need to do this for a single CMapStringToString object?
Maybe you could derive a class from CMapStringToString which initializes
itself in the constructor from a couple of static text arrays.

Something like this...

static char* lpszKeys[] = {_T("Key1"), _T("Key2"), NULL};
static char* lpszText[] = {_T("Text1"), _T("Text2"), NULL};

CMyMapStringToString::CMyMapStringToString()
{
    int nPos = 0;
    while(lpszKeys[nPos] != NULL){
        SetAt(lpszKeys[nPos], lpszText[nPos]);
        nPos++;
    }
}


This might get a bit tedious if you have several different
CMapStringToString objects to self-initialize though.

Just a thought.

Steve

--------------------------------------
Steve Driessens
www.resortsoftware.com
GeneralNeed help with Dialogs... Pin
28-Feb-01 23:35
suss28-Feb-01 23:35 
GeneralRe: Need help with Dialogs... Pin
l a u r e n28-Feb-01 23:38
l a u r e n28-Feb-01 23:38 
GeneralThreading in vc Pin
28-Feb-01 22:32
suss28-Feb-01 22:32 
GeneralRe: Threading in vc Pin
l a u r e n28-Feb-01 23:34
l a u r e n28-Feb-01 23:34 
GeneralRe: Threading in vc Pin
Erik Funkenbusch1-Mar-01 13:09
Erik Funkenbusch1-Mar-01 13:09 
GeneralRe: Threading in vc - solution Pin
1-Mar-01 13:17
suss1-Mar-01 13:17 
GeneralRe: How I can do it !!! Pin
l a u r e n28-Feb-01 23:36
l a u r e n28-Feb-01 23:36 
GeneralRe: How I can do it !!! Pin
28-Feb-01 23:20
suss28-Feb-01 23:20 
GeneralRe: How I can do it !!! Pin
Ahmad28-Feb-01 23:07
Ahmad28-Feb-01 23:07 
GeneralRe: How I can do it !!! Pin
28-Feb-01 22:30
suss28-Feb-01 22:30 
QuestionHow to Manage CTreeCtrl ??? Pin
Ariel28-Feb-01 19:27
Ariel28-Feb-01 19:27 
AnswerRe: How to Manage CTreeCtrl ??? Pin
l a u r e n28-Feb-01 23:41
l a u r e n28-Feb-01 23:41 
GeneralRe: How to Manage CTreeCtrl ??? Pin
Le Ridder Noir1-Mar-01 3:42
Le Ridder Noir1-Mar-01 3:42 
QuestionHow to Get the Date Value from CMonthCalCtrl and CDateTimeCtrl ? Pin
Ariel28-Feb-01 19:26
Ariel28-Feb-01 19:26 
AnswerRe: How to Get the Date Value from CMonthCalCtrl and CDateTimeCtrl ? Pin
1-Mar-01 10:01
suss1-Mar-01 10:01 
GeneralCOM , MFC and Timer Pin
28-Feb-01 18:28
suss28-Feb-01 18:28 
GeneralRe: COM , MFC and Timer Pin
Tim Deveaux1-Mar-01 4:34
Tim Deveaux1-Mar-01 4:34 

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.