کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

TTM_POPUP پیامی برای ToolTip



باعث میشود که Tooltip در مختصات  پیام آخرین ماوس ارسالی نمایش داده شود.

Causes the tooltip to display at the coordinates of the last mouse message

Parameters

wParam

Must be zero

lParam

Must be zero

Return value

The return value is not used



SetCursorPos 300, 300

SendMessageA hWndtoolTip,TTM_POPUP, 0,0



Private Const WM_SETCURSOR=&H20

Parameters

wParam

با GetDlgItem
A handle to the window that contains the cursor

lParam

The low-order word of lParam specifies the hit-test code

The high-order word of lParam specifies the identifier of the mouse message

Return value

If an application processes this message, it should return TRUE to halt further processing or FALSE to continue.



?last=0

case WM_MOUSEMOVE

if (?lParam<>0) Then
SetTimer hwnd, 1,   GetDoubleClickTime   , 0
last = lParam
End if
Exit Function


case WM_TIMER

if (wParam<>1) The Exit Function

KillTimer hwnd, 1
(makeTooltip(hwnd
SendMessage tooltip, TTM_POPUP, 0, 0


TTM_SETDELAYTIME = &H403
TTM_ADDTOOLA = &H404
TTM_RELAYEVENT = &H407
TTM_SETTOOLINFOA = &H409
TTM_HITTESTA = &H40A
TTM_UPDATETIPTEXTA = &H40C
TTM_WINDOWFROMPOINT := 0x410
TTM_TRACKACTIVATE = &H411
TTM_TRACKPOSITION = &H412
TTM_SETTIPBKCOLOR = &H413
TTM_SETTIPTEXTCOLOR = &H414
TTM_SETMAXTIPWIDTH = &H418
TTM_GETMAXTIPWIDTH = &H419

TTM_SETMARGIN = &H41A

TTM_POP = &H41C
TTM_UPDATE = &H41D
TTM_ADJUSTRECT = &H41F
TTM_SETTITLEA = &H420
TTM_SETTITLEW = &H421
TTM_POPUP = &H422
TTM_ADDTOOLW = &H432
 TTM_SETTOOLINFOW = &H436

 TTM_HITTESTW = &H437

TTM_GETTEXTW = &H438

 TTM_UPDATETIPTEXTW = &H439



ChildWindowFromPoint hWndParent,Point


MapWindowPoints hWndFrom,hWndTo, lpPoints(Rect),cPoints(number of points

(POINT pt(2

MapWindowPoints hWnd1,hWnd2,pt(0), 1

MapWindowPoints(hWnd1,hWnd2,pt(1), 1




تغییر سایز Edit در پنجره 


(hEdit=GetDlgItem(hDlg,IDC_EDIT
Dim rct As RECT
GetClientRect hEdit,rct

MapWindowPoints hEdit,hDlg,rct,1

MoveWindow hEdit,rct.left,rct.top, rct.right-40,rct.bottom





 : OnCreate 

(ti.cbSize = Len(ti
ti.uFlags =TTF_TRACK Or TTF_ABSOLUTE
ti.hwnd = hwndOwner
ti.uId = '(UINT)FIT_NLSF_EDIT_FUNC
ti.hinst =0
("ti.lpszText =TEXT("hello
ti.rect.left = 0
ti.rect.right = 0
ti.rect.bottom =0
ti.rect.top =0
SetRectEmpty ti.rect'

SendMessageA hwndTT,TTM_ADDTOOL, 0,ti

SendMessageA hwndTT,TTM_SETMAXTIPWIDTH,0,80

SendMessageA hwndTT,TTM_SETTIPBKCOLOR, RGB(247, 252, 203),0

SendMessageA hwndTT,TTM_SETTIPTEXTCOLOR, RGB(0, 0, 0),0

RetVal = SendMessage(hwndTT, TTM_UPDATETIPTEXTA, 0, ti)

SendMessageA hwndTT,TTM_TRACKACTIVATE,TRUE, ti





GetCursorPos pt 'get the cursor position

if  WM_SETCURSOR Then

get the button rect'
GetWindowRect(GetDlgItem(hDlg, FIT_NLSF_SELECT_FUNC),rc1

if PtInRect(rc1, pt) Then

SendMessage hwndTT,TTM_TRACKPOSITION, 0,(LPARAM)MAKELPARAM(pt.x,pt.y)

TTM_POPUP message'
'Causes the tooltip to display at the coordinates of the' last mouse message.
SendMessage hwndTT,TTM_POPUP,0,0
Else

TTM_POP message'
Removes a displayed tooltip window from view'
SendMessage hwndTT,TTM_POP,0,0

End If


Re: TOOLTIP in win32

Tacking means that the tooltip will move with the mouse( it just explicitly send the TTM_TRACKPOSITION message to the tooltip window).
as for the handle of tooltip control window, I use the global static type. the parent window is not deconstructed.
ps,I think if I use the TTF_IDISHWND flag, then uId should be the handle to that control .
Thanks
tony



اگر درست باشد البته 

Public Function MAKELPARAM(ByVal wLow As Long, ByVal wHigh As Long) As Long

(&MAKELPARAM=(wlow And &H7FFF
(&Or (&H10000 * (wHigh And &H7FFF 

End Function

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد