ive been racking my brain for 6 hours, trying to figure out how to get bitmap files to work on the toolbars, ive printed boath programs, ive looked at there diffrences and i cannot find out why mine does not work, i orignaly started with my own bitmap, then went to one thats in the examples. ive copyed the size of the buttons and tryed everything i could think of, i did uncomment the area it asked to, but i still cannot figure out what file holds the data for the bmp. someone help me out?
Posted on 2002-05-01 07:30:24 by EvanderCrovax
The basic are this, you have a seperate bmp file that is included in your RC file. When you build the complete file, the BMP is compiled into a RES file and converted to an OBJ file which is part of the EXE file.

Have a look at the example code in MASM32. it does this stuff in enough places.

Regards,

hutch@movsd.com
Posted on 2002-05-01 08:15:30 by hutch--
yes i did look at the examples, ive printed boath the example and my program, i cannot figure out how to get the bmp to display on the button toolbar
Posted on 2002-05-01 19:26:43 by EvanderCrovax
you can zip your code and post it to the board as attachment. that way others can look at it for you :)
Posted on 2002-05-01 19:38:28 by Hiroshimator
ill tell you exactly what i did, i created a template from prostart, i uncommented the area it asked for the bmp
" ; ------------------------
; Uncomment following when
; bitmap has been created
; ------------------------
invoke LoadBitmap,hInstance,750
mov hTbBmp,eax
"
now, im trying to apply bitmaps to my toolbar yet, theres no explanation on how to load the bitmaps into the buttons, ive read the bitmap button tutorial, it didnt help, just compiled with an error.. my toolbar here.
"
Create_Tool_Bar 25, 25

TBextraData ; additional data for TBBUTTON structure

(blah blah commented explanation of the buttons)

TBblank
TBbutton 1, 50
TBbutton 2, 51
TBbutton 3, 52

ret

Do_ToolBar endp

"
as you can see. its just a default template. this should not be so complicated, ive searched thoughout the asm files to find where to load the bmp. i tryed includeing it.. complied with an error. so i have no clue anymore, im eather going to remove the toolbar, or do basic text, unless you understand what im saying and can help me.
Posted on 2002-05-02 01:50:33 by EvanderCrovax
OK,

The rest is the easy bit, create a bitmap that is a sequence of button images in a single strip and make sure the images are the size you set for the button size/bitmap size in the toolbar button proc.

Save the file as a bitmap and then place it in your RC file with the ID number of 750.

With the code you showed uncommented, just run Build All and the resource file will be built including the toolbar bitmap you created and it will be linked into the EXE file.

ASCII ART :)


-------------------------------
| 1 | 2 | 3 | 4 | 5 | 6 |
-------------------------------

This is the format of how a toolbar button is built. Each image must be the same size.

Do all of this and the file should build OK and the images you made with the bitmap should display on the toolbar.

Regards,

hutch@movsd.com
Posted on 2002-05-02 02:30:42 by hutch--
hahahahahaha, im a moron, ok i finaly understand your first post. i got it, thanks hutch
Posted on 2002-05-02 03:54:28 by EvanderCrovax