🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2138

Re: How do I add/remove windowstyles ?

#2138
From: Keith Benedict
Date: Fri, 06 Jun 1997 00:00
49 lines
2386 bytes
Well, if nobody else will give you an answer I will.  Take a look at
SetWindowLong.  This handy function allows you to set the WNDPROC, DLGPROC,
window styles, and extended window styles for a window.  Take a look at the
docs.

-- 
Keith Benedict
Software Engineer
Triad Systems

*** My reply email address is mangled to cut down on the
amount of junk mail I get.  To send me mail, mail to keith@triad.com.

US Code Title 47, Sec.227(a)(2)(B), a computer / modem / printer 
meets the definition of a telephone fax machine.  Sec. 227 
(b)(1)(C), it is unlawful to send any unsolicited advertisement 
to such equipment.  Sec.227(b)(3)(C), a violation of the 
aforementioned Section is punishable by action to recover actual 
monetary loss, or $500, whichever is greater, for each violation.



Leif Langen <lelangen@online.no> wrote in article
<01bc71d5$9aa971e0$1f0b63c1@lelahome>...
> Hi all,
> 
> "Simple" question - How does one add or remove certain styles from a
window
> ?
> 
> I want to  make a listbox capable of extended multiselect, even if it is
> created without it. I have tried the follwing:
> 
> ...
> 
>  SetWindowLong(wndHandle, GWL_STYLE, dwStyle | LBS_EXTSELECT);
> ...
> where dwStyle is the current style.
> This does not seem to work, not even if I try to remove the style:
> ...
>  SetWindowLong(wndHandle, GWL_STYLE, dwStyle & ~LBS_EXTSELECT);
> 
> What am I doing wrong here ???????
> Could someone please help me with this one.
> 
> Regards Leif Langen
> 
> 
Technical Details
Message-ID: <01bc7262$c6190060$666e36c0@keithb>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bc71d5$9aa971e0$1f0b63c1@lelahome>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8d38,e36bc131cb0334ad
X-Google-Attributes: gidf8d38,public
X-Google-Thread: f5ca7,e36bc131cb0334ad
X-Google-Attributes: gidf5ca7,public
X-Google-Thread: 103bde,e36bc131cb0334ad
X-Google-Attributes: gid103bde,public
X-Google-Thread: 113dfb,e36bc131cb0334ad
X-Google-Attributes: gid113dfb,public
From: "Keith Benedict" <nospam_keith@triad.com>
Subject: Re: How do I add/remove windowstyles ?
Date: 1997/06/06
Message-ID: <01bc7262$c6190060$666e36c0@keithb>
X-Deja-AN: 246619579
Sender: usenet@triad.com (News Master)
X-Nntp-Posting-Host: pc_keith.triad.com
References: <01bc71d5$9aa971e0$1f0b63c1@lelahome>
Organization: Triad Systems Corp.
Newsgroups: comp.os.ms-windows.programmer.win32,borland.public.cpp.winapi,borland.public.cppbuilder.winapi,borland.public.cpp.language