Click here to Skip to main content
15,568,965 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the locale? [SOLVED] Pin
David Crow3-Jun-11 4:09
David Crow3-Jun-11 4:09 
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 
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 5:19
David Crow2-Jun-11 5:19 
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 

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.