hello all

can somebody please post some info about gfx programming
with winasm? (custom window shapes/bmp buttons/...).
i know that there are sources around but there are not really
what i want. the best thing would be a tutorial about all
techniques and gdi-functions.

thank you
Posted on 2001-11-11 19:07:51 by mob
mob,

your chances of getting "dial a tutorial" are about zero but if you bother to look around, there is some good stuff available and there are some of the members here who are very experienced at image manipulation and others at demo coding.

It will depend how much windows coding you have learnt so far. Most graphics programming is reasonably complicated and you will need to have a reasonably good background in windows API programming to have much chance at doing OK with it.

Regards,

hutch@movsd.com
Posted on 2001-11-11 21:35:23 by hutch--
i think i know what api's are and how to use them...
i looked around and found a couple of sources but
none of them was really helpfull, the most graphical
examples (your masm service packs) seem to explain
only how to use your lib's... i mean they look very good
to me but i want to understand the the way i work
with memory DC's and how to use the gdi functions right.
the other examples i found explain only partial things
like how to print a bitmap... that would be okay, too but
all examples seem to use different techniques and it's
very hard to get through 1000 lines of code just because
to found out whats different and whats not. like i said
the best thing would be a tutorial for graphical coding
in win32asm but i think that a tut that covers this stuff
does not exist so i would be lucky if you know some
places to go for... thank you again.
Posted on 2001-11-12 15:31:40 by mob
I'm just in the process of putting together a tutorial site devoted to just what you're looking for, But Until its up I'll attach this tut I wrote in response to requests from memebrs here a while back.

If you have ideas for other tuts in this area then post them here and if I can I knock one up.

And check this
thread
Posted on 2001-11-12 16:06:24 by Eóin
E?in,

I just downloaded the demo and it builds and runs perfectly, what I would like to do is include it in the MASM32 demo code as there is clearly a demand for GDI coding.

Give the nod and its in, if you can pop a few more they would be appreciated as i am trying to get as wide a range as possible in the example code.

Regards,

hutch@movsd.com
Posted on 2001-11-12 18:37:28 by hutch--
I have written a tutorial for writing a simple game which uses some basic graphical functions (at least a custom drawn control):
It's the mosaic tutorial, you can find it at my site exagone.cjb.net

Thomas
Posted on 2001-11-13 01:51:20 by Thomas
Another program that might help is the LCD cd player, search this board for it I posted it as attachment. It's whole interface is drawn with GDI functions.
Hutch: I think this program would be nice for the masm package too but it's unfinished and not very well commented..

Thomas
Posted on 2001-11-13 01:55:08 by Thomas
Sure Hutch, I'll clean it up tonight when I get home and e-mail it to you.
Posted on 2001-11-13 03:42:53 by Eóin
Thomas,

Tutes are useful but I am trying to add to the example code so the LCD cd player example would be very useful if you have time to tidy it up a bit.

As long as it run OK and builds in the masm32 environment, it should be OK and if you have time to comment it a bit more so its easier to understand, I am sure that many people would appreciate you effort with an example of this type.

Regards,

hutch@movsd.com
Posted on 2001-11-13 06:35:20 by hutch--
yeah...
comment and structure your code!
comment and structure your code!
comment and structure your code!
(repeat and 42 thousand times).

A lot of the example programs at iczelion's site are pretty neat and
such, but.. they are almost useless to learn from. Some of them
almost look like dead listings, except they have variable names...

you can do better, guys :).

Many of the masm32 examples are a lot better though... spacing,
grouping, comments..
Posted on 2001-11-13 07:49:59 by f0dder
Can I ask a Question, I've gotten into a habit of using The Svins WM_CASE Macro for message processing. See this thread

Should I use that, or stick with the .if statemants which are easier for beginners to understand.
Posted on 2001-11-13 08:09:26 by Eóin
Svin's code might not give as clear an idea as to HOW the things
work, but it's definitely a lot more readable. Stick with it.
Posted on 2001-11-13 08:31:42 by f0dder
Hutch:
Tutes are useful but I am trying to add to the example code so the LCD cd player example would be very useful if you have time to tidy it up a bit.
yeah...


Yes I meant the LCD player, not the tutorial... I'll try to comment it today and maybe add some other functions.. Shouldn't be too hard.

F0dder:

comment and structure your code!
comment and structure your code!
comment and structure your code!
(repeat and 42 thousand times).

:) You're totally right and most of the time I comment & structure my code well (and usually add some documenting text files), but this program was just created for fun in a few hours of straight coding :grin:.. I didn't even finish it...

Thomas
Posted on 2001-11-13 11:13:42 by Thomas
arg i hate to register :)
ok so thank you very much for all your replys...
i played around yesterday a little bit and it's
really not so hard like i thought at first...

i tried to write a simple windows shape (with
standart control) as easy as possible... so here
is my result... (not comented yet, sorry)
Posted on 2001-11-13 13:09:42 by mob
Hutch: I've updated my source and it's well commented now... Although the program isn't finished it has the basic features and can be an interesting example... I've included it so you can add it to the masm32 package. It should assemble perfectly with masm32, it uses all the default libs, includes and tools.

Thomas
Posted on 2001-11-13 14:09:30 by Thomas
Originally posted by Thomas
I've updated my source and it's well commented now... Although the program isn't finished it has the basic features and can be an interesting example...
Thomas


Did you enclose a way to close the application? I had to Ctrl-Alt-Delete it... just curious... Like the program though

Sliver
Posted on 2001-11-13 14:15:29 by Sliver
No I didn't create a button or something like that, but you can click it and press ALT+F4.. works for me :)

Thomas
Posted on 2001-11-13 14:35:34 by Thomas
Great app Thomas, my app ani't half as cool. But here it is anyway Hutch, if it compiled before it should compile now just as easily.
Posted on 2001-11-13 15:00:56 by Eóin
Thanks E?in, your program is a nice GDI example too, but it can't beat the 34 byte version that was the result of a thread I posted in comp.lang.asm.x86 (click here) :grin: Even some smaller versions than 34 bytes where created but they didn't draw the full triangle. Not a very good example to learn GDI stuff from though :)

Thomas
Posted on 2001-11-13 15:17:27 by Thomas
E?in and Thomas,

Thanks for making these demos available, I have both of them set up and running and installed in the example code.

Regards,

hutch@movsd.com

E?in, one small problem, you did not put your name and email address in it so I added your name at the top of the source file.
Posted on 2001-11-13 15:37:50 by hutch--