Hello friends,

I am using WinAsm studio (www.winasm.net )and though it is a very nice ide for asm development i am stuck here regarding the resource files.Are the resource files generated by winasm studio compiled by a different reource compiler instead of rc.exe provided by microsoft?I created a dialog box with few contols on it and then when i compiled it with WinAsm studio it generated the exe but when i double click the exe it is not launched.I mean the dialog box is not shown.So i then passed my exe to resource hacker and i saw a dialog box is there.It means the compilation is all right.Then where is the problem ?


.386
.model flat,stdcall
option casemap:none
DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD

include /masm32/include/windows.inc
include /masm32/include/kernel32.inc
include /masm32/include/user32.inc
includelib /masm32/lib/user32.lib
includelib /masm32/lib/kernel32.lib


.DATA

DlgName db "IDD_DLG1001",0
.DATA?
hInstance HINSTANCE ?
CommandLine LPSTR ?
.CODE
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,ADDR DlgName,NULL,addr DlgProc,NULL
invoke ExitProcess,eax

DlgProc proc hwnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
好bsp; 好bsp; 好bsp; 好bsp; 好bsp;mov eax,FALSE
Ret
DlgProc EndP
end start



;This Resource Script was generated by WinAsm Studio.

#define IDD_DLG1001 1001
#define IDC_COMBOBOX1002 1002
#define IDC_STATUSBAR1003 1003
#define IDC_BUTTON1004 1004

IDD_DLG1001 DIALOGEX 0,0,291,170
CAPTION "IDD_DLG1001"
FONT 8,"MS Sans Serif"
STYLE 0x10cc0000
EXSTYLE 0x00000000
BEGIN
CONTROL "IDC_COMBOBOX1002",IDC_COMBOBOX1002,"ComboBox",0x50010003,30,15,234,16,0x00000000
CONTROL "",IDC_STATUSBAR1003,"msctls_statusbar32",0x50000003,0,160,294,13,0x00000000
CONTROL "IDC_BUTTON1004",IDC_BUTTON1004,"Button",0x50010000,47,46,71,19,0x00000000
END




Also i have attached the executable file.Please look through it and tell me if i have done anything wrong(most probably  :sad:)
Attachments:
Posted on 2006-04-20 21:20:40 by lonelyboy
Hi,

The caption (text displayed in the title bar) of your dialog is "IDD_DLG1001", it's ID is numeric 1001. You should use the following...

invoke DialogBoxParam,hInstance,1001,NULL,addr DlgProc,NULL
Posted on 2006-04-20 21:34:42 by donkey
Thank you very very much mr. donkey .
:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
You r great.What would I have done if this board doesn't exist.  :O

But can u please tell me that what i have done wrong ? I think both the control id and the pointer to the null terminated string can be specified.Then where i am wrong ? :mad:
Posted on 2006-04-20 22:09:12 by lonelyboy