I've run into a strange problem. When experimenting with tooltips code, CB does not recognize an UDT. Get a "Unknown Type" error as soon as this line is inserted:
DEF pic1,pic2,pic3,pic4:MYRGN
Copied the definitions into Grahams "Skeleton Win" code, and the same error occoured.
What am I doing wrong?
Egil
' Creative Basic Skeleton window by GWS
'autodefine "OFF"
' define rectangle structures
TYPE MYRGN
DEF Left:INT
DEF Top:INT
DEF Right:INT
DEF Bottom:INT
ENDTYPE
DEF pic1,pic2,pic3,pic4:MYRGN
def w:window
def wstyle,run:int
wstyle = @minbox
' open a window ..
window w,0,0,600,400,wstyle,0,"Creative Basic",messages
run = 1
WAITUNTIL run = 0
CLOSEWINDOW w
END
SUB messages
select @class
CASE @idcreate
centerwindow w
CASE @idclosewindow
run = 0
CASE @idcontrol
select @controlID
case 1
run = 0
endselect
endselect
RETURN
Hey Egil
Works fine on both versions of CBasic I have (1.01 an 1.153 according to about box) that I have on my computer.
Egil,
That's strange - no problem here.
I copied your code into a new source file, and it ran with no error messages in Version 1.0
Try a brand new source file and copy your posted code into it - it should run OK.
best wishes, :)
Graham
Thanks guys!
I have no idea what have happened, but I was not able to get rid of the error message in neither v1.00 or v1.01.
But when doing as Graham suggested, the code is ok in both versions.
Have not tried with version 1.153 because then I will loose the bitmap button possibility.
What I try to do, is to use some of the ideas from an old EB program (http://www.ionicwind.com/forums/index.php?topic=1387.msg13022#msg13022)
to code bitmapbuttons with tooltips. But since I think that getting tooltips automaticly somehow disturbs the window, I'll make a version where tooltips are controlled by the right mousebutton.
This was something my "young assistants"tried in our workshop saturday, but was not able to achieve. But when searching the forum for "tooltips" last night,
I found the mentioned EB code. And since that idea in great parts resemles the methods I first tried for bitmapbuttons, I thought I should give it a shot...
If the result are useful, I'll post the code here.
Egil