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

C / C++ / MFC

 
AnswerRe: Dynamic menu with statusbar messages. Pin
ThatsAlok3-Jan-12 19:19
ThatsAlok3-Jan-12 19:19 
GeneralRe: Dynamic menu with statusbar messages. Pin
Maximilien4-Jan-12 3:35
Maximilien4-Jan-12 3:35 
AnswerRe: Dynamic menu with statusbar messages. Pin
Randor 4-Jan-12 0:59
professional Randor 4-Jan-12 0:59 
GeneralRe: Dynamic menu with statusbar messages. Pin
Maximilien4-Jan-12 4:13
Maximilien4-Jan-12 4:13 
GeneralRe: Dynamic menu with statusbar messages. Pin
Randor 4-Jan-12 4:31
professional Randor 4-Jan-12 4:31 
GeneralRe: Dynamic menu with statusbar messages. Pin
Maximilien4-Jan-12 5:22
Maximilien4-Jan-12 5:22 
JokeRe: Dynamic menu with statusbar messages. Pin
Randor 4-Jan-12 5:27
professional Randor 4-Jan-12 5:27 
QuestionConvert CString to CObject VC 6.0 MFC SOLVED Pin
Vaclav_3-Jan-12 8:25
Vaclav_3-Jan-12 8:25 
I would like to pass a CString as a pHint parameter, in UpdateAllViews.
Since CString is not derived from CObject the following code gets rejected by compiler with the criptic error message.

CObject *pHint;
pHint = reinterpret_cast<CObject*>(strEdit);

E:\0 OpenLog\V1\TCC\TCCDoc.cpp(999) : error C2440: 'reinterpret_cast' : cannot convert from 'class CString' to 'class CObject *'
Conversion requires a constructor or user-defined-conversion operator, which can't be used by const_cast or reinterpret_cast

I am cluless as far as what kind of constructor or how to code "user-defined-conversion operator".
Help would be appreciated, as always.

Thanks
Vaclav

Dummy forgot to utilize document/view and let the view get the string from the associated document.No need to pass pHint anything.

-- modified 3-Jan-12 15:12pm.
AnswerRe: Convert CString to CObject VC 6.0 MFC Pin
CPallini3-Jan-12 8:31
mveCPallini3-Jan-12 8:31 
GeneralRe: Convert CString to CObject VC 6.0 MFC Pin
Vaclav_3-Jan-12 8:48
Vaclav_3-Jan-12 8:48 
GeneralRe: Convert CString to CObject VC 6.0 MFC Pin
Vaclav_3-Jan-12 8:49
Vaclav_3-Jan-12 8:49 
GeneralRe: Convert CString to CObject VC 6.0 MFC Pin
ThatsAlok3-Jan-12 19:16
ThatsAlok3-Jan-12 19:16 
QuestionCheck if a window is hidden by another window Pin
Member 29654713-Jan-12 5:48
Member 29654713-Jan-12 5:48 
AnswerRe: Check if a window is hidden by another window Pin
Richard Andrew x643-Jan-12 5:57
professionalRichard Andrew x643-Jan-12 5:57 
AnswerRe: Check if a window is hidden by another window Pin
Randor 3-Jan-12 6:42
professional Randor 3-Jan-12 6:42 
AnswerRe: Check if a window is hidden by another window Pin
Albert Holguin4-Jan-12 9:39
professionalAlbert Holguin4-Jan-12 9:39 
QuestionThread sync Pin
columbos149272-Jan-12 20:05
columbos149272-Jan-12 20:05 
GeneralRe: Thread sync Pin
Randor 2-Jan-12 20:20
professional Randor 2-Jan-12 20:20 
GeneralRe: Thread sync Pin
columbos149272-Jan-12 20:29
columbos149272-Jan-12 20:29 
GeneralRe: Thread sync Pin
Randor 2-Jan-12 21:01
professional Randor 2-Jan-12 21:01 
AnswerRe: Thread sync Pin
Bob Ciora4-Jan-12 1:06
Bob Ciora4-Jan-12 1:06 
GeneralRe: Thread sync Pin
columbos149274-Jan-12 1:26
columbos149274-Jan-12 1:26 
AnswerRe: Thread sync Pin
JackDingler4-Jan-12 12:19
JackDingler4-Jan-12 12:19 
QuestionDLL Questions Pin
Richard Andrew x642-Jan-12 17:19
professionalRichard Andrew x642-Jan-12 17:19 
AnswerRe: DLL Questions Pin
Rajesh R Subramanian2-Jan-12 17:41
professionalRajesh R Subramanian2-Jan-12 17: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.