mtwallet
Joined: 06 Jun 2008 Posts: 9
|
Posted: Wed Mar 17, 2010 1:36 pm Post subject: 64 bit Windows %dw call-back |
|
|
At the beginning of the year we were about to release a new version of our software when we discovered some compatibility issues with Windows 7.
From your forum this would not seem to be unique.
We followed the advice and after downloading v5.50 several of these issues disappeared.
Thank you.
However, we are now left with a few imponderables which appear to be a combination of virtual common usage and 64 bit (Windows 7).
The main problem is related to a dialogs we have that uses %dw with call-backs.
Today we have managed to 'prove' a similar problem by slightly altering one of your demonstration routines rather than supplying you with our routines.
The resultant crash appears like this
This only occurs on our 64 bit Windows 7 PC (32 bit is fine) and it only happens after the window has been resized followed by selecting Help About. As soon as this dialog is closed and the mouse moved over the graphics area the crash occurs.
The code follows.You will notice that only a few lines of code have been changed.
It should be possible to copy and paste the code to your existing Resize.f95 file and rebuild as per the demo set.
Is this to do with our code or something deeper?
[code:1:70c32d0b1c]!****************************************************************************
! *
! Salford ClearWin+ Example Code *
!* *
!* RESIZE.F95 - version 1.0 26/6/99 *
!* *
!* only compile using FTN95 version 1.6 or higher *
!* *
!* Example of ClearWin+ Resizable %gr window *
!* *
!****************************************************************************
!****************************************************************************
!* *
!* Resizable window example using windows API calls including:- *
!* SetWindowPos *
!* GetWindowRect *
!* GetWindowLong *
!* SetWindowPos *
!* MoveWindow *
!* *
!****************************************************************************
module com_res
use mswin
implicit none
integer ::hwnd
integer , dimension(4) ::rect
contains
integer function draw_func()
logical :: dummy
! dummy = GetWindowRect(hwnd,rect)
! if (.not.dummy) stop
! call draw_line@(0,0,200,200,rgb@(255,0,0))
! call draw_line@(0,200,200,0,rgb@(255,0,0))
integer :: idwdc
integer :: idwx
integer :: idwy
idwdc = clearwin_info@('GRAPHICS_DC')
idwx = clearwin_info@('GRAPHICS_WIDTH')
idwy = clearwin_info@('GRAPHICS_DEPTH')
dummy = MoveToEx(idwdc, 0, 0, 0)
dummy = LineTo(idwdc, idwx, idwy)
dummy = MoveToEx(idwdc, idwx, 0, 0)
dummy = LineTo(idwdc, 0, idwy)
draw_func = 2
end function draw_func
integer function resize_func()
integer :: s
logic |
|