dfwin message box not displayed in debug build

dfwin message box not displayed in debug build

Ritratto di David Mccabe

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

[FORTRAN]

program test

 use dfwin

 integer :: button

 integer :: hOwner

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

end program test 

[/FORTRAN]

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

 

Thanks

 

4 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di dboggs

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)

Ritratto di IanH

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

Ritratto di David Mccabe

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

Accedere per lasciare un commento.