Restored from previous forum. Originally posted by FAKEFACTORY.
 Hi, is it possible to format the tooltips with linefeeds so it uses more then one line?
I tried chr(10), chr(13) and instring "\n" without success.
Thanx in advance
Registered PureBasic Coder
			
			
									
									
						Tooltips with multilines
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
Don't know if this is the only way to do that, but this is what I know about that:
			
			
									
									
						Don't know if this is the only way to do that, but this is what I know about that:
Code: Select all
; (c) 2002 - Franco's template - absolutely freeware
; how to create a user defined tooltip
Procedure AddButtonToolTip(Handle,Text$)
  ToolTipControl=CreateWindowEx_(0,"tooltips_class32","",$D0000000,0,0,0,0,WindowID,2002,hInstance,0)
  SendMessage_(ToolTipControl,1044,0 + 0
Have a nice day...
Franco
 
Sometimes you have to go a lonely way to accomplish genius things.- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
 
Have to go home to test it on WinXP and Win2000.
I suppose this is that incompatibility of W2000 and the other MS OS regarding
CreateWindowEx. (for more details see the comments on my HTMLview topic)
The problem is that 'hInstance' under W2000 wants sometimes (?) a real 'Instance'
so you have to add:
hInstance = GetModuleHandle_(0)
before the CreateWindowEx call.
Please tell me if this works. Than I can edit the code above.
Have a nice day...
Franco
 
Sometimes you have to go a lonely way to accomplish genius things.
Edited by - franco on 14 February 2002 18:00:53
			
			
									
									
						Sorry for that Paul. My code runs on Win98SE (at work) without failure.I'm using Win2K here and no tooltip appears using your code
Have to go home to test it on WinXP and Win2000.
I suppose this is that incompatibility of W2000 and the other MS OS regarding
CreateWindowEx. (for more details see the comments on my HTMLview topic)
The problem is that 'hInstance' under W2000 wants sometimes (?) a real 'Instance'
so you have to add:
hInstance = GetModuleHandle_(0)
before the CreateWindowEx call.
Please tell me if this works. Than I can edit the code above.
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Edited by - franco on 14 February 2002 18:00:53