October 30, 2003 Problem with setting ListView styles - testmars2.zip | ||||
---|---|---|---|---|
| ||||
Attachments: | The following piece of code does not work on DMC: (It works fine with other compilers - BCC 5.02, LCC-win32) !!!Now full source is included!!! (see attachment) //============================================ long tmp_gwl; /*getting current listview style*/ /*tmp_gwl=0x50000100=WS_VISIBLE | WS_CHILD | LVS_ICON | LVS_AUTOARRANGE*/ tmp_gwl=GetWindowLong(hlistview, GWL_STYLE); tmp_gwl=tmp_gwl & ~LVS_TYPEMASK; /*trying to set new style*/ /*tmp_gwl=0x50000103=WS_VISIBLE | WS_CHILD | LVS_LIST | LVS_AUTOARRANGE*/ tmp_gwl=tmp_gwl | LVS_LIST; SetWindowLong(hlistview, GWL_STYLE, tmp_gwl); //============================================ If I use GetWindowLong after these lines, it returns the style I was trying to set, but visually there will be no changes! |
November 29, 2003 Re: Problem with setting ListView styles - testmars2.zip | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Troshin | you can do all of this in Resource Studio very easily. Phill. "Denis Troshin" <weiv@mail.ru> wrote in message news:bnq50n$2jqp$1@digitaldaemon.com... > The following piece of code does not work on DMC: > (It works fine with other compilers - BCC 5.02, LCC-win32) > > !!!Now full source is included!!! (see attachment) > //============================================ > long tmp_gwl; > > /*getting current listview style*/ > /*tmp_gwl=0x50000100=WS_VISIBLE | WS_CHILD | LVS_ICON | LVS_AUTOARRANGE*/ > tmp_gwl=GetWindowLong(hlistview, GWL_STYLE); > > tmp_gwl=tmp_gwl & ~LVS_TYPEMASK; > > /*trying to set new style*/ > /*tmp_gwl=0x50000103=WS_VISIBLE | WS_CHILD | LVS_LIST | LVS_AUTOARRANGE*/ > tmp_gwl=tmp_gwl | LVS_LIST; > SetWindowLong(hlistview, GWL_STYLE, tmp_gwl); > //============================================ > If I use GetWindowLong after these lines, it returns > the style I was trying to set, > but visually there will be no changes! > > > |
Copyright © 1999-2021 by the D Language Foundation