Click here to Skip to main content
15,567,442 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTrouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 6:45
Cold_Fearing_Bird2-Jun-11 6:45 
AnswerRe: Trouble with C macro '#' Pin
Geoff Williams2-Jun-11 7:33
Geoff Williams2-Jun-11 7:33 
AnswerRe: Trouble with C macro '#' Pin
MicroVirus2-Jun-11 8:45
MicroVirus2-Jun-11 8:45 
GeneralRe: Trouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 17:20
Cold_Fearing_Bird2-Jun-11 17:20 
GeneralRe: Trouble with C macro '#' Pin
Cold_Fearing_Bird2-Jun-11 18:07
Cold_Fearing_Bird2-Jun-11 18:07 
AnswerRe: Trouble with C macro '#' Pin
వేంకటనారాయణ(venkatmakam)2-Jun-11 20:41
వేంకటనారాయణ(venkatmakam)2-Jun-11 20:41 
QuestionMFC Passing a string from a thread then printing out in a edit box not working Pin
kosacid2-Jun-11 1:25
kosacid2-Jun-11 1:25 
QuestionRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow2-Jun-11 5:19
David Crow2-Jun-11 5: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 8:12
kosacid2-Jun-11 8:12 
AnswerRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow2-Jun-11 8:39
David Crow2-Jun-11 8:39 
GeneralRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
kosacid2-Jun-11 23:51
kosacid2-Jun-11 23:51 
GeneralRe: MFC Passing a string from a thread then printing out in a edit box not working Pin
David Crow3-Jun-11 4:05
David Crow3-Jun-11 4:05 
QuestionWhere can I find atlimage.h ? Pin
_Flaviu1-Jun-11 22:10
_Flaviu1-Jun-11 22:10 
AnswerRe: Where can I find atlimage.h ? Pin
vishalgpt1-Jun-11 23:14
vishalgpt1-Jun-11 23:14 
GeneralRe: Where can I find atlimage.h ? Pin
_Flaviu1-Jun-11 23:34
_Flaviu1-Jun-11 23:34 
GeneralRe: Where can I find atlimage.h ? Pin
vishalgpt1-Jun-11 23:47
vishalgpt1-Jun-11 23:47 
GeneralRe: Where can I find atlimage.h ? Pin
_Flaviu2-Jun-11 1:36
_Flaviu2-Jun-11 1:36 
QuestionStrange Font Problem in Edit Control [SOLVED] Pin
vishalgpt1-Jun-11 17:43
vishalgpt1-Jun-11 17:43 
JokeRe: Strange Font Problem in Edit Control Pin
Albert Holguin1-Jun-11 18:24
professionalAlbert Holguin1-Jun-11 18:24 
GeneralRe: Strange Font Problem in Edit Control Pin
vishalgpt1-Jun-11 19:31
vishalgpt1-Jun-11 19:31 
GeneralRe: Strange Font Problem in Edit Control Pin
Albert Holguin1-Jun-11 19:32
professionalAlbert Holguin1-Jun-11 19:32 
AnswerRe: Strange Font Problem in Edit Control Pin
ShilpiP1-Jun-11 19:45
ShilpiP1-Jun-11 19:45 
GeneralRe: Strange Font Problem in Edit Control Pin
vishalgpt1-Jun-11 20:00
vishalgpt1-Jun-11 20:00 
GeneralRe: Strange Font Problem in Edit Control Pin
ShilpiP1-Jun-11 20:59
ShilpiP1-Jun-11 20:59 
GeneralRe: Strange Font Problem in Edit Control Pin
ThatsAlok1-Jun-11 21:09
ThatsAlok1-Jun-11 21: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.