Help to fix the error

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Help to fix the error

#1 Post by Eugene Lutsenko »

The strange thing is that at home I have this error does not occur, and the work arises. In another function of the same program I use exactly the same call and it does not result in an error at work. I can't understand why.

Code: Select all

@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP CAPTION mFileName OBJECT oStatic1 ;
      PREEVAL {|o|o:autoSize := .t.} EVAL {|o|hDC1 := GetWindowDC(o:getHWnd()), o:motion := {|a,b,o|ShowColorTr( hDC1, a, oSay, o )},;
      aPixel := Array(o:caption:xSize,o:caption:ySize), o:paint := {|a,b,o|Gratest(o)}}
Attachments
Безымянный.jpg
Безымянный.jpg (81.23 KiB) Viewed 8080 times

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Help to fix the error

#2 Post by Tom »

I have a similar problem with (tons of) icons from a (huge) DLL. It seems to be a kind of timing problem. The object creation is not finished yet, since it takes so much time. I solved it by checking the object state with o:Status(). Only if o:Status() returns XBP_STAT_CREATE, o:xSize is available.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Help to fix the error

#3 Post by Eugene Lutsenko »

Thanks, Tom! I have also encountered similar gaps elsewhere in the programme. But I was just making a delay. Unfortunately it doesn't always work, though getting better. And a very big delay did not want to do. how do you write this status check in the program?

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Help to fix the error

#4 Post by Eugene Lutsenko »

Now I have established that the cause of the error is different. Tom! What you're saying is interesting in itself, too.

Post Reply