Article View: comp.os.ms-windows.programmer.win32
Article #2134Re: How do I add/remove windowstyles ?
From: Bernie Gaughran
Date: Thu, 05 Jun 1997 00:00
Date: Thu, 05 Jun 1997 00:00
21 lines
1362 bytes
1362 bytes
>"Leif Langen" <lelangen@online.no> wrote: >"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); You add or remove attribute styles like so: //set an attribute MyListBox->Attr.Style |= LBS_MULTIPLESEL; //remove an attribute MyWindow->Attr.Style = ~WS_VISIBLE; There are variations on this, but that's the basic idea. Look up the Attr structure for more info. Bernie
Technical Details
Message-ID:
<5n7g80$dj92@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<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: 113dfb,e36bc131cb0334ad X-Google-Attributes: gid113dfb,public X-Google-Thread: 103bde,e36bc131cb0334ad X-Google-Attributes: gid103bde,public From: 74271.2470@compuserve.com (Bernie Gaughran) Subject: Re: How do I add/remove windowstyles ? Date: 1997/06/05 Message-ID: <5n7g80$dj92@forums.borland.com> X-Deja-AN: 246412308 References: <01bc71d5$9aa971e0$1f0b63c1@lelahome> Organization: None Newsgroups: comp.os.ms-windows.programmer.win32,borland.public.cpp.winapi,borland.public.cppbuilder.winapi,borland.public.cpp.language