include windows.inc
include gdi32.inc
include user32.inc
include kernel32.inc
include comdlg32.inc
include masm32.inc
include comctl32.inc
include ole32.inc
include debug.inc

I'm using RadAsm i have added this includes but when assembly my prog.

mp3Cleaner.asm(87) : error A2006: undefined symbol : LVM_SETBKIMAGE
mp3Cleaner.asm(82) : error A2006: undefined symbol : LVBKIF_SOURCE_URL
Posted on 2003-04-01 07:06:48 by AceEmbler
I think all of these are missing
LVM_SETBKIMAGE				equ				4096 + 68

LVBKIF_SOURCE_NONE equ 000000000h
LVBKIF_SOURCE_HBITMAP equ 000000001h
LVBKIF_SOURCE_URL equ 000000002h
LVBKIF_SOURCE_MASK equ 000000003h
LVBKIF_STYLE_NORMAL equ 000000000h
LVBKIF_STYLE_TILE equ 000000010h
LVBKIF_STYLE_MASK equ 000000010h
LVM_SORTITEMSEX equ LVM_FIRST + 81
LVS_EX_BORDERSELECT equ 16384
Posted on 2003-04-01 07:09:56 by donkey
Man you are allways here to support me ;)

This one too

LVBKIMAGE struct
ulFlags ULONG ?;Flags (no comment)
hbm dd ?;Not used currently
pszImage dd ? ;Address to 0 term string (URL bkg image)
cchImageMax dd ? ;Size of buffer URL (ignore while sending to cntrl)
xOffsetPercent dd ? ;Percentage X
yOffsetPercent dd ? ;Percentage Y
LVBKIMAGE ends


Im gona include some missed.inc to my progs. :P



BTW wtf is with this one ?

LVM_SORTITEMSEX equ LVM_FIRST + 81
LVS_EX_BORDERSELECT equ 16384

dont get it ( i do not have LVM_FIRST )
Posted on 2003-04-01 07:21:26 by AceEmbler
You will find that LVBKIMAGE is already in the Windows.inc file.

LVM_SORTITEMSEX use a callback to sort the listview ( i used it )
LVS_EX_BORDERSELECT selected items show only a hilited border ( i have never used it )
Posted on 2003-04-01 07:28:06 by donkey
LVM_SORTITEMSEX is a much more practical method of sorting a listview as it makes subitem sorts easier.
Posted on 2003-04-01 07:37:40 by donkey
do i have LVBKIMAGE in the windows.inc ?
i dont. :grin:

LVM_FIRST <--- what is this (wher is this defined) ?
Posted on 2003-04-01 07:46:00 by AceEmbler
Version 1.25e of the Windows.inc is the current one you can get it from Hutch's page LVM_FIRST equ 1000h is in there as well. Actually on a quick check all of those constants with the exception of LVM_SORTITEMSEX was added a while back, I remember because I supplied them.
Posted on 2003-04-01 07:48:57 by donkey
Do u have any example of bitmap background in a ListBox made in masm32 ??
Posted on 2003-04-01 07:53:58 by AceEmbler
You mean a ListView :)

LOCAL LVBKSTR	:LVBKIMAGE


mov LVBKSTR.ulFlags,LVBKIF_SOURCE_URL
mov LVBKSTR.pszImage,offset IMAGENAME
mov LVBKSTR.xOffsetPercent,0
mov LVBKSTR.yOffsetPercent,0
invoke SendMessage,LVHANDLE,LVM_SETBKIMAGE,0,ADDR LVBKSTR
invoke SendMessage,LVHANDLE,LVM_SETBKCOLOR,0,CLR_NONE
invoke SendMessage,LVHANDLE,LVM_SETTEXTBKCOLOR,0,CLR_NONE
This is from a peice of code I used once. I don't think that LVBKIF_SOURCE_HBITMAP works yet, maybe the next release of common controls who knows.

Use the following format for the bitmap file name as it must conform to URL naming conventions :

"file://C:/Documents%20and%20Settings/hello.bmp",0
Posted on 2003-04-01 08:02:38 by donkey
DAMN im stupid i was thinking about ListBox not ListView all the time i do not know why i was posting about ListView.(probably to much time spent before the keyboard).

So my question is can i set Bitmap ListBox background :confused:
Posted on 2003-04-02 04:29:42 by AceEmbler
i was making sth like this but it's not working.

invoke LoadImage,hInst,addr backa,IMAGE_BITMAP,600,500,LR_LOADFROMFILE
mov hbackgr,eax

invoke CreatePatternBrush,eax
mov hbrush,eax

uMsg==WM_CREATE
invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR ListClassName,0,WS_VSCROLL or WS_VISIBLE or WS_BORDER or WS_CHILD or \
LBS_HASSTRINGS or LBS_NOINTEGRALHEIGHT,120,50,200,310,hWnd,ListID,hInstance,NULL
mov hListBox,eax

;This 3 100%working

;but this one probably not
.ELSEIF uMsg==WM_CTLCOLORLISTBOX
invoke SetBkMode,wParam,2 ; 1 = TRANSPARENT or 2 = OPAQUE
invoke SetTextColor,wParam,0000FF00h ; text color value
invoke SetBkColor,wParam,00000000h ; Backgrn color value
invoke GetStockObject,BLACK_BRUSH


FORGET IT i just forgot about "ret" in the end of this piece.

.ELSEIF uMsg==WM_CTLCOLORLISTBOX
invoke SetBkMode,wParam,2 ; 1 = TRANSPARENT or 2 = OPAQUE
invoke SetTextColor,wParam,255 ; text color value
invoke SetBkColor,wParam,00000000h ; Backgrn color value
mov eax,hbrush ;Prepared before this WM_CTLCOLORLISTBOX
ret
.ELSEIF uMsg==WM_CHAR


WORKS GREAT (bugs are starting when im adding items to a list :alright: )
Posted on 2003-04-02 08:41:58 by AceEmbler