PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Strange MessageBoxW problem

diProtector · 13 Feb 2006, 22:03 UTC
The same code:

Code:
eor R0, R0, R0
adr R1, text
adr R2, title
mov R3, #MB_OK
bl MessageBoxW


on pure asm

and

Code:
MessageBox(NULL, TEXT("Hello World"), TEXT("Hello World"), MB_OK);


on pure C produces different mesbox windows: oldstyle (with "square X") in first case and newstyle (with "round OK") in second case. What mysterious code precedes in C file?
Disassemble it and find out?
Are you testing both methods in the same application?

Dan East
diProtector · 14 Feb 2006, 00:55 UTC
Dan East, no. Two different applications.

refractor, something happens BEFORE calling MessageBoxW in C application I can't understand.
Then that's your problem. It's been so long since I migrated my apps from CE 2.11 to CE 3.0 (Pocket PC) that I can't remember the specifics, but there is a method the OS uses to determine if the application is legacy PSPC. Your entire application will exhibit that style - not just the message box.

Dan East
Look at the PE header of your EXE files, fields OS version and Subsystem version. OS uses them to change API functionality.