Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to dock the views? Pin
SandipG 1-Jul-07 19:56
SandipG 1-Jul-07 19:56 
GeneralRe: How to dock the views? Pin
swamy Narasimha1-Jul-07 23:27
swamy Narasimha1-Jul-07 23:27 
QuestionCImageList and a CListCtrl Pin
locoone1-Jul-07 18:01
locoone1-Jul-07 18:01 
AnswerRe: CImageList and a CListCtrl Pin
Naveen1-Jul-07 18:31
Naveen1-Jul-07 18:31 
GeneralRe: CImageList and a CListCtrl Pin
locoone2-Jul-07 9:08
locoone2-Jul-07 9:08 
GeneralRe: CImageList and a CListCtrl Pin
Naveen2-Jul-07 15:06
Naveen2-Jul-07 15:06 
AnswerRe: CImageList and a CListCtrl Pin
Hamid_RT1-Jul-07 21:12
Hamid_RT1-Jul-07 21:12 
AnswerRe: CImageList and a CListCtrl Pin
sps-itsec461-Jul-07 21:34
sps-itsec461-Jul-07 21:34 
Hi,

if this is the code you wrote it cannot work. You declared a pointer to CHeaderCtrl and some lines below you access this pointer which you never set. This code compiles fine but certainly it results in a crash! You have to ask your CListCtrl instance for the pointer to its header control...

Try the following:
CHeaderCtrl* m_pHdrCtrl = m_YourListCtrl.GetHeaderCtrl();
if(m_pHdrCtrl != NULL)
{
  CImageList * imagelist;
  imagelist = new CImageList();
  ASSERT(imagelist != NULL);
  imagelist->Create(13, 13, ILC_COLOR24, 3, 1);
  CBitmap bm;
  bm.LoadBitmap(IDB_CHECKBOXES);
  imagelist->Add(&bm, RGB(255, 0, 255));
  m_pHdrCtrl->SetImageList(imagelist);
}


cheers,
mykel

OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

QuestionMultiple thumbs on a slider control, Help?... Pin
smguc1-Jul-07 17:22
smguc1-Jul-07 17:22 
QuestionHow to read and write CPU cache? Pin
Surendra Vishwkarma1-Jul-07 16:10
Surendra Vishwkarma1-Jul-07 16:10 
AnswerRe: How to read and write CPU cache? Pin
hameduser1-Jul-07 21:22
hameduser1-Jul-07 21:22 
GeneralRe: How to read and write CPU cache? Pin
Surendra Vishwkarma5-Jul-07 16:07
Surendra Vishwkarma5-Jul-07 16:07 
QuestionHow to add outlookbar to multipe document? Pin
chinakknd1-Jul-07 15:35
chinakknd1-Jul-07 15:35 
QuestionVirtual keyboard losing window focus. Help! Pin
remarkpk111-Jul-07 13:45
remarkpk111-Jul-07 13:45 
AnswerRe: Virtual keyboard losing window focus. Help! Pin
Steve Echols1-Jul-07 17:55
Steve Echols1-Jul-07 17:55 
GeneralRe: Virtual keyboard losing window focus. Help! Pin
remarkpk112-Jul-07 5:00
remarkpk112-Jul-07 5:00 
Questionmemory allocation syntax Pin
prithaa1-Jul-07 9:52
prithaa1-Jul-07 9:52 
AnswerRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 10:01
Mark Salsbery1-Jul-07 10:01 
GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 17:11
prithaa1-Jul-07 17:11 
GeneralRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 19:42
Mark Salsbery1-Jul-07 19:42 
GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 19:59
prithaa1-Jul-07 19:59 
GeneralRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 20:09
Mark Salsbery1-Jul-07 20:09 
GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 20:21
prithaa1-Jul-07 20:21 
QuestionAdding Members to a Base Class Pin
ForNow1-Jul-07 8:05
ForNow1-Jul-07 8:05 
AnswerRe: Adding Members to a Base Class Pin
Mark Salsbery1-Jul-07 8:49
Mark Salsbery1-Jul-07 8:49 

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.