I just want the basic idea as to how to go about making one. Though if anyone can point me t some sources there is nothing like it;)
Posted on 2001-09-01 06:23:07 by MovingFulcrum
SpAsm sources. http://betov.free.fr/SpAsm.html

Run SpAsm / Load SpAsm.exe / go one screen down

Right click on 'InitDialogEdition' in:

> .Else_If eax e M00_New_Dialog | call InitDialogEdition

go one screen down / Right Click on 'EditDialogBoxProc' in:

api 'User32.DialogBoxIndirectParamA' D?hinstance, ; "create..." > modeless
DialogBoxData 0 EditDialogBoxProc 0 ; "Dialog..." > modal

...Welcome in hell. Betov.
Posted on 2001-09-01 06:45:42 by Betov
Thanks for the reply betov but could somebody just explain me the basic idea as to how to go about it. I mean getting those resize borders around every object and placing them on the dialog box, etc.
Posted on 2001-09-01 11:16:07 by MovingFulcrum
I have done this in Visual Basic, not ASM.. maybe what I say will help.

The way I did it was I made a control array for each control I used, like buttons, check boxes, etc. When the button toolbar was clicked, it placed the selected control on the palette, updating the control array. Then I made resize handles out of little pictureboxes and updated the width and height based on the pictureboxes.

I suggest looking up WM_SetCapture (I think) and using that to drag your controls around.

Hope I helped a little.. hehe

Torch
Posted on 2001-09-01 11:21:16 by Torch
betov is right, and if you want another example, go to the FASM page and check out his reource.inc. Basically a macro that adds resources to the PE in the same way the SpAsm adds resources to its PE.

To get a good example of what these look like to a compiled exe, look in the Win32 examples for the FASM source. Also, I think msvc has some stuff like that too
Posted on 2001-09-01 16:17:33 by Kenny
This simple proc deals with drawing the border rect
around controls and tool windows in RadASM.

ToolDrawRect proc uses esi,lpRect:DWORD,nFun:DWORD

LOCAL ht:DWORD
LOCAL wt:DWORD
LOCAL rect:RECT

invoke CopyRect,addr rect,lpRect
lea esi,rect
assume esi:ptr RECT
mov eax,[esi].right
sub eax,[esi].left
jnc @f
mov eax,[esi].right
xchg eax,[esi].left
mov [esi].right,eax
sub eax,[esi].left
dec [esi].left
inc [esi].right
inc eax
@@:
mov wt,eax
mov eax,[esi].bottom
sub eax,[esi].top
jnc @f
mov eax,[esi].bottom
xchg eax,[esi].top
mov [esi].bottom,eax
sub eax,[esi].top
dec [esi].top
inc [esi].bottom
inc eax
@@:
mov ht,eax
dec [esi].right
dec [esi].bottom
.if nFun==0
invoke CreateWindowEx,0,
addr szStatic,0,
WS_POPUP or SS_BLACKRECT,
[esi].left,[esi].top,wt,1,
hWnd,0,hInstance,0
mov hRect[0],eax
invoke CreateWindowEx,0,
addr szStatic,0,
WS_POPUP or SS_BLACKRECT,
[esi].right,[esi].top,1,ht,
hWnd,0,hInstance,0
mov hRect[4],eax
invoke CreateWindowEx,0,
addr szStatic,0,
WS_POPUP or SS_BLACKRECT,
[esi].left,[esi].bottom,wt,1,
hWnd,0,hInstance,0
mov hRect[8],eax
invoke CreateWindowEx,0,
addr szStatic,0,
WS_POPUP or SS_BLACKRECT,
[esi].left,[esi].top,1,ht,
hWnd,0,hInstance,0
mov hRect[12],eax
invoke ShowWindow,hRect[0],SW_SHOWNA
invoke ShowWindow,hRect[4],SW_SHOWNA
invoke ShowWindow,hRect[8],SW_SHOWNA
invoke ShowWindow,hRect[12],SW_SHOWNA
.elseif nFun==1
invoke MoveWindow,hRect[0],[esi].left,[esi].top,wt,1,TRUE
invoke MoveWindow,hRect[4],[esi].right,[esi].top,1,ht,TRUE
invoke MoveWindow,hRect[8],[esi].left,[esi].bottom,wt,1,TRUE
invoke MoveWindow,hRect[12],[esi].left,[esi].top,1,ht,TRUE
.elseif nFun==2
invoke DestroyWindow,hRect[0]
mov hRect[0],0
invoke DestroyWindow,hRect[4]
mov hRect[4],0
invoke DestroyWindow,hRect[8]
mov hRect[8],0
invoke DestroyWindow,hRect[12]
mov hRect[12],0
.endif
assume esi:nothing
ret

ToolDrawRect endp

Posted on 2001-09-01 19:56:11 by KetilO
Thanks everyone for the help. Esp Ketilo for pasting the source:)
Posted on 2001-09-03 03:49:46 by MovingFulcrum