Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dissapearing bitmaps from CImageList

Status
Not open for further replies.

Nosferatu

Programmer
Jun 9, 2000
412
0
0
RO
Hello...

I am having a bit of trouble with some dissapearing bitmaps in my GUI.

Most of the controls in the application share the same image list, loaded from the resources as the application starts.
At some point, when I do some stuff with a Database in a dialog, the icons start to dissapear from all over the application, first a few of them, then all of them.

What I do in all the dialogs is set the image list for the control by passing the pointer of the image list loaded at the start of the application.

Anybody has any idea about this?
I remember at some point seeing something about some flags that specify something about shared memory image lists.
Obviously, this is blurry to me [3eyes],

so any help is appreciated.

TIA,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
>> Anybody has any idea about this?

a) could have a resource leak.
b) could have a memory corruption problem.
c) could be related to management/use of the image lists
d) .... all sorts of other things

-pete
 
Well... I found the problem under your d) subject, Pete.

The control that was causing the problems was a list control.
The LVS_SHAREIMAGELISTS style should have been used.

Strangely, when using other lists, I did not get this problem, even if the flag was not set in those cases neither.

Cheers,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
>> Well... I found the problem under your d) subject, Pete.

I started laughing when i read that. Then i read the rest of your post... it actually it falls under the (c) subject
;-)

-pete
 
Duh... indeed.
That sort of confusion is happening when you are using one part of the brain to work on projects and the other part to judge current events implications on international scene...

This darn TV! I just can't turn it off. But I did in the end. But again... CNN's main page seems to be glued to the taskbar for some reason...

Cheers,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top