I've already sent this to Dimi, but... the demo http://msdn.microsoft.com/downloads/samples/internet/commctrl/vlistvw/defaul... doesn't work very well with Wine at the moment. It demonstrates the LVS_OWNERDATA variant of a listview.
I built it with msvc6. The default view looks ok, but if you pick a different view, the fun starts... "large icons" seem to all be drawn on top of each other. - Dan
Dan Kegel wrote:
I've already sent this to Dimi, but... the demo http://msdn.microsoft.com/downloads/samples/internet/commctrl/vlistvw/defaul...
doesn't work very well with Wine at the moment. It demonstrates the LVS_OWNERDATA variant of a listview.
I built it with msvc6. The default view looks ok, but if you pick a different view, the fun starts... "large icons" seem to all be drawn on top of each other.
BTW: here's how to build that sample from the commandline without nmake:
rc VListVw.rc cl VListVw.c VListVw.res user32.lib comctl32.lib
And here's how to build it from the commandline with mingw:
windres -o vlistvw_res.o vlistvw.rc gcc -D_WIN32_IE=0x300 vlistw.c vlistvw_res.o -mwindows -lcomctl32
You'll need to add the definition #define LPNMLVCACHEHINT PNMLVCACHEHINT which is missing from mingw's comctl32.h, and comment out the reference to LPNMLVFINDITEM, which is also missing from mingw's comctl32.h, but isn't really used in this demo.
Thanks, Dimi, for finally getting me to try mingw; I've been avoiding it out of fear for about eight years. It's really improved since those early days! (Golly, a gui installer and everything!) - Dan
On February 6, 2003 10:47 pm, Dan Kegel wrote:
Thanks, Dimi, for finally getting me to try mingw; I've been avoiding it out of fear for about eight years. It's really improved since those early days! (Golly, a gui installer and everything!)
It is cool, isn't it? You're welcome! :)
Here is a Makefile that should work with both mingw and winelib:
==================> Makefile <============================= # for mingw #CC = gcc #RC = windres # for wine CC = winegcc RC = wrc
%-res.o: %.rc $(RC) -o $@ $<
%.o: %.c $(CC) -DWIN32 -D_WIN32_IE=0x300 -o $@ -c $<
vlistvw: vlistvw-res.o vlistvw.o $(CC) -mwindows $^ -o $@ -lcomctl32
===========================================================
This is for winelib, to make it work with mingw, just change the CC & RC definitions.
To compile this under winelib, you need to apply the little patch that I just send, which I'll include in there for your convenience:
Index: include/commctrl.h =================================================================== RCS file: /var/cvs/wine/include/commctrl.h,v retrieving revision 1.103 diff -u -r1.103 commctrl.h --- include/commctrl.h 4 Jan 2003 00:19:17 -0000 1.103 +++ include/commctrl.h 7 Feb 2003 07:29:41 -0000 @@ -3334,6 +3334,8 @@ int dy; } NMLVSCROLL, *LPNMLVSCROLL;
+#define ListView_SetItemCount(hwnd,count) \ + (BOOL)SNDMSGA((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0) #define ListView_SetTextBkColor(hwnd,clrBk) \ (BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk)) #define ListView_SetTextColor(hwnd,clrBk) \
On February 6, 2003 05:15 am, Dan Kegel wrote:
I've already sent this to Dimi, but... the demo http://msdn.microsoft.com/downloads/samples/internet/commctrl/vlistvw/defau lt.asp doesn't work very well with Wine at the moment. It demonstrates the LVS_OWNERDATA variant of a listview.
BTW, can you please create a bug report with this stuff, and either assign it to me, or if you can't, just forward me the bug number. TIA.