Hi, everyone,

I started programming in MASM using Ketil IDE and I found it very helping. Though I faced strange thing -
radasm allows only creation of DIALOGEX dialog resources ( I know that many programmers use it as main program window ), I didn't succeed at finding examples how to use DIALOGEX dialog resources as simple dialogs ( There are a lot of examples showing hot to use them as main program dialogs, but I don't need it ).

Is there or will there be an option in dialog editor to choose which type DIALOG or DIALOGEX to build? I am know using Borland 5.02 rc editor to create my dialogs, but I would like to have it in one package comming with radasm install.

Regards, Ulterior :)
Posted on 2004-03-13 04:27:03 by Ulterior
Hi Ulterior

You can use DIALOGEX the same way you use DIALOG. No difference in coding.

KetilO
Posted on 2004-03-13 05:11:28 by KetilO
It simply won't load :) If it would work as DIALOG I wouldn't be writing this post
Posted on 2004-03-13 05:27:23 by Ulterior
Hi Ulterior

Never experienced such a problem. What OS are you using?

KetilO
Posted on 2004-03-13 07:12:00 by KetilO
Hi Ketil and Ulterior,

Unless he is using 16 bit Windows it should make no difference, the DIALOGEX structure is in all 32 bit versions of Windows:

The DIALOG resource-definition statement specifies a dialog box. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style.

Note: DIALOG is an obsolete resource ID. New applications should use DIALOGEX.


The only possible problem is in Windows CE if you try to include a menu resource.
Posted on 2004-03-13 10:55:20 by donkey
I found out what was the problem

it is an the way I call dialog :)

This fails:
invoke DialogBoxParam,hInstance, 1001,hWin,addr ScheduleTaskListProc,NULL

This works:

xor eax, eax
mov ax, 1001

invoke DialogBoxParam,hInstance, eax,hWin,addr ScheduleTaskListProc,NULL

becouse of: ' value in the low-order word and zero in the high-order word. ' from MAKEINTRESOURCE help

Cheers :)
Posted on 2004-03-16 02:25:59 by Ulterior
That makes no sense at all. If you use the immediate 1001 then it is in the lo order word, the high order word begins at 65536. BTW AX is the low order word not the high order word, Intel microprocessors reverse the byte order. MAKEINTRESOURCE does not apply here. It must have been something else that was causing the error.
Posted on 2004-03-16 08:47:46 by donkey
So, everything's ok

BTW AX is the low order word not the high order word, Intel microprocessors reverse the byte order


By doing

xor eax, eax
mov ax, 1001

I have dialog id in low order word as makeintresource tells us
Posted on 2004-03-17 10:43:55 by Ulterior
Hi,

1001 will ALWAYS be in the low order word. So

xor eax, eax
mov ax, 1001

Is exactly the same as

mov eax,1001

There is no difference, any number under 65536 is in the low order word any number over 65535 is in the high order word. MAKEINTRESOURCE is only used to mask out the other word while inserting data, it is not necessary if you don't need the mask.
Posted on 2004-03-17 10:53:36 by donkey
So how can you explain that dialog call

invoke dialogparam - doesn;t work with exact value 1001? Isn't it becouse of pushing value to stack and things mess up? I simply see that one way it works and in another don't

:|
Posted on 2004-03-17 11:02:38 by Ulterior
Hi Ulterior,

All I can suggest is that you start here:

http://www.asmcommunity.net/board/phpwiki/index.php/HomePage
Posted on 2004-03-17 11:05:19 by donkey
Thank you, I'll have a look
Posted on 2004-03-17 11:07:23 by Ulterior