Click here to Skip to main content
16,005,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Hamid_RT19-Jun-07 0:47
Hamid_RT19-Jun-07 0:47 
AnswerRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 6:29
Chen-XuNuo19-Jun-07 6:29 
AnswerRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 4:48
James R. Twine19-Jun-07 4:48 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 6:27
Chen-XuNuo19-Jun-07 6:27 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 6:56
James R. Twine19-Jun-07 6:56 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 22:41
Chen-XuNuo19-Jun-07 22:41 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine20-Jun-07 0:04
James R. Twine20-Jun-07 0:04 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:01
Chen-XuNuo20-Jun-07 3:01 
Oh~~~~~~~~~~~~I seldom do the GDI+ and I haven't use the "Bitmap" before.When I do this in my project:

HBITMAP hBitmap=LoadBitmap(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDB_BITMAP1));
m_imagelist->Create(200,200,ILC_COLOR24|ILC_MASK,1,4);
Bitmap img(hBitmap);
Bitmap* pThumbnail = static_cast<Bitmap*>(img.GetThumbnailImage(200, 200, NULL, NULL));
pThumbnail->GetHBITMAP(NULL, &hBitmap);
CBitmap bitmap;
bitmap.Attach(hBitmap);

m_imagelist->SetImageCount(1);
m_imagelist->Replace(0,&bitmap,NULL);

m_listctrl.SetImageList(m_imagelist,LVSIL_NORMAL);
m_listctrl.InsertItem(0,"1",0);

There are errors:
D:\Code\I Do\ListControl2\ListControl2Dlg.cpp(143) : error C2065: 'Bitmap' : undeclared identifier
D:\Code\I Do\ListControl2\ListControl2Dlg.cpp(143) : error C2146: syntax error : missing ';' before identifier 'img'
D:\Code\I Do\ListControl2\ListControl2Dlg.cpp(143) : error C2065: 'img' : undeclared identifier
D:\Code\I Do\ListControl2\ListControl2Dlg.cpp(144) : error C2065: 'pThumbnail' : undeclared identifier
D:\Code\I Do\ListControl2\ListControl2Dlg.cpp(144) : error C2061: syntax error : identifier 'Bitmap'
pThumbnail->GetHBITMAP(NULL, &hBitmap);
Sigh | :sigh:


GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:16
Chen-XuNuo20-Jun-07 3:16 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:25
Chen-XuNuo20-Jun-07 3:25 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine20-Jun-07 4:55
James R. Twine20-Jun-07 4:55 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 21:02
Chen-XuNuo20-Jun-07 21:02 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine21-Jun-07 1:45
James R. Twine21-Jun-07 1:45 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo21-Jun-07 16:37
Chen-XuNuo21-Jun-07 16:37 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Mark Salsbery19-Jun-07 6:50
Mark Salsbery19-Jun-07 6:50 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 7:01
James R. Twine19-Jun-07 7:01 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Mark Salsbery19-Jun-07 7:56
Mark Salsbery19-Jun-07 7:56 
QuestionZoom in PRSDK (Canon SDSK supporting Power shot A640) Pin
Johnbrithol18-Jun-07 23:15
Johnbrithol18-Jun-07 23:15 
QuestionHow to resize CEdit dynamically? Pin
Soleil couchant18-Jun-07 23:06
Soleil couchant18-Jun-07 23:06 
AnswerRe: How to resize CEdit dynamically? Pin
Rage18-Jun-07 23:29
professionalRage18-Jun-07 23:29 
AnswerRe: How to resize CEdit dynamically? Pin
David Crow19-Jun-07 2:53
David Crow19-Jun-07 2:53 
AnswerRe: How to resize CEdit dynamically? Pin
bob1697219-Jun-07 4:46
bob1697219-Jun-07 4:46 
AnswerRe: How to resize CEdit dynamically? Pin
Mark Salsbery19-Jun-07 7:42
Mark Salsbery19-Jun-07 7:42 
Questionhow to set text in different fonts in defferent lines of static text control Pin
Banks K18-Jun-07 23:01
Banks K18-Jun-07 23:01 
AnswerRe: how to set text in different fonts in defferent lines of static text control Pin
Rage18-Jun-07 23:30
professionalRage18-Jun-07 23:30 

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.