Can anyone explain this to me. Why the listview will not load with school going on
I been working on this off and on.
Posted on 2003-09-17 09:26:29 by Tweak


invoke WinMain, hInstance,NULL,NULL,SW_SHOWDEFAULT
call ListViewAdd

call ListViewAdd never gets called as Winmain only returns when you closed the app.


call InitListView
mov hList,eax

Upon return eax will not contain the handle of the ListView because you don't return the handle inside the proc. eax in this case will have the return code of your last call to SendMessage in it. here you destroy the hList variable you set in InitListView by giving it another value. I suggest following in the WM_CREATE...



call InitListView
call InitListViewAdd




mov eax,Col1
mov LVI.pszText,eax


This takes the first 4 bytes from Col1 and places them in eax.. You want to pass an OFFSET to the psztext member.. So replace them by



mov LVI.pszText, offset Col1



BTW: Does this file even compile? Col1 is nowhere defined - szCol1 is.


Give this a try... I can't try it as I'm at work.

JimmyClif
Posted on 2003-09-17 10:57:49 by JimmyClif
Might help if you use the WS_VISIBLE style in the CreateWindowEx of the ListView.
invoke CreateWindowEx, WS_EX_CLIENTEDGE, ADDR ListClass, NULL,\

WS_CHILD or WS_VISIBLE or LVS_REPORT, 0, 0, 100, 100, hWnd, NULL, hInstance, NULL

Also might want to give it some dimensions 0,0,0,0 doesn't display much :)
Posted on 2003-09-17 11:00:00 by donkey
Hi JimmyClif,

mov eax,Col1
mov LVI.pszText,eax

This is right, I think that the ListViewAdd proc is from one of my programs and the offset is passed in Col1. That is the reason they are DWORD parameters (ListViewAdd proc Col0:DWORD,Col1:DWORD,Col2:DWORD)
Posted on 2003-09-17 11:12:22 by donkey
You're right.. He only forgot to pass the 3 parameters needed by ListViewAdd. Didn't see the definition there ;)...
Posted on 2003-09-17 11:22:13 by JimmyClif