Re: [libertybasic] (unknown)
- bwilsonnow wrote:
>I am a bit nervous about this since I am supposed to release DC's andNothing scary will happen. If you don't delete dcs, they will be
>delete DC's and a bitmap and wondering if I don't do it right will my
>computer crash and burn or what kind of scarry things could happen.
released when you restart your computer. Actually, I've very seldom had
any problems at all.
A couple of comments as I don't have time to debug this now:
> print #clock, "place 20 20; This is a Print Test"I get an error in the line above.
>You get the hdc above with "GetDC" and need to use it in the
>' 1. Get the DC of the graphics window.
>hw = hwnd(#clock)
>open "user32.dll" for dll as #user
>calldll #user, "GetDC", hw as word, hdc as word
>' 2. Create a compatible DC
>calldll #gdi32, "CreateCompatibleDC", comdc as long, dcmemory as long
calldll #gdi32, "CreateCompatibleDC", hdc as long, dcmemory as long
>' 3. Create a compatible bitmap in memory.I think "combitdc" above should be "hdc"
>calldll #gdi32, "CreateCompatibleBitmap", combitdc as long,_
>nWidth as long, nHeight as long, handleBMP as long
>You absolutely must spell the API calls exactly as shown in the
>' 8. Delete the memory DC.
>calldll #gdi32, "deleteDC", dcmemory as long, as boolean 'deletes
documentation and you don't have a value for the return boolean!
"deleteDC" must be "DeleteDC"
calldll #gdi32, "DeleteDC", dcmemory as long, r as boolean
TIP: When doing API calls, use debug to check for the return values from
each call. Most of the calls above will return greater than zero if
successful and zero if not. If you get zero then find out why before you
move on to the next call. Each call will depend on the preivious correct
return before the next API call will work correctly. Of course you need
to know what will be returned. Some calls will return zero for a correct
return. It depends on the particular API call.
- In a message dated 9/26/2006 5:11:58 PM Pacific Daylight Time,
> I wrote a program in QB 4.5 a few monthsMost of Liberty BASIC is relatively easy to learn; but the study is
> ago and would like to convert it to LB because LB is Windows based. How
> difficult would it be to make this conversion? I
demanding. Still, most of LB is easier to learn than QB. You should be able to
convert almost any program from QB to LB. Also check the LB ConForums for a section
about QB-LB conversions.
[Non-text portions of this message have been removed]