Click here to Skip to main content
15,884,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: sort of dumb question about memory allocation Pin
Mark Salsbery15-Oct-06 8:14
Mark Salsbery15-Oct-06 8:14 
QuestionVC6: How do I execute an exe contained in my resources? Pin
tssyf14-Oct-06 14:17
tssyf14-Oct-06 14:17 
AnswerRe: VC6: How do I execute an exe contained in my resources? Pin
Gerald Schwab14-Oct-06 15:07
Gerald Schwab14-Oct-06 15:07 
GeneralRe: VC6: How do I execute an exe contained in my resources? Pin
tssyf14-Oct-06 15:14
tssyf14-Oct-06 15:14 
GeneralRe: VC6: How do I execute an exe contained in my resources? Pin
Gerald Schwab14-Oct-06 16:14
Gerald Schwab14-Oct-06 16:14 
AnswerRe: VC6: How do I execute an exe contained in my resources? Pin
Hamid_RT16-Oct-06 9:03
Hamid_RT16-Oct-06 9:03 
QuestionTale of two pointers [modified] Pin
Oliver12314-Oct-06 11:50
Oliver12314-Oct-06 11:50 
AnswerRe: Tale of two pointers [modified] Pin
Mark Salsbery14-Oct-06 12:03
Mark Salsbery14-Oct-06 12:03 
The compiler is unable to do a downcast like this. It has no way of knowing it's ok to
convert a CWnd pointer to a CListBox pointer (unless RTTI is used - see below).

If you use RTTI (Run-time type information) you can use:

CListBox* pList2 = dynamic_cast<CListBox*>(GetDlgItem(IDC_LIST_Start));
if (pList2)
   pList2->AddString("XYZ"); 

or with/without RTTI use:

CListBox* pList2 = static_cast<CListBox*>(GetDlgItem(IDC_LIST_Start));
pList2->AddString("XYZ"); 



Either way, if you are using the control often in the dialog class it may be easier to add
a control object to the class instead Smile | :)

edit: ACK sorry I'm an html idiot - can't use < and > LOL
this code should look better!

Mark




-- modified at 18:18 Saturday 14th October, 2006
AnswerRe: Tale of two pointers Pin
10011000100101101000014-Oct-06 12:18
10011000100101101000014-Oct-06 12:18 
AnswerRe: Tale of two pointers Pin
Hamid_RT14-Oct-06 19:13
Hamid_RT14-Oct-06 19:13 
QuestionCompatibility between Java and VC++ in socket programming Pin
lchild38514-Oct-06 9:52
lchild38514-Oct-06 9:52 
AnswerRe: Compatibility between Java and VC++ in socket programming Pin
Mark Salsbery14-Oct-06 10:03
Mark Salsbery14-Oct-06 10:03 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
lchild38516-Oct-06 7:58
lchild38516-Oct-06 7:58 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
Mark Salsbery16-Oct-06 8:02
Mark Salsbery16-Oct-06 8:02 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
lchild38519-Oct-06 8:57
lchild38519-Oct-06 8:57 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
Mark Salsbery19-Oct-06 9:55
Mark Salsbery19-Oct-06 9:55 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
hapc19-Oct-06 16:48
hapc19-Oct-06 16:48 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
Mark Salsbery19-Oct-06 17:06
Mark Salsbery19-Oct-06 17:06 
GeneralRe: Compatibility between Java and VC++ in socket programming Pin
Mark Salsbery19-Oct-06 17:09
Mark Salsbery19-Oct-06 17:09 
QuestionCopy part of an image to clipboard Pin
Yaron Abershitz14-Oct-06 7:45
Yaron Abershitz14-Oct-06 7:45 
AnswerRe: Copy part of an image to clipboard Pin
Mark Salsbery14-Oct-06 9:57
Mark Salsbery14-Oct-06 9:57 
GeneralRe: Copy part of an image to clipboard Pin
Yaron Abershitz15-Oct-06 5:17
Yaron Abershitz15-Oct-06 5:17 
GeneralRe: Copy part of an image to clipboard Pin
Mark Salsbery15-Oct-06 7:54
Mark Salsbery15-Oct-06 7:54 
QuestionBitmaps Pin
Waldermort14-Oct-06 6:45
Waldermort14-Oct-06 6:45 
AnswerRe: Bitmaps Pin
Mark Salsbery14-Oct-06 7:06
Mark Salsbery14-Oct-06 7:06 

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.