dfwin message box not displayed in debug build

dfwin message box not displayed in debug build

the following code only seems to produce a winapi message box when built in release mode:


program test

 use dfwin

 integer :: button

 integer :: hOwner

 button = Messagebox(hOwner,"press ok..."//char(0),"test"//char(0),MB_OK)

end program test 


Is there anyway to output a message box in debug mode?




4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You didn't say what kind of project you're building, but with "use dfwin" I presume it is a Quickwin app. In this case you can use MESSAGEBOXQQ which you may find slightly easier to use and better behaved.

btw, you should now use IFQWIN instead of the older DFWIN. You can also simplify the null-terminated strings, e.g. 'test'C is equivalent to 'test'//char(0)

The variable hOwner is undefined when you call MessageBox. Define it to be something meaningful - 0 perhaps.

Thank you both. Messagebox is displayed after setting hOwner to 0. I will use IFQWIN from now on.

Leave a Comment

Please sign in to add a comment. Not a member? Join today