Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTrouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 5:45
Cold_Fearing_Bird2-Jun-11 5:45 
AnswerRe: Trouble with C macro '#' Pin
Geoff Williams2-Jun-11 6:33
Geoff Williams2-Jun-11 6:33 
AnswerRe: Trouble with C macro '#' Pin
MicroVirus2-Jun-11 7:45
MicroVirus2-Jun-11 7:45 
GeneralRe: Trouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 16:20
Cold_Fearing_Bird2-Jun-11 16:20 
GeneralRe: Trouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 17:07
Cold_Fearing_Bird2-Jun-11 17:07 
AnswerRe: Trouble with C macro '#' Pin
వేంకటనారాయణ(venkatmakam)2-Jun-11 19:41
వేంకటనారాయణ(venkatmakam)2-Jun-11 19:41 
QuestionMFC Passing a string from a thread then printing out in a edit box not working Pin
kosacid2-Jun-11 0:25
kosacid2-Jun-11 0:25 
QuestionRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow2-Jun-11 4:19
David Crow2-Jun-11 4:19 
kosacid wrote:
m_Port = atoi(PortNumber);

Is m_Port a pointer?

kosacid wrote:
AfxBeginThread( ServerEXE,(LPVOID)m_Port, THREAD_PRIORITY_NORMAL);
Why are you casting an int to a pointer? If m_Port is a global int, you'd need something like:

AfxBeginThread(ServerEXE, (LPVOID) &m_Port, THREAD_PRIORITY_NORMAL);


kosacid wrote:
int host_port = (int)param;

This does not look right. If param is supposed to be treated as a pointer to an int, you'd need:

int host_port = *((int *) param);
or
int *host_port = (int *) param;
Also, why are you having the secondary thread interact with a UI element? Only the primary thread (the one that owns the UI element) should do that.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather


AnswerRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
kosacid2-Jun-11 7:12
kosacid2-Jun-11 7:12 
AnswerRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow2-Jun-11 7:39
David Crow2-Jun-11 7:39 
GeneralRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
kosacid2-Jun-11 22:51
kosacid2-Jun-11 22:51 
GeneralRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow3-Jun-11 3:05
David Crow3-Jun-11 3:05 
QuestionWhere can I find atlimage.h ? Pin
_Flaviu1-Jun-11 21:10
_Flaviu1-Jun-11 21:10 
AnswerRe: Where can I find atlimage.h ? Pin
vishalgpt1-Jun-11 22:14
vishalgpt1-Jun-11 22:14 
GeneralRe: Where can I find atlimage.h ? Pin
_Flaviu1-Jun-11 22:34
_Flaviu1-Jun-11 22:34 
GeneralRe: Where can I find atlimage.h ? Pin
vishalgpt1-Jun-11 22:47
vishalgpt1-Jun-11 22:47 
GeneralRe: Where can I find atlimage.h ? Pin
_Flaviu2-Jun-11 0:36
_Flaviu2-Jun-11 0:36 
QuestionStrange Font Problem in Edit Control [SOLVED] Pin
vishalgpt1-Jun-11 16:43
vishalgpt1-Jun-11 16:43 
JokeRe: Strange Font Problem in Edit Control Pin
Albert Holguin1-Jun-11 17:24
professionalAlbert Holguin1-Jun-11 17:24 
GeneralRe: Strange Font Problem in Edit Control Pin
vishalgpt1-Jun-11 18:31
vishalgpt1-Jun-11 18:31 
GeneralRe: Strange Font Problem in Edit Control Pin
Albert Holguin1-Jun-11 18:32
professionalAlbert Holguin1-Jun-11 18:32 
AnswerRe: Strange Font Problem in Edit Control Pin
ShilpiP1-Jun-11 18:45
ShilpiP1-Jun-11 18:45 
GeneralRe: Strange Font Problem in Edit Control Pin
vishalgpt1-Jun-11 19:00
vishalgpt1-Jun-11 19:00 
GeneralRe: Strange Font Problem in Edit Control Pin
ShilpiP1-Jun-11 19:59
ShilpiP1-Jun-11 19:59 
GeneralRe: Strange Font Problem in Edit Control Pin
ThatsAlok1-Jun-11 20:09
ThatsAlok1-Jun-11 20:09 

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.