News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Images in Listview

Started by Grincheux, November 23, 2006, 12:47:43 PM

Previous topic - Next topic

Grincheux

I am trying to write a small ACDSee software and meet some problems with image into a listview.

When Windows sends LVN_GETDISPINFO I load the picture and draw it into an imagelist.

On the screen I temporarily see the image and it is replaced by a white image !

I don't understand. And MSDN does not say anything very interesting on using images into listview.

I join my project expecting some help :dance:.

Thanks



[attachment deleted by admin]
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

PBrennick

I could not build the project to test your problem because you did not include the res folder in your zip.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

six_L

#2
Hey,PBrennick
maybe we don't need res file. here is a exe that i made with his source code.

more German words, read difficult.
regards

six_L

Hey,Grincheux
.DATA?
Pointers    dd OBJECTS_COUNT dup(?)
.CODE
;-------- VirtualAlloc --------
mov     esi, OBJECTS_COUNT
@@:
invoke  VirtualAlloc, 0, OBJECT_SIZE, MEM_COMMIT, PAGE_READWRITE
dec     esi
mov     [Pointers + esi*4], eax
jnz     @B
@@:
mov     eax, [Pointers + esi*4]
invoke  VirtualFree, eax, 0, MEM_RELEASE
inc     esi
cmp     esi, OBJECTS_COUNT
jne     @B
;==============================================================================

Quotecausation:
1. made the windows msg to be mess
2. the memorys allocating have some problems. one JPG file should be a piece of memory
;==============================================================================
maybe the code works ok while a directory has one JPG file.

[attachment deleted by admin]
regards

PBrennick

Is that a fact?

Then how do you explain this and the errors it creates when the bitmaps do not exist? I prefer to use the toolbar.


IDB_BARREOUTILS         BITMAP                  "Res\\ToolBar.bmp"
IDB_BO16_01             BITMAP                  "Res\\BO1616_01.bmp"


Paul
The GeneSys Project is available from:
The Repository or My crappy website

six_L

there are the "Res\\ToolBar.bmp","Res\\BO1616_01.bmp" in his original zip file.
regards

PBrennick

Grincheux,
Quote
I join my project expecting some help
This sounds a bit presumptous to me, but I just love your user name.  :U

six_L,
Thanks,
So you are using them. You are confusing me.  :dazzled:

Anyway, I guess my first download failed as it did not have that folder. The one I just got has it.

I'm outta, here, stay cool  :8)

Paul
The GeneSys Project is available from:
The Repository or My crappy website

xandaz

   Hey. Any ideas on how to add images of different sizes either to an imagelist and a listview control? should i use ownerdraw? i'm making a resource viewer and i'm currently using shell32 and explorer.exe except some bitmaps are different in size from the others. i'd like to know what to do about this . If someone has answers feel free to reply.
   Ty and bye.
   best regards  :U