🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can reverse video in edit control be shut off?

#16202
From: Bill Carson
Date: Mon, 26 May 2003 18:33
30 lines
2296 bytes
> The text in the edit control is being displayed in "reverse video"
> because it is selected. You can clear the selection by sending the
> EM_SETSEL message to the control with the starting point parameter,
> wParam, set to -1.
>
> lResult = SendMessage(
>            hWndControl, // handle to destination control
>            EM_SETSEL,   // message ID
>            (WPARAM) -1, // starting character position of selection
>            (LPARAM) 0   // ending character position of selection
> );
>

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: <3ed25e24@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-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.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
References: <3ed13bd7@newsgroups.borland.com> <3ED14414.2040904@directnet.com> <3ed23788@newsgroups.borland.com> <3ED23C01.80906@domain.invalid>

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 11:54:25 PST
From: "Bill Carson" <bcarson892003atyahoodotcom>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ed13bd7@newsgroups.borland.com> <3ED14414.2040904@directnet.com> <3ed23788@newsgroups.borland.com> <3ED23C01.80906@domain.invalid>
Subject: Re: Can reverse video in edit control be shut off?
Date: Mon, 26 May 2003 11:33:42 -0700
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 66.119.208.60
Message-ID: <3ed25e24@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053974052 66.119.208.60 (26 May 2003 11:34:12 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.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