Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Another Process Window Pin
Antony M Kancidrowski4-Feb-05 12:02
Antony M Kancidrowski4-Feb-05 12:02 
GeneralCString("hai").Format("hello"); Pin
xcavin3-Feb-05 21:30
xcavin3-Feb-05 21:30 
GeneralRe: CString("hai").Format("hello"); Pin
pc_dev3-Feb-05 22:05
pc_dev3-Feb-05 22:05 
GeneralRe: CString("hai").Format("hello"); Pin
One Stone3-Feb-05 22:14
One Stone3-Feb-05 22:14 
GeneralRe: CString("hai").Format("hello"); Pin
RChin3-Feb-05 22:43
RChin3-Feb-05 22:43 
GeneralRe: CString("hai").Format("hello"); Pin
2249173-Feb-05 23:20
2249173-Feb-05 23:20 
GeneralRe: CString("hai").Format("hello"); Pin
RChin3-Feb-05 23:27
RChin3-Feb-05 23:27 
GeneralRe: CString("hai").Format("hello"); Pin
Bob Ciora4-Feb-05 1:36
Bob Ciora4-Feb-05 1:36 
That compiles *and* runs successfully.

The problem is that CString::Format's return type is void. So that's the return type of this statement, and there doesn't seem to be any way to convert that to the LPCTSTR that AfxMessageBox expects.

It's going to take some serious obfuscation to make this work. My question is...what's wrong with a local CString variable? Like it or not, the statement itself is creating a local CString that goes out of scope after the statement executes.


Bob Ciora
GeneralRe: CString("hai").Format("hello"); Pin
2249174-Feb-05 16:21
2249174-Feb-05 16:21 
GeneralRe: CString("hai").Format("hello"); Pin
Antti Keskinen4-Feb-05 2:06
Antti Keskinen4-Feb-05 2:06 
GeneralNMAKE file format. Pin
Jijo.Raj3-Feb-05 20:59
Jijo.Raj3-Feb-05 20:59 
GeneralCString::Format(); Pin
xcavin3-Feb-05 20:29
xcavin3-Feb-05 20:29 
GeneralRe: CString::Format(); Pin
Steve Mayfield3-Feb-05 20:41
Steve Mayfield3-Feb-05 20:41 
Questionhow ADO using in MFC Dilogue Pin
syed abbdul qavi3-Feb-05 20:06
syed abbdul qavi3-Feb-05 20:06 
AnswerRe: how ADO using in MFC Dilogue Pin
zahid_ash3-Feb-05 20:12
zahid_ash3-Feb-05 20:12 
GeneralRe: how ADO using in MFC Dilogue Pin
David Crow4-Feb-05 3:49
David Crow4-Feb-05 3:49 
AnswerRe: how ADO using in MFC Dilogue Pin
BlackDice4-Feb-05 4:54
BlackDice4-Feb-05 4:54 
AnswerRe: how ADO using in MFC Dilogue Pin
Carlos Antollini4-Feb-05 8:46
Carlos Antollini4-Feb-05 8:46 
QuestionProblem in Installshield , for Creating Shortcuts? Pin
zahid_ash3-Feb-05 19:24
zahid_ash3-Feb-05 19:24 
AnswerRe: Problem in Installshield , for Creating Shortcuts? Pin
pc_dev3-Feb-05 20:52
pc_dev3-Feb-05 20:52 
Generalcall back Pin
premsridhar3-Feb-05 19:12
premsridhar3-Feb-05 19:12 
GeneralRe: call back Pin
Anthony_Yio4-Feb-05 1:09
Anthony_Yio4-Feb-05 1:09 
QuestionHow to print data from MsFlexgrid in VC++ Pin
Deepali V3-Feb-05 19:04
sussDeepali V3-Feb-05 19:04 
QuestionHow to get process id given the process name Pin
g3e3-Feb-05 18:05
g3e3-Feb-05 18:05 
AnswerRe: How to get process id given the process name Pin
Carlos Antollini4-Feb-05 8:57
Carlos Antollini4-Feb-05 8:57 

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.