I am back, I thought I might as well write code for newbies
and truely leave a mark by passing on what I know.
So if you need any question answered, with CODE
just ask me, by stating the problem or task and
say, hey Z, can you help on this?
Hope you all have had a good asm learning exp.
Zcoder.... :U
Ok, I need help. I am a card carrying newbie. I need some example code of putting up 4 windows on a desktop each having a seperate thread so I can run different programs in each one. Any help would really be appreciated. Thanks.
I wrote this example in 5 minutes.
not sure if this is what you wanted.
it sounded to me like a app that put
up 4 windows each having their own thread(by creating 4 class's)
I don't use MASM32 I use my own, all you have to do is
change all the \Altra32\include\windows.inc ECT to \MASM32\include\windows.inc
if you use MASM32. otherwise it is written for MASM.
I also included my own macro file that I use just so you can get
the project to work.
let me know if this is what you was looking for.
Zcoder....
[attachment deleted by admin]
Hi, I rarely get an answer, hope you'll be exception. My problem that appeared long time ago, is "how to draw things on child window" (f.e. some rect border that must be moved (redrawn)). I'm actually trying to implement dialog editor. See in this picture what I'm trying to do http://img101.imageshack.us/img101/5933/vised0yf.png (how can be the situation in bottom of the picture achieved)
Hi zcoder,
Nice to see you around again.
Edgar
Hi Donkey,
been along time sence I got to share code ideas with you.
ramguru , I think what you want is the code to draw a rect on the form.
IF you give me some time I can make one for you in a window, so you can
see how it is done, it's really simple as hell.
Zcoder....
Ok, I made the example just took me 15 minutes
to write all that LOL, but I think it's what you wanted.
What it does: A form is shown and you leftclick on the form and
while holding down on the mouse you drag it about a rect will
follow the mouse growing or shrinking as you move the mouse
then when you release the mouse it all disapears like magic. lol
Anyways, thats how it would function in a Visual IDE.
Now if this is not what you wanted then let me know cuz it
has to be the other part, where you click on a control and a rect
forms around it and as you move the mouse the rect, which is already
a size moves with the mouse.
That is easy but hard, cuz as I do it in zeta32 I put all that code in
a module that is used as a sub class to all the controls that would
do this, so I would have to make a whole subclass of at least a button
then you could see how to put it into other controls.
Now I must say I do my controls as OBJ or OOP so that I write code once
and it will work for all controls.
Zcoder...
[attachment deleted by admin]
Thanks, seems to be IT, but unfortunately it doesn't work in my app, probably because whole dialog is already double-buffered (the grid. etc is drawn into CreateCompatibleBitmap). Maybe there is some special dc that will do the job (not desktop's) ?
ramguru,
The example I gave you does not draw on the desktop, it draws
on the DC of the form or window it is in.
And even if you are drawing the grid in a bitmap at WM_PAINT time
you can still use, cuz WM_MOUSEMOVE does not come at same time as WM_PAINT does
infact while draging the mouse around the mouse can't even resize the form so you
will not get a WM_PAINT untill the mouse is released, and the rect is gone by that time.
Infact here is where that code came from a unfinished Visual IDE I made
I got it out of there cuz it was easier to find the code then in the current
zeta32 project.
Zcoder....
[attachment deleted by admin]
Quote from: zcoder on February 06, 2006, 05:59:29 PM
ramguru,
The example I gave you does not draw on the desktop, it draws
I know that...
maybe I'll try to add some code, later if you'll be in the same mood (to help), I'll post the source-code and you'll look at it...
BTW maybe you have the anwser to this: how to redraw groupbox (I've tried everything but nothing helped), I've googled for the answer all I've found was that groupbox not tolerates WS_CLIPXXX styles (actually this style is neseccary for dialog in which grid is drawn)
The code for the 4 windows was a big help. The only thing that I will have to do now is modify it so that when I close one of the windows, all of the windows don't close. Thanks agian for your help.
ramguru,
I know alot about Visual IDE's
infact the zeta32 you have is unfinished but
run it and double click the controls and see
what you find lol
90% of the controls on the tool window work ect
and thats almost all the common controls I had to fight
windows just to get my way.
the project menu works making many forms as you want and mudules and class's too.
The code for that project is old but it is still made right
it is made using opp so when you add, change or fix a module
it fix's all other controls that use it.
If you need more info ect I am always availible to show you
how to do all this in this area of programming.
Zcoder....
I can see that GroupBox in your dialog editor has some problems too :) (it is filled with bkcolor only when I minimize/maximize). It becomes transparent when I move it. My project is actually not an IDE... Hope you'll add something to your IDE that will make it "topmost" like The Matrix skin :)
Yeah, thats the old zeta32 project
it was one of the steps I made to learn it all.
I always keep each step in a different folder so if I REALLY
mess it up badly I can go back to where is was at least working better lol
Anyways what I wanted you to look more at was the rects it made on the form
and the resizing of the controls
and the groupbox was a XP problem hehehe.
Zcoder....
Quote from: zcoder on February 06, 2006, 07:20:27 PM
Anyways what I wanted you to look more at was the rects it made on the form
and the resizing of the controls
and the groupbox was a XP problem hehehe.
Zcoder....
Took a look at that too, everything works well, except one thing that I try to avoid - flicker... :cheekygreen:
umm, I test it on a 450MHZ system
no flicker on that machine.
That one I can't even duplicate so I am not sure
I can fix that.
So I do hope you find a better method to do your form
in.
Zcoder....