|
Archives
D Programming
DD.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
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! Oct 29 2003
|