Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

dialog graphics

Brooks_Van_Horn
New Contributor I
1,468 Views

I realize that the Intel compiler in C++ would allow you to draw a graphic within a modal dialog box but can Fortran also do that and if so, what  object can I draw into?

Thanks,

Brooks Van Horn

0 Kudos
1 Solution
andrew_4619
Honored Contributor II
1,450 Views

As a partial response #11 and #12, item 2 is quite trivial e.g. the following routine (with only 1 function line of code) would do that with quickwin dialogs. 

subroutine dlg_SHOWHIDE(dlg, ID, LVISI, iret )
    use Ifwin, only: dword, ShowWindow, GetDlgItem, SW_SHOW, SW_HIDE
    use iflogm, only: dialog
    implicit none
    type(dialog), intent(in)    :: dlg   ! alreday initialised quickin dialog 
    integer, intent(in)         :: ID    ! resource ID
    logical, intent(in)         :: Lvisi ! .true. to show, .false. to hide the control of ID
    integer(dword), intent(out) :: iret  
    !If the window was previously visible, the return value is nonzero.
    !If the window was previously hidden, the return value is zero.
    if( LVISI) then
        iret = ShowWindow (GetDlgItem(dlg%hwnd, ID), SW_SHOW) 
    else
        iret = ShowWindow (GetDlgItem(dlg%hwnd, ID), SW_HIDE) 
    endif      
end subroutine dlg_SHOWHIDE

I don't agree with Paul that QuickWin is pointless, I think it allows some windows look and feel to a program that requires a lot less knowledge (=time) to get started than using the Windows API in full. The windows API is not difficult to use but there is much more time investment needed to getting started. There are many scientist and engineers that 'do a bit of programming' as a small part of their job and the Quickwin approach meets those needs as they simpily would not otherwise have the time to invest.  Quickwin does not do everything the API can do and if it did it would be missing the point of its existance as a 'simplified' interface.

 

View solution in original post

0 Kudos
22 Replies
andrew_4619
Honored Contributor II
241 Views

Have you got /subsystem:windows on the link properties?

 

0 Kudos
Brooks_Van_Horn
New Contributor I
241 Views

no, thx

0 Kudos
Reply