gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1617 Posts in 535 Topics by 779 Members - Latest Member: rhoronjeff@comcast.net December 07, 2022, 05:49:21 PM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  Windows  |  64-bit MRWE problem: grey rectangle instead of active window
gfx
gfxgfx
 

Author Topic: 64-bit MRWE problem: grey rectangle instead of active window  (Read 1003 times)

Mike Linacre

  • Sr. Member
  • ****
  • Posts: 259
Hi folks:

Have now converted my 32-bit FORTRAN to 64-bit. Operationally, everything is now exactly the same. Even the run times are the same (I expected 64 bit to be faster). But there is one annoying difference in MRWE action. When the 32-bit MRWE window becomes active (after being hidden behind other windows), it is always populated and ready to go. This is usually the situation with the 64-bit MRWE window, but sometimes

the text window displays as an unpopulated grey rectangle. The menubar is OK. Obvious actions would not make the text window display, so I have added a routine to mrwe_textproc so that, when the user clicks on the grey rectangle,
       case (WM_LBUTTONDOWN)
           result = InvalidateRect (WndH, int(0,8), TRUE) 
           result = UpdateWindow (WndH)

this redraws the text window and it now functions correctly.

Is there any efficient way to modify 64-bit MRWE so that the text window always displays correctly?

Mike Linacre

  • Sr. Member
  • ****
  • Posts: 259
Re: 64-bit MRWE problem: grey rectangle instead of active window
« Reply #1 on: October 04, 2021, 02:48:22 AM »
The work-around in the previous post does not always work for solid grey child windows or child windows with distorted text characters. Dragging the bottom right corner of the window always clears the problem.

Also child windows sometimes hang. Have discovered that inserting this Windows API code just before the hang location in the code prevents the hang. A message box flashes on the screen for half a second. A little annoying but better than a hang. Choose suitable text.

i = MessageBoxTimeoutA(val(int(0,8)), val(loc(heading)), val(loc(messagetext)), val(MB_OK), 0, val(int(500,8)))
where
heading = "my title"//char(0)
messagetext = "my message"//char)0)


Later: have checked all the win32 APIs. Found one where a 32-bit integer had been incorrectly changed to a 64-bit integer (by me). Also my FORTRAN code now correctly compiles under Absoft 13 and Absoft 21. Result: have not seen the grey rectangle for weeks. Have kept the "message box" workaround for dialog-box hangs. Have noticed other software with the same "feature". If anyone discovers a solution please tell us.

Discovered that using both WM_TEXT and WM_CHAR to write to the screen causes conflicts, so changed the code to only use WM_CHAR.
« Last Edit: September 02, 2022, 04:34:15 AM by Mike Linacre »

Absoft User Forum  |  Support  |  Windows  |  64-bit MRWE problem: grey rectangle instead of active window
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!