Hi, All,

First of all, take my apologize for my English, I hope, the programmer's logic will help us understand one another :)
Next, many thanks to KetilO for useful and comfortable RADAsm. It is seems, that I found the best IDE for user's interface creation with low-level language (especially after programming with VB language :)).
But I've found some difficulties, writing simple code with RadAsm. What I expected using RadAsm? Okay, my first attempt described below: ;)

Starting RadAsm.... Wow! Rulez! The very familiar interface!
Well, Go to File -> New Project... Of course, Win32 application! Of course the Masm language (the second familiar language after VB :). Proj name: test1, description: test1, OK. Next in the Project Wizard I selected Asm, RC and Inc file creation. Next dialog kept as was by default. Now we are ready to create Dialog window. Well, Project -> Add New -> Dialog. Let this dialog will have name test1 again.
And what's next? I expected, that after entering Win32 App, the Project Wizard will generate code like this:

;################################################
.386
.model flat,stdcall
option casemap:none

include test1.inc

.code

start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke GetCommandLine
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
;-------------------------------
; Here is your WinMain code
;-------------------------------
mov eax, TRUE
ret
WinMain endp

And after adding dialog form into the WinMain proc will be added code like this:


LOCAL wc:WNDCLASSEX
LOCAL msg:MSG

mov wc.cbSize,SIZEOF WNDCLASSEX
mov wc.style,CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc,OFFSET WndProc
mov wc.cbClsExtra,NULL
mov wc.cbWndExtra,DLGWINDOWEXTRA
push hInst
pop wc.hInstance
mov wc.hbrBackground,COLOR_BTNFACE
mov wc.lpszMenuName,OFFSET MenuName
mov wc.lpszClassName,OFFSET ClassName
invoke LoadIcon,NULL,IDI_APPLICATION
mov wc.hIcon,eax
mov wc.hIconSm,eax
invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor,eax
invoke RegisterClassEx,addr wc
invoke CreateDialogParam,hInstance,addr DlgName,NULL,addr WndProc,NULL
invoke ShowWindow,hWnd,SW_SHOWNORMAL
invoke UpdateWindow,hWnd
.while TRUE
invoke GetMessage,addr msg,NULL,0,0
.BREAK .if !eax
invoke TranslateMessage,addr msg
invoke DispatchMessage,addr msg
.endw


And will be added new proc WndProc like about this:

WndProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
mov eax,uMsg

.if eax==WM_CLOSE
invoke DestroyWindow,hWin
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,NULL
;---------------------------------
; Insert your WM handler here
;---------------------------------
.else
invoke DefWindowProc,hWin,uMsg,wParam,lParam
ret
.endif
xor eax,eax
ret
WndProc endp
;################################################################

Adding new button will cause generating new code and etc.

Actually, the test1.inc & test1.asm consists nothing. Moreover, I need manually rewrite control's IDs from the Properties Window into the Inc file as control's ID constants.


SO, WHAT I DO WRONG?
Could anyone give me a 'Step-by-step instruction' about creating a simple window (for example, the window have a File -> AnySubMenu/Separator/Exit menu, textbox and buttons OK & End. The 'End' button sends message WM_QUIT to the parent window.)
Could anyone help me to cope with the RadAsm?

Many thanks in advance and regards.
Dmitry.
Posted on 2002-07-09 07:37:46 by Dmitry
from File -> New Project, I normally choose a template. (dialog*.tpl)
Posted on 2002-07-09 07:50:14 by X05
Hi Dmitry

As X05 said, choosing a template is a good idea. Creating your own templates is also very simple.

From Tools menu, select Export ID equ's to save you from manually putting control ID's into .inc file.

Auto code write when adding controls to the dialog was planned in the ReallyRad project, but since it is almost impossible to do this without taking control of the programming style, this is put on ice.

KetilO
Posted on 2002-07-09 08:13:30 by KetilO
Many thanks to X05 and KetilO ;)
Your fast replays are very useful (really!). Best regards to you!
Thanks again.
Dmitry.
Posted on 2002-07-09 09:21:02 by Dmitry