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

↑ ↓ ← 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)

//============================================
long tmp_gwl;

/*getting current listview style*/
/*tmp_gwl=0x50000000=WS_VISIBLE | WS_CHILD | LVS_ICON*/
tmp_gwl=GetWindowLong(hlistview, GWL_STYLE);

tmp_gwl=tmp_gwl & ~LVS_TYPEMASK;

/*trying to set new style*/
/*tmp_gwl=0x50000003=WS_VISIBLE | WS_CHILD | LVS_LIST*/
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
→ "Walter" <walter digitalmars.com> writes:
If you could reproduce the problem in a standalone example, that would be
most helpful.

www.digitalmars.com/faq.html#error


"Denis Troshin" <weiv mail.ru> wrote in message
news:bnp9p1$1g1e$1 digitaldaemon.com...
 The following piece of code does not work on DMC:
 (It works fine with other compilers - BCC 5.02, LCC-win32)

 //============================================
 long tmp_gwl;

 /*getting current listview style*/
 /*tmp_gwl=0x50000000=WS_VISIBLE | WS_CHILD | LVS_ICON*/
 tmp_gwl=GetWindowLong(hlistview, GWL_STYLE);

 tmp_gwl=tmp_gwl & ~LVS_TYPEMASK;

 /*trying to set new style*/
 /*tmp_gwl=0x50000003=WS_VISIBLE | WS_CHILD | LVS_LIST*/
 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
→ Jan Knepper <jan smartsoft.us> writes:
Are you sure you have:

EXETYPE		NT
SUBSYSTEM	WINDOWS,4.0

In your .def file???

And is you .def file part of your link command line???



Denis Troshin wrote:
 The following piece of code does not work on DMC:
 (It works fine with other compilers - BCC 5.02, LCC-win32)
 
 //============================================
 long tmp_gwl;
 
 /*getting current listview style*/
 /*tmp_gwl=0x50000000=WS_VISIBLE | WS_CHILD | LVS_ICON*/
 tmp_gwl=GetWindowLong(hlistview, GWL_STYLE);
 
 tmp_gwl=tmp_gwl & ~LVS_TYPEMASK;
 
 /*trying to set new style*/
 /*tmp_gwl=0x50000003=WS_VISIBLE | WS_CHILD | LVS_LIST*/
 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!
 
 

-- ManiaC++ Jan Knepper Smartsoft, LLC 88 Petersburg Road Petersburg, NJ 08270 U.S.A. http://www.smartsoft.us/ Phone : 609-628-4260 FAX : 609-628-1267 In God we Trust -- all others must submit an X.509 certificate. -- Charles Forsythe <forsythe alum.mit.edu>
Oct 29 2003