Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncontrolling system volume by vc++ Pin
B060611518-May-09 22:11
B060611518-May-09 22:11 
AnswerRe: controlling system volume by vc++ Pin
Chandrasekharan P18-May-09 22:36
Chandrasekharan P18-May-09 22:36 
QuestionRe: controlling system volume by vc++ Pin
David Crow19-May-09 5:01
David Crow19-May-09 5:01 
AnswerRe: controlling system volume by vc++ Pin
B060611519-May-09 23:46
B060611519-May-09 23:46 
QuestionCreating a column with bitmaps on CListCtrl residing on a dialog Pin
JJeffrey18-May-09 21:37
JJeffrey18-May-09 21:37 
AnswerRe: Creating a column with bitmaps on CListCtrl residing on a dialog Pin
Stuart Dootson18-May-09 22:49
professionalStuart Dootson18-May-09 22:49 
GeneralRe: Creating a column with bitmaps on CListCtrl residing on a dialog Pin
JJeffrey18-May-09 23:21
JJeffrey18-May-09 23:21 
GeneralRe: Creating a column with bitmaps on CListCtrl residing on a dialog Pin
Stuart Dootson19-May-09 0:34
professionalStuart Dootson19-May-09 0:34 
I'm an f-ing idiot at times....

First problem - you've made your image-list local to the PopulateList function - it needs to be alive as long as the list control is alive (makes sense?), so declare it at class scope with the list control variable.

Second problem - the image index refers to the optional icon that can be to the left of the text in the first column. You can only put text in the rest of the columns - that's the bit I should have remembered D'Oh! | :doh:

To get images in an arbitrary column, you need to use custom-draw. Or a ready-written list control sub-class, like the ones here on CodeProject[^]. This one[^], for example, allows images in any column.



GeneralRe: Creating a column with bitmaps on CListCtrl residing on a dialog Pin
JJeffrey19-May-09 23:26
JJeffrey19-May-09 23:26 
QuestionPure win32 cross-process child windows Pin
megaadam18-May-09 21:36
professionalmegaadam18-May-09 21:36 
Answer[Message Deleted] Pin
Perisic, Aleksandar18-May-09 23:59
Perisic, Aleksandar18-May-09 23:59 
General[Message Deleted] Pin
megaadam19-May-09 1:01
professionalmegaadam19-May-09 1:01 
General[Message Deleted] Pin
Perisic, Aleksandar19-May-09 1:42
Perisic, Aleksandar19-May-09 1:42 
QuestionClosing an MDI child window having a worker thread in execution Pin
CString(0xcccccccc)18-May-09 21:29
CString(0xcccccccc)18-May-09 21:29 
AnswerRe: Closing an MDI child window having a worker thread in execution Pin
Stuart Dootson18-May-09 22:57
professionalStuart Dootson18-May-09 22:57 
QuestionCheck file is open or not Pin
Davitor18-May-09 20:50
Davitor18-May-09 20:50 
AnswerRe: Check file is open or not Pin
Naveen18-May-09 22:06
Naveen18-May-09 22:06 
AnswerRe: Check file is open or not Pin
Stuart Dootson18-May-09 22:44
professionalStuart Dootson18-May-09 22:44 
AnswerRe: Check file is open or not Pin
Divyang Mithaiwala19-May-09 1:00
Divyang Mithaiwala19-May-09 1:00 
GeneralRe: Check file is open or not Pin
_Flaviu4-Oct-11 23:39
_Flaviu4-Oct-11 23:39 
Questionusing container class for c++ class objects Pin
hawk23reddy18-May-09 20:27
hawk23reddy18-May-09 20:27 
AnswerRe: using container class for c++ class objects Pin
CPallini18-May-09 21:26
mveCPallini18-May-09 21:26 
GeneralRe: using container class for c++ class objects Pin
hawk23reddy18-May-09 23:14
hawk23reddy18-May-09 23:14 
GeneralRe: using container class for c++ class objects Pin
CPallini18-May-09 23:53
mveCPallini18-May-09 23:53 
GeneralRe: using container class for c++ class objects Pin
hawk23reddy19-May-09 0:57
hawk23reddy19-May-09 0:57 

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.