Click here to Skip to main content
15,897,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Add icon to ListView Pin
john563218-Dec-07 19:32
john563218-Dec-07 19:32 
GeneralRe: Add icon to ListView Pin
Peter Weyzen18-Dec-07 19:45
Peter Weyzen18-Dec-07 19:45 
GeneralRe: Add icon to ListView Pin
john563218-Dec-07 19:48
john563218-Dec-07 19:48 
GeneralRe: Add icon to ListView Pin
Peter Weyzen18-Dec-07 21:48
Peter Weyzen18-Dec-07 21:48 
QuestionRe: Add icon to ListView Pin
David Crow19-Dec-07 4:14
David Crow19-Dec-07 4:14 
GeneralRe: Add icon to ListView Pin
Hamid_RT18-Dec-07 20:12
Hamid_RT18-Dec-07 20:12 
Questionwhy worker thread(non UI ) can't receive message send by PostThreadMessage Pin
CNJXRZ18-Dec-07 18:38
CNJXRZ18-Dec-07 18:38 
GeneralRe: why worker thread(non UI ) can't receive message send by PostThreadMessage Pin
Naveen18-Dec-07 20:54
Naveen18-Dec-07 20:54 
CNJXRZ wrote:
PostThreadMessage will be received in WorkThread::Run(), i don't why?


I just tried ur code and I am getting the message also. the only difference i made was instead of a CWinThread derived class, i wrote only a thread proc. Also why its only 4 parameters in ur PeekMessage() function? It actually takes 5 paramters. isnt it?

UINT __cdecl MyControllingFunction( LPVOID pParam )<br />
{<br />
<br />
	MSG Msg;<br />
	while ( 1 )<br />
	{<br />
		::PeekMessage( &Msg, 0, 0,0, PM_NOREMOVE ) ;<br />
		if ( Msg.message == WM_USER+0x2000 )<br />
			TRACE ( "MESSAGE\n" );<br />
	}<br />
	return 0;<br />
}<br />
void CDialogBasedDlg::OnButton1() <br />
{<br />
	CWinThread *pthread =  AfxBeginThread( MyControllingFunction, 0 );<br />
	PostThreadMessage( pthread->m_nThreadID, WM_USER + 0x2000, 0 ,0 );<br />
}


GeneralRe: why worker thread(non UI ) can't receive message send by PostThreadMessage Pin
JudyL_MD19-Dec-07 2:13
JudyL_MD19-Dec-07 2:13 
GeneralRe: why worker thread(non UI ) can't receive message send by PostThreadMessage Pin
Mark Salsbery19-Dec-07 7:05
Mark Salsbery19-Dec-07 7:05 
GeneralWindow TreadId Pin
nitin318-Dec-07 18:28
nitin318-Dec-07 18:28 
AnswerRe: Window TreadId Pin
Lim Bio Liong18-Dec-07 19:05
Lim Bio Liong18-Dec-07 19:05 
Questiona question about event object Pin
zengkun10018-Dec-07 18:28
zengkun10018-Dec-07 18:28 
GeneralRe: a question about event object Pin
JudyL_MD19-Dec-07 2:19
JudyL_MD19-Dec-07 2:19 
GeneralRe: a question about event object Pin
zengkun10019-Dec-07 3:26
zengkun10019-Dec-07 3:26 
GeneralRe: a question about event object Pin
JudyL_MD19-Dec-07 3:41
JudyL_MD19-Dec-07 3:41 
GeneralRe: a question about event object Pin
zengkun10019-Dec-07 3:50
zengkun10019-Dec-07 3:50 
Generalconverting bitmap to gif through MFC Pin
ias118-Dec-07 18:22
ias118-Dec-07 18:22 
Questionconverting bitmap to gif through MFC Pin
ias118-Dec-07 18:20
ias118-Dec-07 18:20 
AnswerRe: converting bitmap to gif through MFC Pin
Paresh Chitte18-Dec-07 18:56
Paresh Chitte18-Dec-07 18:56 
GeneralRe: converting bitmap to gif through MFC Pin
Hamid_RT18-Dec-07 19:27
Hamid_RT18-Dec-07 19:27 
Generalno debug info at program start Pin
subramanyeswari18-Dec-07 17:36
subramanyeswari18-Dec-07 17:36 
QuestionRe: no debug info at program start Pin
Hamid_RT18-Dec-07 19:30
Hamid_RT18-Dec-07 19:30 
GeneralRe: no debug info at program start Pin
subramanyeswari18-Dec-07 19:38
subramanyeswari18-Dec-07 19:38 
QuestionWindows Media Player CLSID for CD or DVD Pin
GrizzlyDoug18-Dec-07 12:22
GrizzlyDoug18-Dec-07 12:22 

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.