Article View: borland.public.cppbuilder.nativeapi
Article #6365Re: "use" menu item in another app?
From: Remy Lebeau (TeamB)
Date: Thu, 19 May 2005 20:51
Date: Thu, 19 May 2005 20:51
35 lines
2286 bytes
2286 bytes
"Segal" <none@none.spam.sucks.balls> wrote in message
news:428cea2d@newsgroups.borland.com...
> SendMessage(EditHwnd, WM_SETTEXT, (WPARAM)50,
> (LPARAM)SingleLine->Text.c_str());
As I suspected, you are not simulating any typing at all.
Also, why are you specifying a value for the WPARAM of the message?
WM_SETTEXT doesn't use the WPARAM at all.
> I just tried both
>
> SendMessage(hwnd, WM_COMMAND, 0, 0);
Make sure that you are sending WM_COMMAND to the dialog itself, not the
button. Also, you are not specifying BN_CLICKED at all.
WORD wID = GetDlgCtrlID(EditHwnd);
SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(wID, BN_CLICKED), (LPARAM)
EditHwnd);
> SendMessage(hwnd, BN_CLICKED, 0, 0);
BN_CLICKED is not a standalone message. You must send it via WM_COMMAND.
> before both of those calls and it still doesn't submit the box (as if
> "OK" is clicked.)
You are not sending the messages correctly to begin with, so it won't matter
whether you enable the button or not.
Gambit
Technical Details
Message-ID:
<428cfc24$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!news.net.uni-c.dk!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4289b235@newsgroups.borland.com> <v54k81lu0gb49sp76ri3ecjhb37gfbcatq@4ax.com> <428a1917$3@newsgroups.borland.com> <o2ck8151hqea0h667513g8lh0h8149n6aq@4ax.com> <428c2e72@newsgroups.borland.com> <428c6ef5$1@newsgroups.borland.com> <428ccca8@newsgroups.borland.com> <428cdbec@newsgroups.borland.com> <428cea2d@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,de4107a245e3b3a8 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4289b235@newsgroups.borland.com> <v54k81lu0gb49sp76ri3ecjhb37gfbcatq@4ax.com> <428a1917$3@newsgroups.borland.com> <o2ck8151hqea0h667513g8lh0h8149n6aq@4ax.com> <428c2e72@newsgroups.borland.com> <428c6ef5$1@newsgroups.borland.com> <428ccca8@newsgroups.borland.com> <428cdbec@newsgroups.borland.com> <428cea2d@newsgroups.borland.com> Subject: Re: "use" menu item in another app? Date: Thu, 19 May 2005 13:51:57 -0700 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <428cfc24$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116535844 68.69.17.41 (19 May 2005 13:50:44 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!news.net.uni-c.dk!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail