Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: stupid beginner Pin
Christian Graus27-Oct-02 17:34
protectorChristian Graus27-Oct-02 17:34 
GeneralEnableToolTips for view (doc/view) affects main toolbar tooltips!? :\ Pin
Janeko27-Oct-02 12:59
Janeko27-Oct-02 12:59 
GeneralCDockContext Pin
MaTrIX2k227-Oct-02 11:50
MaTrIX2k227-Oct-02 11:50 
Generalconsole app disappearing VS.NET Pin
User 814727-Oct-02 11:02
User 814727-Oct-02 11:02 
GeneralListBox Characteristics Pin
Ayush27-Oct-02 9:03
Ayush27-Oct-02 9:03 
GeneralRe: ListBox Characteristics Pin
Ravi Bhavnani27-Oct-02 9:36
professionalRavi Bhavnani27-Oct-02 9:36 
QuestionHow it Possible.? Pin
Renjith Ramachandran27-Oct-02 7:01
Renjith Ramachandran27-Oct-02 7:01 
Generalproblems with changing list items' image icon Pin
Matias27-Oct-02 6:29
Matias27-Oct-02 6:29 
i have some different status icons for every item in a list. i wish that i can change these icons in each item dynamically.

now it's very strange because my code works well under Win32 Debug's build but not for Win32 Release's, under Win32 Release's build the icons cannot be updated!

below are my current implementation, wish someone can help me to find out the problem. thanks a millions in advance!
-----------------------------------------------------------------
Initializations:
-----------------------------------------------------------------
CListCtrl lsclMyList;
CImageList imgls4MyList;
HICON hIcon0, hIcon1;

imgls4MyList.Create(16, 16, ILC_COLOR16 | ILC_MASK, 2, 1 );
hIcon0 = reinterpret_cast<hicon>(
::LoadImage ( AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ICON0),
IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR ));
hIcon1 = reinterpret_cast<hicon>(
::LoadImage ( AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR ));
imgls4MyList.Add ( hIcon0 );
imgls4MyList.Add ( hIcon1 );
lsclMyList.SetImageList ( &imgls4MyList, LVSIL_SMALL );

-----------------------------------------------------------------
1st Time Insert Item:
-----------------------------------------------------------------
LVITEM lvItem;
lvItem.mask = LVIF_TEXT | LVIF_IMAGE;
lvItem.iItem = 0;
lvItem.iImage = 0;
......// other text info
lsclMyList.InsertItem(&lvItem);

-----------------------------------------------------------------
Update Item's Icon:
-----------------------------------------------------------------
LVITEM lvItem;
lvItem.mask = LVIF_IMAGE;
lvItem.iItem = 0;
lvItem.iImage = 1;
lsclMyList.SetItem(&lvItem);


anyone knows why? i don't know where's the problem because it's working under Win32 Debug's build, there it can update the icon as i wanted. but it's so odd that when i build it for Win32 Release, the icon never changed!



programming+soccer = my current life Smile | :)
GeneralRe: problems with changing list items' image icon Pin
Chris Losinger27-Oct-02 7:00
professionalChris Losinger27-Oct-02 7:00 
GeneralRe: problems with changing list items' image icon Pin
Matias27-Oct-02 7:06
Matias27-Oct-02 7:06 
GeneralRe: problems with changing list items' image icon Pin
peterchen27-Oct-02 7:29
peterchen27-Oct-02 7:29 
GeneralRe: problems with changing list items' image icon Pin
Matias27-Oct-02 7:39
Matias27-Oct-02 7:39 
Questionfor (; !Free; ) ; ???? Pin
tongc27-Oct-02 5:51
tongc27-Oct-02 5:51 
AnswerRe: for (; !Free; ) ; ???? Pin
Chris Losinger27-Oct-02 6:25
professionalChris Losinger27-Oct-02 6:25 
AnswerRe: for (; !Free; ) ; ???? Pin
Joaquín M López Muñoz27-Oct-02 10:56
Joaquín M López Muñoz27-Oct-02 10:56 
GeneralRe: for (; !Free; ) ; ???? Pin
tongc27-Oct-02 11:18
tongc27-Oct-02 11:18 
AnswerRe: for (; !Free; ) ; ???? Pin
ian mariano27-Oct-02 21:51
ian mariano27-Oct-02 21:51 
QuestionHelp! LNK2005 Error? Pin
Dean_Lee27-Oct-02 4:35
Dean_Lee27-Oct-02 4:35 
AnswerRe: Help! LNK2005 Error? Pin
Chris Losinger27-Oct-02 4:50
professionalChris Losinger27-Oct-02 4:50 
GeneralRe: Help! LNK2005 Error? Pin
Dean_Lee27-Oct-02 5:04
Dean_Lee27-Oct-02 5:04 
QuestionUpdate my systray icon after explorer crash? Pin
Anonymous27-Oct-02 4:27
Anonymous27-Oct-02 4:27 
AnswerRe: Update my systray icon after explorer crash? Pin
Michael Dunn27-Oct-02 5:17
sitebuilderMichael Dunn27-Oct-02 5:17 
GeneralFile Transfer-- Binary Data Pin
Pett27-Oct-02 4:23
Pett27-Oct-02 4:23 
GeneralRe: File Transfer-- Binary Data Pin
Anonymous27-Oct-02 5:20
Anonymous27-Oct-02 5:20 
Generalsome Hex number Pin
tongc27-Oct-02 4:04
tongc27-Oct-02 4:04 

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.