c++.windows.32-bits - Problem with setting ListView styles
- Denis Troshin (16/16) Oct 29 2003 The following piece of code does not work on DMC:
- Walter (5/21) Oct 29 2003 If you could reproduce the problem in a standalone example, that would b...
- Jan Knepper (18/40) Oct 29 2003 Are you sure you have:
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
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
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