flat assembler
Message board for the users of flat assembler.

Index > Windows > SysListView32 - Problem

Author
Thread Post new topic Reply to topic
smoke



Joined: 16 Jan 2006
Posts: 42
smoke
hello,

i've been trying out the syslistview32 control ... and i've come across some problem ... i cant write to it .. dont know why but the only thing i can write is a blank spot (check the screenshot ...) This is how i do it:
Code:

        mov       dword[lvItem.mask], LVIF_TEXT
        mov       dword[lvItem.iSubItem], 0
        mov       dword[lvItem.pszText], _mz
        mov       dword[lvItem.cchTextMax], 256
        mov       dword[lvItem.iItem], 0
        lea       eax,dword[lvItem]
        invoke    SendMessage, dword[hListView], LVM_INSERTITEM, 0, eax
    

i've also checked the listview tutorial on codeproject ... but i think i do exactly the same thing (the source at codeproject is in C though... and it works).so if you know the solution, please share it with me.


Description:
Filesize: 6.27 KB
Viewed: 1037 Time(s)

screenshot.png


Post 17 Oct 2007, 19:53
View user's profile Send private message Reply with quote
handyman



Joined: 04 Jun 2007
Posts: 40
Location: USA - KS
handyman
Check the listview control text color and text background color and be sure there is enough contrast between the two.

I have also seen occasions where changing the windows color scheme from the original can affect how some controls display in adverse ways. Only mentioning this because the buttons you show in the window look different from the original windows color scheme.

If these ideas don't help then it is obviously something else.
Post 18 Oct 2007, 03:31
View user's profile Send private message Reply with quote
smoke



Joined: 16 Jan 2006
Posts: 42
smoke
Nope it isn't the contrast :/ ... there's only a white spot there ... if it was a contrast problem the text should be visible after i click on it (i clicked on it on the screenshot). I've then tried changing my theme .. and its the same ... :/. any ideas ?
Post 18 Oct 2007, 15:50
View user's profile Send private message Reply with quote
handyman



Joined: 04 Jun 2007
Posts: 40
Location: USA - KS
handyman
OK..., for a better idea of what should be displayed, what is your definition of '_mz' and what does it contain?

Can you post your full code? I would like to see if the same thing happens on another machine.
Post 19 Oct 2007, 01:32
View user's profile Send private message Reply with quote
smoke



Joined: 16 Jan 2006
Posts: 42
smoke
okay no problem.. here is it:

ps: do you think maybe the *.res file is the problem?


Description:
Download
Filename: non_working.rar
Filesize: 1.67 KB
Downloaded: 53 Time(s)

Post 19 Oct 2007, 05:03
View user's profile Send private message Reply with quote
smoke



Joined: 16 Jan 2006
Posts: 42
smoke
i solved the problem .. LVS_OWNERDATA was set .. thats why i was unable to write Smile. thank you handyman for trying Smile
Post 19 Oct 2007, 19:31
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
BTW, is there are any resources more or less well documented of LVS_OWNERDATA? I couldn't find nothing convincent and I even don't know from which Windows version it started to be supported. Seems that is good for arrays and I was trying to implement my own "struct array view" some time ago, but if this LVS_OWNERDATA is reliable then I would like to try it first before attempting to create my own control (something not very trivial as I realized Razz).
Post 19 Oct 2007, 22:53
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
LocoDelAssembly wrote:
BTW, is there are any resources more or less well documented of LVS_OWNERDATA? I couldn't find nothing convincent and I even don't know from which Windows version it started to be supported. Seems that is good for arrays and I was trying to implement my own "struct array view" some time ago, but if this LVS_OWNERDATA is reliable then I would like to try it first before attempting to create my own control (something not very trivial as I realized Razz).


IIRC it requires COMCTL32 v4.70 or better. This is true for all win32 versions except Win95 (and NT?). For these old versions IE v3.0 or better must be installed, which will update COMCTL32 then.
Post 20 Oct 2007, 13:42
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Thanks Japheth! I searched wrong yesterday ("LVS_OWNERDATA site:msdn.com" instead of "LVS_OWNERDATA site:microsoft.com"...).

It it good enough for me then
http://msdn2.microsoft.com/en-us/library/bb776779.aspx

not from the link above wrote:
LVS_OWNERDATA
Version 4.70. This style specifies a virtual list-view control. For more information about this list control style, see About List-View Controls.
Post 20 Oct 2007, 14:43
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.