Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCWebBrowser OnResizeTo event? Pin
surfordie30-May-04 17:14
surfordie30-May-04 17:14 
AnswerRe: CWebBrowser OnResizeTo event? Pin
Anthony_Yio31-May-04 1:17
Anthony_Yio31-May-04 1:17 
QuestionCFile::Open Timeout's?? Pin
shultas30-May-04 15:23
shultas30-May-04 15:23 
AnswerRe: CFile::Open Timeout's?? Pin
Anthony_Yio31-May-04 0:40
Anthony_Yio31-May-04 0:40 
GeneralAccess key Pin
JR Shih30-May-04 14:47
JR Shih30-May-04 14:47 
GeneralRe: Access key Pin
Anthony_Yio31-May-04 0:51
Anthony_Yio31-May-04 0:51 
GeneralRe: Access key Pin
JR Shih31-May-04 2:25
JR Shih31-May-04 2:25 
Generalsending messages to the main window Pin
kfaday30-May-04 14:32
kfaday30-May-04 14:32 
Hello!
I've got this thread function and in the postmessage line i'd like to send a message to the main view of the program. (it's an MFC project).

<br />
DWORD WINAPI CHilos::ThreadProc(LPVOID objeto)<br />
{<br />
	CHilos* thread=(CHilos*)objeto;<br />
	while (thread->Alive)<br />
	{<br />
		while((thread->Alive)&&(thread->Active))<br />
		{<br />
			thread->Work();<br />
		}<br />
	}<br />
	::PostMessage(HWND_BROADCAST, WM_ONFINISH, 0, 0);<br />
	return true;<br />
}


The project is called hiloss, and in hilossView.cpp i declared in the message map:

ON_MESSAGE(WM_ONFINISH, OnThreadended)

and then in the same file there's the definition of the OnThreadended function.

The problem is with the postmessage is that the message never reaches the top window, actually when i debug the project, it never gets into the OnThreadended function.

Is HWND_BROADCAST ok? i think there's the problem. I want to send a message to the ChilossView class, which is the main window of the project, but i don't know how.

thanks!!
GeneralRe: sending messages to the main window Pin
Ryan Binns30-May-04 18:07
Ryan Binns30-May-04 18:07 
GeneralRe: sending messages to the main window Pin
kfaday31-May-04 2:49
kfaday31-May-04 2:49 
GeneralRe: sending messages to the main window Pin
Anthony_Yio31-May-04 0:59
Anthony_Yio31-May-04 0:59 
GeneralRe: sending messages to the main window Pin
kfaday31-May-04 2:50
kfaday31-May-04 2:50 
Generalerror C2065: 'cout' : undeclared identifier Pin
Anonymous30-May-04 13:43
Anonymous30-May-04 13:43 
GeneralRe: error C2065: 'cout' : undeclared identifier Pin
kfaday30-May-04 14:37
kfaday30-May-04 14:37 
GeneralRe: error C2065: 'cout' : undeclared identifier Pin
Michael Dunn30-May-04 16:25
sitebuilderMichael Dunn30-May-04 16:25 
Generalform background bitmap Pin
zubeido30-May-04 13:41
zubeido30-May-04 13:41 
GeneralRe: form background bitmap Pin
Michael Dunn30-May-04 16:27
sitebuilderMichael Dunn30-May-04 16:27 
GeneralRe: form background bitmap Pin
Aizaz31-May-04 2:14
Aizaz31-May-04 2:14 
Generalfunny working ListBox - help! Pin
Anonymous30-May-04 11:46
Anonymous30-May-04 11:46 
GeneralDeriving Edit Box Control Pin
Grahamfff30-May-04 11:11
Grahamfff30-May-04 11:11 
GeneralC++ Launches File Pin
vinniez_ok30-May-04 9:22
vinniez_ok30-May-04 9:22 
GeneralRe: C++ Launches File Pin
Ravi Bhavnani30-May-04 9:45
professionalRavi Bhavnani30-May-04 9:45 
GeneralRe: C++ Launches File Pin
Michael Dunn30-May-04 10:09
sitebuilderMichael Dunn30-May-04 10:09 
GeneralRe: C++ Launches File Pin
vinniez_ok30-May-04 13:04
vinniez_ok30-May-04 13:04 
GeneralRe: C++ Launches File Pin
Michael Dunn30-May-04 16:30
sitebuilderMichael Dunn30-May-04 16:30 

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.