Page 1 of 4

SET TOOLTIPBACKCOLOR

Posted: Fri Nov 28, 2014 7:22 pm
by emzampi
the command SET TOOLTIPBACKCOLOR {255,255,0} with win7 64-bit does not work !! While on win xp works .There is also to you?
does not take the desired color

SET TOOLTIPBACKCOLOR

Posted: Fri Nov 28, 2014 10:35 pm
by Pablo César
I tried in Win7 32 bits thru this code and worked for me normally.
Screen1.png
Screen1.png (7.29 KiB) Viewed 6874 times
May you test it in your Win7 at 64 bits ?

Also can you inform with HMG version are you using ? Unicode /ANSI ?

Re: SET TOOLTIPBACKCOLOR

Posted: Sat Nov 29, 2014 9:13 am
by serge_girard
Thanks, very nice!

Serge

Re: SET TOOLTIPBACKCOLOR

Posted: Sun Nov 30, 2014 11:25 am
by emzampi
I used version is 'HMG 3.3.1' and compiled 32-bit --

Re: SET TOOLTIPBACKCOLOR

Posted: Sun Nov 30, 2014 3:07 pm
by Pablo César
Have you tested with that code I passed ?

Re: SET TOOLTIPBACKCOLOR

Posted: Sun Nov 30, 2014 5:31 pm
by serge_girard
W7-32 BITS HMG331 OK!

Serge

Re: SET TOOLTIPBACKCOLOR

Posted: Mon Dec 01, 2014 12:10 am
by Javier Tovar
Win7, 32 bits, HMG3.3.1 No trabaja, Unicode

Saludos

P.D., Ya recompile libreria y nada.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
Win7, 32-bit, HMG3.3.1 not work, Unicode

regards

P. D., Ya library and recompile anything.
ErrorColorToolTip.jpg
ErrorColorToolTip.jpg (28.7 KiB) Viewed 6745 times

Code: Select all

#include "hmg.ch"

Function Main

	SET NAVIGATION EXTENDED
	SET EPOCH TO 2000

	SET CENTURY ON
	SET DATE FRENCH
	SET TOOLTIPSTYLE BALLOON
	SET TOOLTIPBACKCOLOR {255,0,0}

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 HEIGHT 480 ;
		TITLE 'HMG Demo' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'Test'
				MENUITEM 'Set Text_1 Value' ACTION Form_1.Text_1.Value := Date()
				MENUITEM 'Set Text_2 Value' ACTION Form_1.Text_2.Value := ctod ('  /  /  ')
				MENUITEM 'Set Text_3 Value' ACTION Form_1.Text_3.Value := ctod('01/01/2005')
				MENUITEM 'Set Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .T.
				MENUITEM 'Clear Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .F.
			SEPARATOR
				MENUITEM 'Get Text_1 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_1.Value ) )
				MENUITEM 'Get Text_2 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_2.Value ) ) 
				MENUITEM 'Get Text_3 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_3.Value ) )
			END POPUP
		END MENU

		@ 10,10 TEXTBOX Text_1 ;
			VALUE ctod('01/01/2004') ;
			TOOLTIP 'Date TextBox 1' ;
			DATE

		@ 40,10 TEXTBOX Text_2 ;
			VALUE Date() ;
			TOOLTIP 'Date TextBox 2' ;
			DATE

		DEFINE TEXTBOX Text_3
			ROW 70
			COL 10
			DATE .T.
		END TEXTBOX

	END WINDOW

	Form_1.Center

	Form_1.Activate

Return Nil


Re: SET TOOLTIPBACKCOLOR

Posted: Mon Dec 01, 2014 7:20 am
by emzampi
Pablo César excuse but I do not know how to enter your code and the example of Javier Tovar does not work to me

Re: SET TOOLTIPBACKCOLOR

Posted: Mon Dec 01, 2014 10:55 am
by Pablo César
emzampi wrote:Pablo César excuse but I do not know how to enter your code and the example of Javier Tovar does not work to me
Please note hereunder quite same Javier's sample code:

Code: Select all

#include <hmg.ch>

#define WM_USER                 0x0400
#define TTM_SETTIPBKCOLOR       (WM_USER + 19)
#define TTM_SETTIPTEXTCOLOR     (WM_USER + 20)

Function Main()
SET TOOLTIPSTYLE BALLOON 
// SET TOOLTIPSTYLE STANDARD

// SET TOOLTIPBACKCOLOR {255,255,0}

DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 640 HEIGHT 480 ;
      TITLE 'HMG Demo' ;
      MAIN 

      DEFINE MAIN MENU
         DEFINE POPUP 'Test'
            MENUITEM 'Set Text_1 Value' ACTION Form_1.Text_1.Value := Date()
            MENUITEM 'Set Text_2 Value' ACTION Form_1.Text_2.Value := ctod ('  /  /  ')
            MENUITEM 'Set Text_3 Value' ACTION Form_1.Text_3.Value := ctod('01/01/2005')
            MENUITEM 'Set Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .T.
            MENUITEM 'Clear Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .F.
         SEPARATOR
            MENUITEM 'Get Text_1 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_1.Value ) )
            MENUITEM 'Get Text_2 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_2.Value ) ) 
            MENUITEM 'Get Text_3 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_3.Value ) )
         END POPUP
      END MENU

      @ 10,10 TEXTBOX Text_1 ;
         VALUE ctod('01/01/2004') ;
         TOOLTIP 'Date TextBox 1' ;
         DATE

      @ 40,10 TEXTBOX Text_2 ;
         VALUE Date() ;
         TOOLTIP 'Date TextBox 2' ;
         DATE

      DEFINE TEXTBOX Text_3
         ROW 70
         COL 10
		 TOOLTIP 'Date TextBox 3'
         DATE .T.
      END TEXTBOX
END WINDOW
CENTER WINDOW Form_1
SendMessage( GetFormToolTipHandle("Form_1"), TTM_SETTIPBKCOLOR, RGB(255,255,0), 0 )
SendMessage( GetFormToolTipHandle("Form_1"), TTM_SETTIPTEXTCOLOR, RGB(0,92,233), 0 )
ACTIVATE WINDOW Form_1
Return Nil
Please also note lines 51 and 52 and let us know if works for Win7-64bits. Because for me is working perfectly in Win7-32bits (thru SendMessage and also by SET TOOLTIPBACKCOLOR)
Javier Tovar wrote:Win7, 32 bits, HMG3.3.1 No trabaja, Unicode
Javier, puedes probarlo tambien ? Aqui a mi me funciona.

SET TOOLTIPBACKCOLOR

Posted: Mon Dec 01, 2014 12:39 pm
by Pablo César
I guess this Tooltips doesn't take effects when your Windows has Appearance changed, for example AERO style doesn't work.

In my test, my Windows is setted default (not customed style, Classic one).
Screen1.png
Screen1.png (38.99 KiB) Viewed 6682 times

Estimado Claudio, todo indica que es algo a más que se debe ajustar para no sufrir interferencia del SO. Lo que pude leer es que existe la propiedad OwnerDraw, porque hé visto vários código que se utilizan asi como este y dá cierto:

http://www.codeproject.com/Articles/420 ... th-Image-C

Testeé este ejemplo y mismo personalizando la apariencia del Windows, funciona igual.