Article View: borland.public.cppbuilder.nativeapi
Article #16203Re: Can reverse video in edit control be shut off?
From: Eudy Carvalhaes C. Silva
Date: Mon, 26 May 2003 19:43
Date: Mon, 26 May 2003 19:43
45 lines
2621 bytes
2621 bytes
I have little experience with this, but I guess you can
use GetDlgItem() to retrieve the window handle
of the edit box in the dialog and then use SendMessage().
hwndEdit = GetDlgItem(hwndDlg, 199);
SendMessage(hwndEdit, EM_SETSEL,
(WPARAM) -1,
(LPARAM) 0);
Or, SendDlgItemMessage() can be used:
(no need to have the window handle of the edit)
SendDlgItemMessage(
hwndDlg, // handle of dialog box
199, // identifier of control
EM_SETSEL,
(WPARAM) -1,
(LPARAM) 0);
You send the message to the edit
after the dialog is visible.
Eudy
Bill Carson wrote:
> Since I couldn't figure out how to get a handle to a control in a
> dialog box, I used the following instead, but it didn't work:
>
> case WM_INITDIALOG:
> SetWindowText(hwndDlg, szFileName);
> SetDlgItemText(hwndDlg, 199, (LPCSTR) pConv);
> SendDlgItemMessage(
> hwndDlg, // handle of dialog box
> 199, // identifier of the control that receives message
> EM_SETSEL, // message ID
> (WPARAM) -1, // starting character position of selection
> (LPARAM) 0 // ending character position of selection
> );
>
> Thanks,
>
> Bill
>
>
Technical Details
Message-ID:
<3ED26E54.2050507@iae.cta>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ed13bd7@newsgroups.borland.com> <3ED14414.2040904@directnet.com> <3ed23788@newsgroups.borland.com> <3ED23C01.80906@domain.invalid> <3ed25e24@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a52495bb3fc3f3b6 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-26 13:18:13 PST Message-ID: <3ED26E54.2050507@iae.cta> Date: Mon, 26 May 2003 16:43:16 -0300 From: "Eudy Carvalhaes C. Silva" <eudy@iae.cta> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Can reverse video in edit control be shut off? References: <3ed13bd7@newsgroups.borland.com> <3ED14414.2040904@directnet.com> <3ed23788@newsgroups.borland.com> <3ED23C01.80906@domain.invalid> <3ed25e24@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 161.24.47.98 X-Trace: newsgroups.borland.com 1053978090 161.24.47.98 (26 May 2003 12:41:30 -0700) Lines: 46 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail