Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

QuickWin and Windows API

$
0
0

I have created a Fortran app with QuickWin which makes use of a few user32 Windows API calls.  Why?  The app needs to build a dynamic menu structure where menu items come and go according to the whims of a governing input file.  The app also needs to properly post-process in case the user pushes the red X in the upper right-hand corner of the window.  Anyway, I had thought I would be able to handle these things strictly with QuickWin but have not been able.

The problem I am having with the app is that if any of the menus are active upon program termination, the application hangs as if in an infinite loop.  I am using a few calls to user32.  The final call is to the following skeletal routine which evidently does not work.

SUBROUTINE DESTROY_WINDOW()
INTEGER (KIND = 4) ITEMID
INTEGER (KIND = LRESULT) RESULT
ITEMID = SETACTIVEQQ(0_4)
WIN_HANDLE = GETHWNDQQ(QWIN$FRAMEWINDOW)
IF (WIN_HANDLE /= -1_HANDLE) THEN
IF (GETEXITQQ() == QWIN$EXITNOPERSIST) THEN
RESULT = SendMessage(WIN_HANDLE, WM_DESTROY, 0_fWPARAM, 0_fLPARAM)
END IF
END IF
END SUBROUTINE DESTROY_WINDOW

Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>