www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++.windows.32-bits - Problem with setting ListView styles - testmars2.zip

↑ ↓ ← "Denis Troshin" <weiv mail.ru> writes:
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!
Oct 29 2003
↑ ↓ → "Phill" <phill pacific.net.au> writes:
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!

Nov 29 2003