아래와 같이 TBS_NOTHUMB 속성을 제외 해줘야 함.

int CTimelineWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
		return -1;

	// 타임라인 윈도우 속성
	const DWORD dwStyle = WS_CHILD | WS_VISIBLE | TBS_AUTOTICKS ;

	if (!m_sliderCtrl.Create(dwStyle & ~TBS_NOTHUMB, CRect(10,10,100,20), this, 101))
	{
		TRACE0("SLIDE CTRL을 만들지 못했습니다.\n");
		return -1;      // 만들지 못했습니다.
	}
    
    ....
 }
Posted by 꿈을펼쳐라
,

win32를 사용하여 함수 하나로 Tool Tip을 구현하는 방법


void CreateToolTipForRect(HWND hwndParent)
{

 HINSTANCE hInst = (HINSTANCE) ::GetWindowLong(hwndParent,GWL_HINSTANCE);

 INITCOMMONCONTROLSEX ic;
 ic.dwSize = sizeof(INITCOMMONCONTROLSEX);
 ic.dwICC = ICC_TAB_CLASSES;
 InitCommonControlsEx(&ic);
 // Create a ToolTip.
 HWND hwndTT = CreateWindowEx(WS_EX_TOPMOST,
  TOOLTIPS_CLASS, NULL,
  WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,  
  CW_USEDEFAULT, CW_USEDEFAULT,
  CW_USEDEFAULT, CW_USEDEFAULT,
  hwndParent, NULL, hInst,NULL);

 SetWindowPos(hwndTT, HWND_TOPMOST,
  0, 0, 0, 0,
  SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);

 // Set up "tool" information.
 // In this case, the "tool" is the entire parent window.
 TOOLINFO ti = { 0 };
 ti.cbSize = sizeof(TOOLINFO);
 ti.uFlags = TTF_SUBCLASS;
 ti.hwnd = hwndParent;
 ti.hinst = hInst;
 ti.lpszText = TEXT("This is your ToolTip string.");;
 GetClientRect (hwndParent, &ti.rect);
 // Associate the ToolTip with the "tool" window.
 SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti); 
// SendMessage(hwndTT, TTM_ACTIVATE, true, NULL);

}

Posted by 꿈을펼쳐라
,