Click here to Skip to main content
16,005,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Select text inside edit box Pin
marcomars9-Jun-04 3:23
marcomars9-Jun-04 3:23 
GeneralRe: Select text inside edit box Pin
Andrew Quinn AUS9-Jun-04 3:56
Andrew Quinn AUS9-Jun-04 3:56 
GeneralRe: Select text inside edit box Pin
marcomars9-Jun-04 4:36
marcomars9-Jun-04 4:36 
GeneralRe: Select text inside edit box Pin
David Crow9-Jun-04 3:13
David Crow9-Jun-04 3:13 
GeneralRe: Select text inside edit box Pin
Ravi Bhavnani9-Jun-04 4:33
professionalRavi Bhavnani9-Jun-04 4:33 
QuestionConverting Integer to POSITION? Pin
sugumar9-Jun-04 2:06
sugumar9-Jun-04 2:06 
AnswerRe: Converting Integer to POSITION? Pin
Mike Dimmick9-Jun-04 2:44
Mike Dimmick9-Jun-04 2:44 
AnswerRe: Converting Integer to POSITION? Pin
Diddy9-Jun-04 3:00
Diddy9-Jun-04 3:00 
A POSITION is like an iterator for a collection - its not synomous with an integer.

The CTypedPtrMap will be keyed by what ever you templateized it on - looking at this a string.

So you can find your CContact based on a CSring easily, which is the key into the map.

How did you insert into the map?

Did you insert all the keys into m_screenName, then insert each CContact into the map based on the key?

If so, you can do a GetText on the combo to get the text for item iIndex, then use that look up in the map.

CString str;
str = m_screenName.GetText(iIndex);

CContact* p = NULL;
BOOL b = m_Contacts.Lookup(str, p);

etc

If not, the only thing u can do is to advance around the map until u hit the position at iIndex:

POSTION pos = m_Contacts.GetStartPosition();

int nElement = 0;
while(pos != NULL && nElement++ <= iIndex)
{
pos = m_Contacts.GetNextAssoc(pos, strKey, pContact);
}

You get the idea - iterate around the map until you get to element iIndex.
GeneralTo Pause a Thread Pin
cberam9-Jun-04 1:28
cberam9-Jun-04 1:28 
GeneralRe: To Pause a Thread Pin
jmkhael9-Jun-04 2:55
jmkhael9-Jun-04 2:55 
GeneralRe: To Pause a Thread Pin
cberam10-Jun-04 2:04
cberam10-Jun-04 2:04 
GeneralRe: To Pause a Thread Pin
palbano9-Jun-04 5:57
palbano9-Jun-04 5:57 
GeneralRe: To Pause a Thread Pin
cberam10-Jun-04 2:04
cberam10-Jun-04 2:04 
Generaldisplaying window on checking password Pin
Anonymous9-Jun-04 1:10
Anonymous9-Jun-04 1:10 
GeneralRe: displaying window on checking password Pin
Diddy9-Jun-04 1:54
Diddy9-Jun-04 1:54 
GeneralRe: displaying window on checking password Pin
David Crow9-Jun-04 3:18
David Crow9-Jun-04 3:18 
Generalproblem with PreTranslateMsg and Tab Order Pin
YaronNir8-Jun-04 23:37
YaronNir8-Jun-04 23:37 
GeneralRe: problem with PreTranslateMsg and Tab Order Pin
YaronNir8-Jun-04 23:53
YaronNir8-Jun-04 23:53 
Generalpbs with DLLs... Pin
JRacle8-Jun-04 23:28
JRacle8-Jun-04 23:28 
GeneralBack Ground color of a print preview window Pin
Thanvir Hussain8-Jun-04 22:51
Thanvir Hussain8-Jun-04 22:51 
GeneralRe: Back Ground color of a print preview window Pin
Roger Allen8-Jun-04 23:46
Roger Allen8-Jun-04 23:46 
Generalthe release version do not work properly Pin
mujun8-Jun-04 22:43
mujun8-Jun-04 22:43 
GeneralRe: the release version do not work properly Pin
David Crow9-Jun-04 3:23
David Crow9-Jun-04 3:23 
GeneralRe: the release version do not work properly Pin
mujun9-Jun-04 14:26
mujun9-Jun-04 14:26 
GeneralWait Pin
Anonymous8-Jun-04 22:00
Anonymous8-Jun-04 22: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.