Article View: borland.public.cppbuilder.nativeapi
Article #10869Re: Close a Program!?
From: Safari
Date: Thu, 11 Mar 2004 23:26
Date: Thu, 11 Mar 2004 23:26
34 lines
2085 bytes
2085 bytes
Thanks Ed,
Very...... thanks,
Safari
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote in message
news:40510346$1@newsgroups.borland.com...
| Classes provided by Windows often are given a number instead of a
| name. That is the case with the DIALOG class you mention here which
| is 32770. Windows provides a macro to handle that and make the number
| into a correct style of calling argument for a function which expects
| a string for a class or resource name.
|
| Try using the line altered in this way (the line wrap is just due to
| the news reader).
|
| HWND MyMean =
| FindWindow(MAKEINTRESOURCE(32770), OECaptionName);
|
| . Ed
|
| > Safari wrote in message
| > news:4051013a@newsgroups.borland.com...
| >
| > Example: Msimn.exe = Microsoft Outlook Express;
| >
| > void __fastcall TMain::BitBtn1Click(TObject *Sender)
| > {
| > HWND MyMean = FindWindow(OEClassName, OECaptionName);
| > SendMessage(MyMean, WM_SYSCOMMAND, SC_CLOSE, 0);
| > }
| > I want a close a program with class name, but my class
| > is #32770!
|
|
Technical Details
Message-ID:
<405103c2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<404fc418@newsgroups.borland.com> <404fe0d3$1@newsgroups.borland.com> <4051013a@newsgroups.borland.com> <40510346$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ae22238877755cbc X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-11 16:40:29 PST From: "Safari" <Safari@alloymail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <404fc418@newsgroups.borland.com> <404fe0d3$1@newsgroups.borland.com> <4051013a@newsgroups.borland.com> <40510346$1@newsgroups.borland.com> Subject: Re: Close a Program!? Date: Fri, 12 Mar 2004 03:56:50 +0430 Lines: 36 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: 194.225.63.129 Message-ID: <405103c2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1079051202 194.225.63.129 (11 Mar 2004 16:26:42 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail