🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14798

Threads and messages again

#14798
From: Joe Walker
Date: Sun, 03 Aug 2003 14:52
30 lines
1800 bytes
Hi again. Since I am new at threads and messages I have lots of questions..
I am trying to get input from some buttons and I will do this by using
messages...
However when I loop for messages there seems to be lots of messages to my
thread..
I mean..->
while (1)
{
    if (GetMessage(&msg,NULL,0,0))
        {
            if (msg.message==UWM_SOMEMESSAGE1)
        {
            //DoSomething...
        }
        else
            if (msg.message==UWM_SOMEMESSAGE2)
        {
            // Do Another Thing
            //break
        }
}

now in GetMessage, I am using NULL for the HWND parameter.. My thread has no
window but I want only get to messages which are coming to my threads
message queue..
How I can do that?

Thanks a lot...

JoeW
Technical Details
Message-ID: <3f2d218e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b0f5f87125b64df6,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-03 08:09:40 PST
From: "Joe Walker" <__JoeW@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Threads and messages again
Date: Sun, 3 Aug 2003 17:52:02 +0300
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 144.122.180.3
Message-ID: <3f2d218e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059922318 144.122.180.3 (3 Aug 2003 07:51:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail