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

C / C++ / MFC

 
GeneralRe: How to capture image of entire screen in any situation? Pin
WithPointer27-Mar-06 18:30
WithPointer27-Mar-06 18:30 
QuestionMixing UxTheme calls with GDI+ Pin
WarnerYoung27-Mar-06 14:29
WarnerYoung27-Mar-06 14:29 
QuestionAnything else I should know about VC++ 2005 ? Pin
Defenestration27-Mar-06 14:29
Defenestration27-Mar-06 14:29 
Questioni don't wanna kill my process... Pin
john-zin27-Mar-06 14:10
john-zin27-Mar-06 14:10 
AnswerRe: i don't wanna kill my process... Pin
toxcct27-Mar-06 20:22
toxcct27-Mar-06 20:22 
QuestionWindows Memory Question Pin
Scope27-Mar-06 10:06
Scope27-Mar-06 10:06 
AnswerRe: Windows Memory Question Pin
Graham Bradshaw27-Mar-06 10:56
Graham Bradshaw27-Mar-06 10:56 
QuestionCreate Toolbar bitmaps in code Pin
sjdevo3gsr27-Mar-06 9:49
sjdevo3gsr27-Mar-06 9:49 
My script language app (in C++) can create Toolbars using either system image list icons or app image list icons. Depending on the app control script code, an app toolbar is created in a loop that adds buttons as needed, by sending a TB_ADDBUTTONS message. A little later in the code I send a TB_ADDBITMAP message. This all works fine, and has done for years.

I now want to set a custom button icon by creating a bitmap (of the appropriate size) in memory, then specify this as the button bitmap, rather than loading a Resource. It seems simple enough: in the TBADDBITMAP structure, set the hInst to NULL , and the nID to the handle of the bitmap I created. Then send TB_ADDBITMAP message as before.

I note that the TB_ADDBITMAP message returns a 2. When I add an image from a Resource image list, it returns a 1. Not sure if this is important or not. The message "Returns the index of the first new image". The result is that my toolbar does not display the image I created, instead I get the default button Icon from my script.

I've been through all the TB_ messages to see if I've missed something, and tried a lot of stuff that still won't work.

Is replacing a toolbar icon resource image with a synthesized image actually possible?

Alternatively, is it possible to draw in the toolbar button image? Various test code ideas seems to suggest not.

Stewart DIBBS
AnswerRe: Create Toolbar bitmaps in code Pin
Waldermort27-Mar-06 17:52
Waldermort27-Mar-06 17:52 
QuestionChild dialog Pin
llp00na27-Mar-06 9:34
llp00na27-Mar-06 9:34 
AnswerRe: Child dialog Pin
Ryan Binns27-Mar-06 17:49
Ryan Binns27-Mar-06 17:49 
GeneralRe: Child dialog Pin
llp00na27-Mar-06 23:16
llp00na27-Mar-06 23:16 
GeneralRe: Child dialog Pin
Ryan Binns27-Mar-06 23:24
Ryan Binns27-Mar-06 23:24 
GeneralRe: Child dialog Pin
llp00na28-Mar-06 0:17
llp00na28-Mar-06 0:17 
GeneralRe: Child dialog Pin
llp00na28-Mar-06 0:43
llp00na28-Mar-06 0:43 
QuestionReading BMP file Pin
Alinuxcs27-Mar-06 8:15
Alinuxcs27-Mar-06 8:15 
QuestionRe: Reading BMP file Pin
David Crow27-Mar-06 8:40
David Crow27-Mar-06 8:40 
AnswerRe: Reading BMP file Pin
Alinuxcs28-Mar-06 4:43
Alinuxcs28-Mar-06 4:43 
GeneralRe: Reading BMP file Pin
David Crow28-Mar-06 5:06
David Crow28-Mar-06 5:06 
GeneralRe: Reading BMP file Pin
Alinuxcs28-Mar-06 6:31
Alinuxcs28-Mar-06 6:31 
QuestionRe: Reading BMP file Pin
David Crow28-Mar-06 7:20
David Crow28-Mar-06 7:20 
AnswerRe: Reading BMP file Pin
Hamid_RT27-Mar-06 19:34
Hamid_RT27-Mar-06 19:34 
AnswerRe: Reading BMP file Pin
Alinuxcs28-Mar-06 4:45
Alinuxcs28-Mar-06 4:45 
QuestionCreate true-type font of my own Pin
includeh1027-Mar-06 6:06
includeh1027-Mar-06 6:06 
QuestionTrying to print with WritePrinter Pin
zaro33327-Mar-06 5:05
zaro33327-Mar-06 5:05 

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.