Click here to Skip to main content
15,914,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dynamically Creating code and executing it Pin
Carlos Antollini2-Jan-02 9:20
Carlos Antollini2-Jan-02 9:20 
GeneralRe: Dynamically Creating code and executing it Pin
Roger Wright (new)2-Jan-02 16:33
Roger Wright (new)2-Jan-02 16:33 
GeneralRe: Dynamically Creating code and executing it Pin
Todd Smith2-Jan-02 18:02
Todd Smith2-Jan-02 18:02 
GeneralCImageList & Replace with bitmap mask Pin
2-Jan-02 6:07
suss2-Jan-02 6:07 
GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin2-Jan-02 7:08
Ernest Laurentin2-Jan-02 7:08 
GeneralRe: CImageList & Replace with bitmap mask Pin
2-Jan-02 8:00
suss2-Jan-02 8:00 
GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin2-Jan-02 11:26
Ernest Laurentin2-Jan-02 11:26 
GeneralRe: CImageList & Replace with bitmap mask Pin
3-Jan-02 1:39
suss3-Jan-02 1:39 
>> I wish that I understand what you are trying to accomplish.

I can't really describe the app's usage other than it's a tool for the battlefield.

The application receives CORBA messages that contains an index number and a filename. I need to read the file, convert it to a bitmap (the file can be a bmp, jpg, or gif), and store it into an imagelist using the index number. I receive a bunch of these messages at startup and then any number of messages throughout the app's lifetime. I have no control over when or why these messages will come. Sometimes the new image is a thumbnail of some dynamic situation.

I also then receive updates to items that reference the imagelist. These updates may include changes to the image index number. These items are blobs on a map, tree nodes, tabs, toolbar buttons, menu items, etc.

>> why you are not using the State bitmap instead.

That would only help if my item was selected or not. I need to dynamically update any and all images.

>> I don't feel that you use the mask for anything else than changing the background color of your bitmap.

When I started this, I guess I didn't understand masks. I thought that I just needed to specify a transparency color. What it seems is that there is a one-to-one mask image for every bitmap image in the image list. When you do an imagelist->Add(pImage, COLORREF), the imagelist generates your mask image for you. When you do a imagelist->Replace(pImage, pMask), you must manually create the mask yourself.

>> I question if you really need to create a mask since you plan to change the entire bitmap index.

I didn't think that I needed to create a mask either. I searched everywhere to try and find some example code of the Replace method.

The GetMask code that I posted yesterday does work. For every image that I Replace(), I must create a unique mask.

Thanks for your time and help.

GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin3-Jan-02 5:16
Ernest Laurentin3-Jan-02 5:16 
GeneralSkinStyle (no MFC) error: undefined reference to... Pin
Kuniva2-Jan-02 5:18
Kuniva2-Jan-02 5:18 
Generaldraw lines in a CRichEditCtrl Pin
jafrazee2-Jan-02 5:11
jafrazee2-Jan-02 5:11 
GeneralMoving and Resizing Tool Tip (CToolTipCtrl) Pin
GurGur2-Jan-02 4:30
GurGur2-Jan-02 4:30 
GeneralMultiple documents dialog box Pin
FredrikB2-Jan-02 4:09
FredrikB2-Jan-02 4:09 
GeneralVis Studio won't start add-ins Pin
2-Jan-02 3:45
suss2-Jan-02 3:45 
GeneralRe: Vis Studio won't start add-ins Pin
Lim Bio Liong2-Jan-02 17:05
Lim Bio Liong2-Jan-02 17:05 
GeneralEdit Control Pin
Ray Kinsella2-Jan-02 2:38
Ray Kinsella2-Jan-02 2:38 
GeneralRe: Edit Control Pin
Ernest Laurentin2-Jan-02 4:06
Ernest Laurentin2-Jan-02 4:06 
GeneralCReBar Pin
2-Jan-02 1:40
suss2-Jan-02 1:40 
GeneralRemoving ToolBar & Menu Pin
2-Jan-02 0:24
suss2-Jan-02 0:24 
GeneralRe: Removing ToolBar & Menu Pin
Brian V Shifrin2-Jan-02 0:41
Brian V Shifrin2-Jan-02 0:41 
GeneralRe: Removing ToolBar & Menu Pin
2-Jan-02 1:06
suss2-Jan-02 1:06 
GeneralRe: Removing ToolBar & Menu Pin
Philip Patrick2-Jan-02 0:48
professionalPhilip Patrick2-Jan-02 0:48 
GeneralProblem with CListCtrl Pin
Paresh Solanki2-Jan-02 0:01
Paresh Solanki2-Jan-02 0:01 
GeneralRe: Problem with CListCtrl Pin
Philip Patrick2-Jan-02 0:31
professionalPhilip Patrick2-Jan-02 0:31 
GeneralRe: Problem with CListCtrl Pin
Paresh Solanki2-Jan-02 1:51
Paresh Solanki2-Jan-02 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.