Click here to Skip to main content
15,900,973 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: modal dialog Pin
David Crow18-May-04 2:21
David Crow18-May-04 2:21 
GeneralRe: modal dialog Pin
Mahendra_78619-May-04 21:48
Mahendra_78619-May-04 21:48 
GeneralSending message to window Pin
Imtiaz Murtaza18-May-04 1:34
Imtiaz Murtaza18-May-04 1:34 
GeneralRe: Sending message to window Pin
jmkhael18-May-04 1:41
jmkhael18-May-04 1:41 
GeneralRe: Sending message to window Pin
Imtiaz Murtaza18-May-04 1:44
Imtiaz Murtaza18-May-04 1:44 
GeneralRe: Sending message to window Pin
jmkhael18-May-04 1:48
jmkhael18-May-04 1:48 
GeneralRe: Sending message to window Pin
nguyenvhn18-May-04 1:52
nguyenvhn18-May-04 1:52 
GeneralChanging toolbar images Pin
Member 63398318-May-04 1:24
Member 63398318-May-04 1:24 
I have a toolbar button that I want to change dynamically to different solid blocks of colour. I can get a handle to the current image using

tbbi.dwMask = TBIF_IMAGE;
SendMessage(hTB,TB_GETBUTTONINFO,(WPARAM)TB_COLOUR,(LPARAM)&tbbi);
himl = (HIMAGELIST)SendMessage(hTB,TB_GETIMAGELIST,0,0L);
ImageList_GetImageInfo(himl,tbbi.iImage,&ii);

and I can replace the image and tell the toolbar to use the new one using

ImageList_Replace(himl,tbbi.iImage,hbm,NULL);
SendMessage(hTB,TB_CHANGEBITMAP,TB_COLOUR,MAKELPARAM(tbbi.iImage,0));

but how do I change the bitmap or create a new one? I've tried

hbm = (HBITMAP)CopyImage(ii.hbmImage,IMAGE_BITMAP,size.cx,size.cy,LR_COPYRETURNO);

selecting into a HDC, and using FillRectEx but it doesn't work. I'm using C and win32 (I don't know C++ or MFC).

Any help appreciated.
thanks
Dave Risley
GeneralCImageList::Draw() Pin
alex.barylski18-May-04 1:23
alex.barylski18-May-04 1:23 
GeneralRe: CImageList::Draw() Pin
Roger Allen18-May-04 4:37
Roger Allen18-May-04 4:37 
GeneralRe: CImageList::Draw() Pin
alex.barylski18-May-04 6:59
alex.barylski18-May-04 6:59 
GeneralCTreeCtrl and Checkboxes Pin
mmica18-May-04 0:48
mmica18-May-04 0:48 
GeneralRe: CTreeCtrl and Checkboxes Pin
jmkhael18-May-04 0:59
jmkhael18-May-04 0:59 
GeneralRe: CTreeCtrl and Checkboxes Pin
birdtable18-May-04 10:34
birdtable18-May-04 10:34 
GeneralHWND in Dialog based application Pin
-alok-18-May-04 0:07
suss-alok-18-May-04 0:07 
GeneralRe: HWND in Dialog based application Pin
jmkhael18-May-04 0:24
jmkhael18-May-04 0:24 
GeneralRe: HWND in Dialog based application Pin
Roger Stoltz18-May-04 0:39
Roger Stoltz18-May-04 0:39 
GeneralRe: HWND in Dialog based application Pin
David Crow18-May-04 2:24
David Crow18-May-04 2:24 
GeneralRe: HWND in Dialog based application Pin
-alok-18-May-04 15:55
suss-alok-18-May-04 15:55 
GeneralRe: HWND in Dialog based application Pin
Roger Stoltz18-May-04 23:22
Roger Stoltz18-May-04 23:22 
GeneralRe: HWND in Dialog based application Pin
David Crow19-May-04 2:19
David Crow19-May-04 2:19 
QuestionHow to tell the length of an SSL Stream... ? Pin
Peejay17-May-04 22:58
Peejay17-May-04 22:58 
AnswerRe: How to tell the length of an SSL Stream... ? Pin
toxcct18-May-04 2:49
toxcct18-May-04 2:49 
GeneralRe: How to tell the length of an SSL Stream... ? Pin
Peejay18-May-04 3:13
Peejay18-May-04 3:13 
GeneralRe: How to tell the length of an SSL Stream... ? Pin
toxcct18-May-04 3:33
toxcct18-May-04 3:33 

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.