Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Execution of commands

Author
Message
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 4th Dec 2008 10:32
Hi

Using The free VisualC++ with DGK.

I am having a frustrating time trying to sort out some irritating problems that I think are to do with a command not being completed before the next line of code is executed. Is that possible??

For example if I call dbDeleteBitmap(10) followed imediately by dbSetCurrentBitmap(0) the SetCurrentBitmap(0) does not work.

If there are some other time consuming lines between then it works!

Is there a DoEvents type command that could help?

uff
FERSIS
18
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 4th Dec 2008 16:22
Before you called dbDeleteBitmap(10), the current bitmap was 10 ?
Its odd tough, could you post a little app as a example?
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 4th Dec 2008 17:11
Hi

Yes Fersis the current bitmap was 10 prior to delete.

I get the same result if the deletebitmap(10) follows the setcurrentbitmap(0) unless there are some other time consuming events between them.

I will try to recreate the problem on a small app later,(boss says work), but the segment that is causing me problems is
i=1;
while(i<11){
if (dbBitmapExist(10){dbDeleteBitmap(10);}
dbCreateBitmap(10);
dbSetCurrentBitmap(10);
dbCopyBitmap(9,10);
//draw on 10
dbGetImage(i)
}
dbSetCurrentBitmap(0);

if (dbBitmapExist(10){dbDeleteBitmap(10);}


tests if bitmap(10) exitscreates a bitmap, copies an existing bitmap into it, getImage then deletes the bitmap

uff
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 4th Dec 2008 18:08
Hello again!

I now have a workaround for the problem for anyone who encounters a similar thing to this one.

In my case if I use bitmap(0) before deleting the previous bitmap then all is well.

So following dbSetBitmap(0);
dbPrint(" ");
dbSync();
dBDeleteBitmap(10);

uff

Login to post a reply

Server time is: 2024-09-30 11:36:39
Your offset time is: 2024-09-30 11:36:39