🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to ... ?

#520
From: David Pratt
Date: Sat, 26 Jan 2008 01:54
22 lines
2068 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:479a1fa9$1@newsgroups.borland.com...
>
> "Jos�" <jose@127.0.0.1> wrote in message 
> news:ohqjp3tnknh2vl5h7oe8991n8gt4psu1ku@4ax.com...
>
>> For example, I am writing a text in Word. My home made program
>> appears to inidicate that a job has been completed. It appears on top,
>> and it takes focus. It cannot give the focus back to Word, since it
>> does not know whence the focus came.
>
> Yes, you can - call GetForegroundWindow() before displaying your own 
> window.
>
>
> Gambit


Wouldn't handling the WM_SETFOCUS msg work just as well or better? It sends 
the handle for the window losing focus as a parameter, so all the OP would 
have to do is to set the focus back to the losing window. 
Technical Details
Message-ID: <479a92cf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com> <MPG.2203f216630e254a989a19@newsgroups.borland.com> <ojnjp3lgum0k2f3v7qnqkuk5rcdkhuba7k@4ax.com> <MPG.220400dcaf097a14989a1b@newsgroups.borland.com> <ohqjp3tnknh2vl5h7oe8991n8gt4psu1ku@4ax.com> <479a1fa9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,92f426904d27d7ce
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII
From: "David Pratt" <djp32563@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com> <MPG.2203f216630e254a989a19@newsgroups.borland.com> <ojnjp3lgum0k2f3v7qnqkuk5rcdkhuba7k@4ax.com> <MPG.220400dcaf097a14989a1b@newsgroups.borland.com> <ohqjp3tnknh2vl5h7oe8991n8gt4psu1ku@4ax.com> <479a1fa9$1@newsgroups.borland.com>
Subject: Re: How to ... ?
Date: Fri, 25 Jan 2008 19:54:35 -0600
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 208.188.176.104
Message-ID: <479a92cf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1201312463 208.188.176.104 (25 Jan 2008 17:54:23 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail