Esempio n. 1
0
//***********************************************************************************************************
void CBCGPBaseVisualCtrl::EnableTooltip(BOOL bEnable, BOOL bTooltipTrackingMode)
{
#if !defined _BCGPCHART_STANDALONE
	m_bIsTooltip = bEnable;
	m_bTooltipTrackingMode = bTooltipTrackingMode;

	if (GetSafeHwnd() == NULL)
	{
		return;
	}

	if (m_bIsTooltip)
	{
		if (m_pToolTip->GetSafeHwnd() == NULL)
		{
			InitTooltip();

			if (m_pToolTip->GetSafeHwnd() != NULL)
			{
				m_pToolTip->Activate(TRUE);
			}
		}
	}
	else
	{
		CBCGPTooltipManager::DeleteToolTip(m_pToolTip);
	}
#endif
}
Esempio n. 2
0
//***********************************************************************************************************
void CBCGPBaseVisualCtrl::PreSubclassWindow() 
{
	CStatic::PreSubclassWindow();

	if (!m_bIsPopup)
	{
		InitCtrl();
		InitTooltip();
	}

	ModifyStyle(0, SS_NOTIFY);

	if (GetRect().IsRectEmpty())
	{
		CRect rect;
		GetClientRect(rect);

		SetRect(rect);
	}

	CBCGPGestureConfig gestureConfig;
	if (GetGestureConfig(gestureConfig))
	{
		bcgpGestureManager.SetGestureConfig(GetSafeHwnd(), gestureConfig);
	}
}
Esempio n. 3
0
//***********************************************************************************************************
int CBCGPBaseVisualCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CStatic::OnCreate(lpCreateStruct) == -1)
		return -1;

	if (m_bIsPopup)
	{
		SendMessage(WM_IDLEUPDATECMDUI, (WPARAM)TRUE);
	}
	
	InitCtrl();
	InitTooltip();

	if (GetRect().IsRectEmpty())
	{
		CRect rect;
		GetClientRect(rect);

		SetRect(rect);
	}

	CBCGPGestureConfig gestureConfig;
	if (GetGestureConfig(gestureConfig))
	{
		bcgpGestureManager.SetGestureConfig(GetSafeHwnd(), gestureConfig);
	}

	return 0;
}
Esempio n. 4
0
/**
 * @param frame CFrame object
 * @param delay tooltip delay time in milliseconds
 */
CTooltipSupport::CTooltipSupport (CFrame* frame, int delay)
: timer (0)
, frame (frame)
, currentView (0)
, platformObject (0)
, delay (delay)
, state (kHidden)
{
	timer = new CVSTGUITimer (this, delay);
	frame->setMouseObserver (this);
	frame->remember ();

	#if WINDOWS
	platformObject = InitTooltip (frame);

	#endif
}
Esempio n. 5
0
/*------------------------------------------------
  initialize the clock
--------------------------------------------------*/
void InitClock(HWND hwnd)
{
	RECT rc;
	
	if(g_bInitClock) return;
	g_bInitClock = TRUE;
	
	g_hInst = GetModuleHandle(DLLFILENAME);
	
	g_winver = CheckWinVersion();       // common/utl.c
	g_bVisualStyle = IsXPVisualStyle(); // common/utl.c
	
#if 0
	if(!(g_winver&WIN10RS1))
	{
		// check subclassification
		if(IsSubclassed(hwnd))
		{
			SendMessage(g_hwndTClockMain, TCM_CLOCKERROR, 0, 6);
			return;
		}
	}
#endif
	
	GetModuleFileName(g_hInst, g_mydir, MAX_PATH);
	del_title(g_mydir);
	
	strcpy(g_inifile, g_mydir);
	add_title(g_inifile, "tclock.ini");
	g_bIniSetting = TRUE;
/*  g_bIniSetting = FALSE;
	if(IsFile(g_inifile)) g_bIniSetting = TRUE; */
	
	// Save the original window size
	GetWindowRect(hwnd, &rc);
	g_OrigClockWidth = rc.right - rc.left;
	g_OrigClockHeight = rc.bottom - rc.top;
	// Save taskbar direction
	g_bVertTaskbar = IsVertTaskbar(GetParent(GetParent(hwnd)));
	g_bTaskbarPosChanging = FALSE;
	
	// tell tclock.exe clock's HWND
	PostMessage(g_hwndTClockMain, TCM_HWNDCLOCK, 0, (LPARAM)hwnd);
	
	// read settings
	LoadSetting(hwnd);
	
	InitTooltip(hwnd); // tooltip.c
	InitUserStr();     // userstr.c
	
	// subclassfy the clock window !!
	if(g_winver&WIN10RS1)
	{
		SetWindowSubclass(GetParent(hwnd), SubclassTrayProc,
				SUBCLASSTRAY_ID, (DWORD_PTR)hwnd);
	}
	SetWindowSubclass(hwnd, SubclassProc, SUBCLASS_ID, 0);
	
	// don't accept double clicks
	SetClassLong(hwnd, GCL_STYLE,
		GetClassLong(hwnd, GCL_STYLE) & ~CS_DBLCLKS);
	
#if TC_ENABLE_STARTBUTTON
	InitStartButton(hwnd); // startbtn.c
#endif
#if TC_ENABLE_STARTMENU
	InitStartMenu(hwnd);   // startmenu.c
#endif
#if TC_ENABLE_TASKBAR
	InitTaskbar(hwnd);     // taskbar.c
#endif
#if TC_ENABLE_TASKSWITCH
	InitTaskSwitch(hwnd);  // taskswitch.c
#endif
#if TC_ENABLE_TRAYNOTIFY
	InitTrayNotify(hwnd);  // traynotify.c
#endif
#if TC_ENABLE_VOLUME
	InitMixer();           // mixer.c
#endif
#if TC_ENABLE_SYSINFO
	InitSysInfo(hwnd);     // sysinfo.c
#endif
	
#if TC_ENABLE_TASKBAR
	RefreshTaskbar(hwnd);  // taskbar.c
#else
	PostMessage(GetParent(GetParent(hwnd)), WM_SIZE, SIZE_RESTORED, 0);
	InvalidateRect(GetParent(GetParent(hwnd)), NULL, TRUE);
#endif
	
	SetTimer(hwnd, IDTIMER_MAIN, 1000, NULL);
	
#if TC_ENABLE_DESKTOPICON
	SetDesktopIcons();     // desktop.c
#endif
}
Esempio n. 6
0
/*------------------------------------------------
  CLOCKM_REFRESHTOOLTIP message
--------------------------------------------------*/
void OnRefreshTooltip(HWND hwnd)
{
	EndTooltip(hwnd);
	InitTooltip(hwnd);
}