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

C / C++ / MFC

 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Yuriy200330-Dec-06 12:46
Yuriy200330-Dec-06 12:46 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Mark Salsbery30-Dec-06 12:55
Mark Salsbery30-Dec-06 12:55 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Mark Salsbery5-Jan-07 14:18
Mark Salsbery5-Jan-07 14:18 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Yuriy20036-Jan-07 8:36
Yuriy20036-Jan-07 8:36 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Mark Salsbery6-Jan-07 11:03
Mark Salsbery6-Jan-07 11:03 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Yuriy20036-Jan-07 11:56
Yuriy20036-Jan-07 11:56 
GeneralRe: GetDIBits() works incorrectly with printer's DC Pin
Mark Salsbery6-Jan-07 12:05
Mark Salsbery6-Jan-07 12:05 
QuestionCMap [modified] Pin
devvvy29-Dec-06 14:44
devvvy29-Dec-06 14:44 
I made a few futile attempts to get CMap working ... Basically, I need:

Key CString
Value CString

What I did... after readingthis articlewas:

1. Declaration:
CMap<cstring, lpctstr,="" cstring,="" lpctstr=""> m_Result;

2. Adding elements/association:

CString sKey;
CString sVal;
m_Result.SetAt((LPCTSTR) &sKey, (LPCTSTR) &sVal);


3. *trying to* access elements
CString csVal;

I tried:
csVal = m_Result[(LPCTSTR) &csKey];

I also tried:
bSuccess = m_Result.Lookup(csKey, csVal);

The problem is, csVal always returns "nothing" (i.e. an empty/blank string)...

4. I've already implemented HashKey

<br />
inline UINT AFXAPI HashKey(const CString& str)<br />
{<br />
	...<br />
<br />
  return nHash;     // or any other algorithm to convert a CString to a number<br />
}<br />
<br />
<br />
inline UINT AFXAPI HashKey(CString& str)<br />
{<br />
	...<br />
<br />
  return nHash;     // or any other algorithm to convert a CString to a number<br />
}<br />



MSDN
REF 1 CMap Lookup[^] REF 2 CMap[^]
REF 3 Sample download MFC Collection classes[^]

Code Project
humm... [^]


-- modified at 20:52 Friday 29th December, 2006

Norman Fung

AnswerRe: CMap Pin
Blake Miller2-Jan-07 11:01
Blake Miller2-Jan-07 11:01 
QuestionHow to Detect the Users CD Rom drive Pin
Larry Mills Sr29-Dec-06 13:25
Larry Mills Sr29-Dec-06 13:25 
AnswerRe: How to Detect the Users CD Rom drive Pin
bolivar12329-Dec-06 17:52
bolivar12329-Dec-06 17:52 
AnswerRe: How to Detect the Users CD Rom drive Pin
Gary R. Wheeler30-Dec-06 3:34
Gary R. Wheeler30-Dec-06 3:34 
QuestionWay to tell which process last wrote to a file? Pin
RDarrylR29-Dec-06 12:50
RDarrylR29-Dec-06 12:50 
AnswerRe: Way to tell which process last wrote to a file? Pin
Garth J Lancaster29-Dec-06 13:23
professionalGarth J Lancaster29-Dec-06 13:23 
GeneralRe: Way to tell which process last wrote to a file? Pin
RDarrylR29-Dec-06 13:56
RDarrylR29-Dec-06 13:56 
AnswerRe: Way to tell which process last wrote to a file? Pin
Cristian Amarie29-Dec-06 22:44
Cristian Amarie29-Dec-06 22:44 
GeneralRe: Way to tell which process last wrote to a file? Pin
RDarrylR30-Dec-06 3:23
RDarrylR30-Dec-06 3:23 
AnswerRe: Way to tell which process last wrote to a file? Pin
Hamid_RT30-Dec-06 5:57
Hamid_RT30-Dec-06 5:57 
GeneralRe: Way to tell which process last wrote to a file? Pin
Cristian Amarie30-Dec-06 7:04
Cristian Amarie30-Dec-06 7:04 
QuestionMessage Removed Pin
29-Dec-06 11:31
Armond Sarkisian29-Dec-06 11:31 
AnswerRe: Opening a dialogue window Pin
Hamid_RT29-Dec-06 17:10
Hamid_RT29-Dec-06 17:10 
AnswerRe: Opening a dialogue window Pin
Joan M30-Dec-06 2:34
professionalJoan M30-Dec-06 2:34 
QuestionDriver installation checking Pin
RomTibi29-Dec-06 10:57
RomTibi29-Dec-06 10:57 
AnswerRe: Driver installation checking Pin
Ralf Lohmueller29-Dec-06 14:53
Ralf Lohmueller29-Dec-06 14:53 
GeneralRe: Driver installation checking Pin
RomTibi29-Dec-06 19:25
RomTibi29-Dec-06 19:25 

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.