Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the locale? [SOLVED] Pin
David Crow3-Jun-11 3:09
David Crow3-Jun-11 3:09 
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 
void CFLUpdaterDlg::Print(CString s_Format, ...)
{
	va_list  args;
	va_start(args, s_Format);
	int BUFLEN = 1024;
	CString s_Out;
	TCHAR*  t_Out = s_Out.GetBuffer(BUFLEN+1);
	_vsntprintf(t_Out, BUFLEN, s_Format, args);
	t_Out[BUFLEN] = 0;
	s_Out.ReleaseBuffer();
	if (s_Out.GetLength() == BUFLEN) 
	s_Out.Replace(_T("\r"), _T(""));
	s_Out.Replace(_T("\n"), _T("\r\n"));
	ms_Output += s_Out;
	m_Print.SetWindowText(ms_Output);
	return;
}


void CFLUpdaterDlg::OnBnClickedStartserver()
{
	if(!serverstarted)
	{
	    TCHAR PortNumber[260];
	    m_PortTxT.GetWindowTextA(PortNumber,260);
	    m_Port = atoi(PortNumber);
	    Print("Server Started on port %i\n",m_Port);
		serverstarted=true;
        AfxBeginThread( ServerEXE,(LPVOID)m_Port, THREAD_PRIORITY_NORMAL);
	}
	else
	{
		Print("Server Allready Running\n");
	}
}


UINT CFLUpdaterDlg::ServerEXE(LPVOID param)
{
	CFLUpdaterDlg out;
	int host_port = (int)param;
	out.Print("port = %i\n",host_port);
	return 0;
}


i seem to be geting memory overflows it prints out OnBnClickedStartserver info no problem but when i try to print from the thread instant overflow
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 
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 

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.