Thread View: borland.public.cppbuilder.migration
3 messages
3 total messages
Started by Alexandre S�
Fri, 17 Jun 2005 13:30
"PostMessage(HWND_BROADCAST, ...)" doesn�t work!
Author: Alexandre S�
Date: Fri, 17 Jun 2005 13:30
Date: Fri, 17 Jun 2005 13:30
48 lines
2366 bytes
2366 bytes
Hi there, I really need any help!
I�m migrating my Borland C++ project to C++ Builder 6.
It�s an old project, so on C++ Builder I created a Console Wizard project
and just one thing doen�s work fine...
...a "PostMessage(HWND_BROADCAST, ...)" method.
My new C++ Builder console application "doesn�t see" any HWND_BROADCAST
messages.
To be sure that this was the point, I made the following sample
application... but why it don�t receave HWND_BROADCAST messages?
The code of the sample application:
New -> Other -> Console Wizard -> (C++ Source Type, Don�t Use VCL, Multi
Threaded, Not Console Application)
//--------------------------------------------------------------------------
-
#include <windows.h>
#pragma hdrstop
//--------------------------------------------------------------------------
-
#define WM_MINE (WM_USER+238)
//--------------------------------------------------------------------------
-
#pragma argsused
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{
PostMessage(HWND_BROADCAST, WM_MINE, 0, 0L);
MSG msg;
while(PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) {
if (msg.message == WM_MINE) {
// put a breakpoint here and see that it don�t receive the message
int i=0;
break;
}
}
return 0;
}
//--------------------------------------------------------------------------
-
Any help?
Best Regards,
Alexandre S�
Re: "PostMessage(HWND_BROADCAST, ...)" doesn�t work!
Author: Ed Mulroy
Date: Sat, 18 Jun 2005 02:29
Date: Sat, 18 Jun 2005 02:29
9 lines
1348 bytes
1348 bytes
See the replies in the other group where you posted this message. Please follow Borland's newsgroup guidelines. One of the items they mention is to post a message in the one newsgroup where it best aligns with the subject of the group. http://info.borland.com/newsgroups/guide.html . Ed
Re: "PostMessage(HWND_BROADCAST, ...)" doesn�t work!
Author: Alexandre S�
Date: Mon, 20 Jun 2005 14:37
Date: Mon, 20 Jun 2005 14:37
17 lines
1400 bytes
1400 bytes
I�m so sorry, Mulroy. Think you for the advice! "Ed Mulroy" <dont_email_me@bitbuc.ket> escreveu na mensagem news:42b3870a@newsgroups.borland.com... > See the replies in the other group where you posted this message. > > Please follow Borland's newsgroup guidelines. One of the items they mention > is to post a message in the one newsgroup where it best aligns with the > subject of the group. > > http://info.borland.com/newsgroups/guide.html > > . Ed > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads