Article View: borland.public.cppbuilder.nativeapi
Article #6001Re: HWND_BROADCAST doesn�t work!
From: Alexandre S�
Date: Fri, 17 Jun 2005 18:50
Date: Fri, 17 Jun 2005 18:50
61 lines
2685 bytes
2685 bytes
> Please show all of the code. You probably are not setting up your window
> properly, but your pseudocode doesn't show what you are actually doing.
Unfortunately, doesn�t matter the windows creation code... The same code
works on Borland C++ and doesn�t work on BCB6...
The code is:
//*DEBUGGING MESSAGE
WNDCLASS windowClass;
windowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC ;
windowClass.lpfnWndProc = (WNDPROC)WndProc;
windowClass.cbClsExtra = 0 ;
windowClass.cbWndExtra = 0 ;
windowClass.hInstance = hInstance ;
windowClass.hbrBackground = (HBRUSH)(GetStockObject(BLACK_BRUSH));
windowClass.lpszMenuName = NULL;
windowClass.lpszClassName = "TMyForm";
RegisterClass(&windowClass);
HWND hWindow = CreateWindow ("TMyForm",
"MyForm",
WS_POPUP | WS_BORDER,
10,10,200,200,
NULL,
NULL,
hInstance,
NULL);
MSG msg;
PostMessage(HWND_BROADCAST, WM_USER, 0, 0L);
if(PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) {
MessageBox(NULL, "Work!", "", MB_OK);
} else {
MessageBox(NULL, "Don�t work!", "", MB_OK);
}
return 0;
//*/
On BCB6, I looked at the message gueue after the broadcast msg and there is
no msg to the peeked. And on the BC the message is there on the queue.
Hope any help.
Best regards,
Alexandre S�
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escreveu na mensagem
news:42b317d0$1@newsgroups.borland.com...
>
> "Alexandre S�" <alexandre@daccord.com.br> wrote in message
> news:42b30d0a$1@newsgroups.borland.com...
>
> > Let the code:
>
> Please show all of the code. You probably are not setting up your window
> properly, but your pseudocode doesn't show what you are actually doing.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<42b31b9a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42b30d0a$1@newsgroups.borland.com> <42b317d0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,af4f253f03c4e6fb X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: "Alexandre S�" <alexandre@daccord.com.br> Newsgroups: borland.public.cppbuilder.nativeapi References: <42b30d0a$1@newsgroups.borland.com> <42b317d0$1@newsgroups.borland.com> Subject: Re: HWND_BROADCAST doesn�t work! Date: Fri, 17 Jun 2005 15:50:29 -0300 Lines: 63 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 200.249.236.130 Message-ID: <42b31b9a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1119034266 200.249.236.130 (17 Jun 2005 11:51:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail