Radasm doesn't correctly import dialogs where controls have -1 Ids. Rather it importes them as 65535

Regards, Ulterior
Posted on 2004-03-16 02:55:07 by Ulterior
That is because -1 when we are talking about the ID word (lo-order wParam) IS 65535. The ID number is unsigned, if you use -1 and then you are actually putting in 65535.
Posted on 2004-03-16 08:42:21 by donkey
But most of c++ programmers do this to unidenitfy not used controls such as labels, static controls. So dialog editor improovement to treat 65536 numbers as -1 is needed.
Posted on 2004-03-17 07:17:08 by Ulterior
I don't see any reason for doing that, command IDs cannot have negative numbers. If this is done in C then it is C that is wrong in representing the number that way.
Posted on 2004-03-17 09:09:59 by donkey
So what ID's are you using for static text controls in dialogs if you don't send messages, but just keep them?
How can you explain then, that masm rc compiler as well as borlands rc compiler magicaly understands '-1' and compiles well? ( not saying that this is duplicate resource ). Maybe there is sence in supporting '-1' in radasm too? ( Strange, but radasm happily accepts -1 in dialog editor )
Posted on 2004-03-17 10:52:26 by Ulterior
Ulterior,

I am not going to argue about this.

WORD PTR -1 = 11111111b
WORD PTR 65535 = 11111111b

The only difference is that they are displayed as signed or unsigned, it has nothing to do with Res2Dlg or RadASM or any resource editor. The difference between them is simply the way they are displayed on the screen, not anything to do with the structure or functionality of the dialog. I usually give and ID of 65535 to static controls.
Posted on 2004-03-17 11:01:41 by donkey