News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Load bmp tool bar "Like" image

Started by hfheatherfox07, August 25, 2011, 08:45:31 PM

Previous topic - Next topic

hfheatherfox07

Hi,
I have a few examples were a long strip of images is loaded and used as the tool bar Icon (for buttons) ....
How do I use the same concept to load smile tool bar for scrolling text ?
I have seen it done using masm32 but how to define each smile?
Like smile 1 through 12  I have seen an example were  in the text  for the scroller for each smile you have db " offh,0h"  <- that is smile 1 than db "offh,2dh" that is smile 4

I don't see the logic in that?

any thought? is it like the sprite example in masm?


hfheatherfox07

Or how can I load just one smilie face and have it scroll in a the text scroller ?

dedndave


hfheatherfox07

I have tons of example in MASM for that but how do I do it for a scrolling Text?

dedndave

i'm not really sure what you mean
you want to stick smileys in with the text ?
kinda like chatting with yahoo messenger ?

i guess it's a matter of...
loading the image
calculating source coordinates (to get the smiley you want)
calculating destination coordinates (like in a compatible DC)
and painting the image in there   :P

hfheatherfox07

Quote from: dedndave on August 26, 2011, 01:31:58 AM
i'm not really sure what you mean
you want to stick smileys in with the text ?
kinda like chatting with yahoo messenger ?

i guess it's a matter of...
loading the image
calculating source coordinates (to get the smiley you want)
calculating destination coordinates (like in a compatible DC)
and painting the image in there   :P

yap I dunno how to do that.... look at the video here http://www.masm32.com/board/index.php?topic=17168.0  go straight to 9:48  to see that effect

http://cyberdoomsystems.narod.ru/ripp/about.rar  from here http://cyberdoomsystems.narod.ru/ripp.html

how did he do that?


soo neat

baltoro

It looks like you are compiling your program as a console application. I'm fairly sure that console applications can't have menus, or rebars (or, bitmaps displayed).   
When you compile with ML.exe, specify the /SUBSYSTEM:WINDOWS switch. And, of course, you'll have to call CreateWindowEx somewhere.
Baltoro

hfheatherfox07

Quote from: baltoro on August 26, 2011, 01:45:53 AM
It looks like you are compiling your program as a console application. I'm fairly sure that console applications can't have menus, or rebars (or, bitmaps displayed).   
When you compile with ML.exe, specify the SUBSYSTEM:WINDOW switch. And, of course, you'll have to call CreateWindowEx somewhere.




LOL I need some of that Hahahahaha

what are you assembling ??

hfheatherfox07

Quote from: dedndave on August 26, 2011, 01:31:58 AM
i'm not really sure what you mean
you want to stick smileys in with the text ?
kinda like chatting with yahoo messenger ?

i guess it's a matter of...
loading the image
calculating source coordinates (to get the smiley you want)
calculating destination coordinates (like in a compatible DC)
and painting the image in there   :P

I know how to load the image and paint the image ....

but how to:
calculating source coordinates (to get the smiley you want)
and:
calculating destination coordinates (like in a compatible DC)
in the example that I saw that was just added in the scroller....


dedndave

cut him some slack...
he's havin a mid-life crisis  

dedndave

well - that doesn't look all that difficult   :P
it's more about paint and scroll than it is about getting an image in there
what i mean is, the paint and scroll code is the hard part
after all the stuff you've been doing, i should come to you to ask how - lol

hfheatherfox07

Quote from: dedndave on August 26, 2011, 02:03:46 AM
cut him some slack...
he's havin a mid-life crisis  

I just meant he was running the wrong program   

hfheatherfox07

Quote from: dedndave on August 26, 2011, 02:05:47 AM
well - that doesn't look all that difficult   :P
it's more about paint and scroll than it is about getting an image in there
what i mean is, the paint and scroll code is the hard part
after all the stuff you've been doing, i should come to you to ask how - lol

I know how to load a smilie see here: http://www.masm32.com/board/index.php?topic=17099.0

I used it to CreateCaret ... but I dunno how to:

1. choose different smilie
2. integrate it into the scrolling text

dedndave

well - a little knowledge of bitmap format is all you need to calculate the source image coordinates
i think everything is stored in 4-bytes per pixel format
the total width of the source image X 4 X line number (zero based) will get you the start of a line
index into each line to get the part of the image you want
i have little experience with this stuff - there is probably a really cool API function to do it for you   :P

as for integrating it into the text - that is, again, a matter of calculating coordinates
then, i suppose BitBlt the thing over there

hfheatherfox07

back to the rebar .... that uses a structure like this:

tbrbtns TBBUTTON <7,10000,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0>
TBBUTTON <8,10001,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0>
TBBUTTON <0,0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0>
TBBUTTON <0,10002,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0>
TBBUTTON <1,10003,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0>
TBBUTTON <2,10004,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0>
ntbrbtns equ 6


how could that be used for smilies....

also if  you down load the example http://cyberdoomsystems.narod.ru/ripp/about.rar   you will see that the smilies are positioned in the data for the text scroller