Failure of LoadImage in QWin on Win7 X64

Failure of LoadImage in QWin on Win7 X64

I have an application that loads a bitmap in a window that works on WinXP, WinVista and Win7 X86 and WinXP X64 machines but not a Win7 X64 machine. It returns -1 and I need help to find the reason. I did a forum and documentation search with no helpful results.


12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What does GETLASTERRORQQ() return after the failure? (Be sure to add USE IFPORT to declare it.)

Retired 12/31/2016

Ah, my mistake, I queried GetLastError() without QQ and got a value of zero, I have rectified it and should know the answer in about 10 hours. (My client is in a diferent time zone)

LoadImage return value = -1

LastErrorQQ = 0

Sorry, my mistake. Use GRSTATUS() instead of GETLASTERRORQQ.

Retired 12/31/2016

Very good, I never knew of GrStatus(). I am waiting for feedback from my client.

Meanwhile I thought to create a routine like the Comdlger(iRet) of the DVF Chaos example to do similar error reporting for graphics but get an error for the variable:


All the others are ok.

$GRFILEWRITEERROR is defined as a PARAMETER constant in module IFQWIN.

Retired 12/31/2016

It returns:

GRSTATUS()   =          -13

Seems that means the bitmap is too large - does that mean to many bytes or to big to fit the window?

Too big to fit in the window.

Retired 12/31/2016

Thanks for the help Steve. It seems sorted now, I got my graphics error reporting routine working as well.


Glad to hear it.

Retired 12/31/2016


A suggestion: Update the QWin help file to add the use of "GRSTATUS()", the  "LoadImage" text in the latest pdf is still the same as originally done by Etzel and Dickenson in the DVF programming guide! This would have saved me a lot of time.

Also, I could not trace "COMMDLGEXTENDEDERROR()" by any search. Maybe that is my fault.

Thanks again


Leave a Comment

Please sign in to add a comment. Not a member? Join today