Need help getting tooltip userlib working
BlitzPlus Forums/BlitzPlus Programming/Need help getting tooltip userlib working
| ||
The string you are passing to the dll is not getting "converted"... I'm guessing that instead of taking your "lol" + asc(0) as a string, it's looking at it as a memory address to a string. As to what exactly you need to do to fix it... I haven't got the time right now to look, but when I get home later tonight I'll see what I can dig up. Kanati |
| ||
Nice one, I was on those lines after a few hours of looking for a bug in my code. I am passing the address of a seperate string bank, containing the string+asc(0), not just directly plonking it into the main struct bank. It makes no difference as to what your string is, so my initial conclusion was that putting the value of a bankhandle, into another bank would infact not point to the bank in question (wtf ?). I know this to be false, in the case of using it again in blitz basic. Passing that bank across to another system is of course a totaly different matter. Oh and 1 thing to try, in debug mode/no-debug-mode the text in the tooltip will change. Its frustrating to say the least :) |
| ||
No one got a solution ? It would be a shame to let this helpfull userlib goto waste.. |
| ||
i'm not at ease with 'userlib stuff' but it seem that the string don't have any effect to the tool type displayed,but if you modify the adress passed to the userlib ex: PokeInt(bank,36,bankstring+2) the string displayed is shorter.so it look like that there's something wrong with what is do with the adress sent |
| ||
I reckon there's a problem with the ToolInfo structure. I've seen it defined like this in VB so I wonder if using the bank address is actually required. Private Type TOOLINFO lSize As Long lFlags As Long hwnd As Long lId As Long lpRect As RECT hInstance As Long lpStr As String lParam As Long End Type Are you getting ",,%Ÿ" in debug mode? I get the same text as your picture in non-debug mode. I will have another decent look at this tonight as my lunch break is now over :( |
| ||
Yeah I get those texts in the different debug modes. The trouble is, a string in blitz (as far as I know) be poked as an int memory location into a bank. Which is how the lpStr type stores it. When passing a string to a userlib, it converts fine, but passing the string in that way, via a "fake" struct is seemingly impossible, without pointers in blitz. GAH! I have a dll that somone made for me, I'll put it up for download soon if this can't be resolved. |
| ||
Well I got it working by myself :D I'll make some wrapper functions in blitz, and look into all the other possabilities now. Expect a userlib soon :) |
| ||
Excellent work - keen to see your working code now :) |
| ||
Nooooooooooooooooooooooooooooooo! After all this hassle of getting it working, then writting the functions and blah blah blah. They don't seem to working properly. They will create ok, they will function fine. When you click on the gadget you attached the tooltip to, the tooltip will disappear and then no longer function. Very anoying. Doed anyone know anything about tooltips, and how to get around it ? |