六十四位Office中API函數聲明語句第58講?六十四位Office中API函數聲明語句第58講【分享成果,随喜正能量】物質貧乏不可怕,可怕的是心理貧困貧困常與潦倒相連,人窮常與志短相關心理貧困,富也會淪為貧窮,心理富足,窮也能轉為富裕物質貧乏加上萬念俱灰,會很快摧毀一個人的身體;自信自強,雖暫時物質貧乏,但好日子也會很快到來人窮志不短,自強不息,下面我們就來說一說關于六十四位Office中API函數聲明語句第58講?我們一起去了解并探讨一下這個問題吧!
六十四位Office中API函數聲明語句第58講
【分享成果,随喜正能量】物質貧乏不可怕,可怕的是心理貧困。貧困常與潦倒相連,人窮常與志短相關。心理貧困,富也會淪為貧窮,心理富足,窮也能轉為富裕。物質貧乏加上萬念俱灰,會很快摧毀一個人的身體;自信自強,雖暫時物質貧乏,但好日子也會很快到來。人窮志不短,自強不息。
跟我學VBA,我這裡專注VBA, 授人以漁。我98年開始,從源碼接觸VBA已經20餘年了,随着年齡的增長,越來越覺得有必要把這項技能傳遞給需要這項技術的職場人員。希望和數據打交道的朋友,都來學習VBA,利用VBA,起碼可以提高自己的工作效率,可以有時間多陪陪父母,多陪陪家人,何樂而不為呢?
這講我們繼續學習64位Office API聲明語句學習之58講,這些内容是MS的權威資料,看似枯燥,但對于想學習API函數的朋友是非常有用的。
Declare PtrSafe Function CheckMenuItem Lib "user32" Alias "CheckMenuItem" (ByVal hMenu As LongPtr, ByVal wIDCheckItem As Long, ByVal wCheck As Long) As Long
Declare PtrSafe Function EnableMenuItem Lib "user32" Alias "EnableMenuItem" (ByVal hMenu As LongPtr, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long
Declare PtrSafe Function GetSubMenu Lib "user32" Alias "GetSubMenu" (ByVal hMenu As LongPtr, ByVal nPos As Long) As LongPtr
Declare PtrSafe Function GetMenuItemID Lib "user32" Alias "GetMenuItemID" (ByVal hMenu As LongPtr, ByVal nPos As Long) As Long
Declare PtrSafe Function GetMenuItemCount Lib "user32" Alias "GetMenuItemCount" (ByVal hMenu As LongPtr) As Long
Declare PtrSafe Function InsertMenu Lib "user32" Alias "InsertMenuA" (ByVal hMenu As LongPtr, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As LongPtr, ByVal lpNewItem As Any) As Long
Declare PtrSafe Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As LongPtr, ByVal wFlags As Long, ByVal wIDNewItem As LongPtr, ByVal lpNewItem As Any) As Long
Declare PtrSafe Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal hMenu As LongPtr, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As LongPtr, ByVal lpString As Any) As Long
Declare PtrSafe Function RemoveMenu Lib "user32" Alias "RemoveMenu" (ByVal hMenu As LongPtr, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Declare PtrSafe Function DeleteMenu Lib "user32" Alias "DeleteMenu" (ByVal hMenu As LongPtr, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Declare PtrSafe Function SetMenuItemBitmaps Lib "user32" Alias "SetMenuItemBitmaps" (ByVal hMenu As LongPtr, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As LongPtr, ByVal hBitmapChecked As LongPtr) As Long
Declare PtrSafe Function GetMenuCheckMarkDimensions Lib "user32" Alias "GetMenuCheckMarkDimensions" () As Long
Declare PtrSafe Function TrackPopupMenu Lib "user32" Alias "TrackPopupMenu" (ByVal hMenu As LongPtr, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As LongPtr, lprc As RECT) As Long
' Flags for TrackPopupMenu
Const TPM_LEFTBUTTON = &H0&
Const TPM_RIGHTBUTTON = &H2&
Const TPM_LEFTALIGN = &H0&
Const TPM_CENTERALIGN = &H4&
Const TPM_RIGHTALIGN = &H8&
Declare PtrSafe Function DrawIcon Lib "user32" Alias "DrawIcon" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal hIcon As LongPtr) As Long
' DrawText() Format Flags
Const DT_TOP = &H0
Const DT_LEFT = &H0
Const DT_CENTER = &H1
Const DT_RIGHT = &H2
Const DT_VCENTER = &H4
Const DT_BOTTOM = &H8
Const DT_WORDBREAK = &H10
Const DT_SINGLELINE = &H20
Const DT_EXPANDTABS = &H40
Const DT_TABSTOP = &H80
Const DT_NOCLIP = &H100
Const DT_EXTERNALLEADING = &H200
Const DT_CALCRECT = &H400
Const DT_NOPREFIX = &H800
Const DT_INTERNAL = &H1000
Declare PtrSafe Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As LongPtr, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Declare PtrSafe Function TabbedTextOut Lib "user32" Alias "TabbedTextOutA" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long, ByVal nTabPositions As Long, lpnTabStopPositions As Long, ByVal nTabOrigin As Long) As Long
Declare PtrSafe Function GetTabbedTextExtent Lib "user32" Alias "GetTabbedTextExtentA" (ByVal hdc As LongPtr, ByVal lpString As String, ByVal nCount As Long, ByVal nTabPositions As Long, lpnTabStopPositions As Long) As Long
Declare PtrSafe Function UpdateWindow Lib "user32" Alias "UpdateWindow" (ByVal hwnd As LongPtr) As Long
Declare PtrSafe Function SetActiveWindow Lib "user32" Alias "SetActiveWindow" (ByVal hwnd As LongPtr) As LongPtr
Declare PtrSafe Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As LongPtr
Declare PtrSafe Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As LongPtr) As Long
Declare PtrSafe Function WindowFromDC Lib "user32" Alias "WindowFromDC" (ByVal hdc As LongPtr) As LongPtr
Declare PtrSafe Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As LongPtr) As LongPtr
Declare PtrSafe Function GetDCEx Lib "user32" Alias "GetDCEx" (ByVal hwnd As LongPtr, ByVal hrgnclip As LongPtr, ByVal fdwOptions As Long) As LongPtr
Const DCX_WINDOW = &H1&
Const DCX_CACHE = &H2&
Const DCX_NORESETATTRS = &H4&
Const DCX_CLIPCHILDREN = &H8&
Const DCX_CLIPSIBLINGS = &H10&
Const DCX_PARENTCLIP = &H20&
Const DCX_EXCLUDERGN = &H40&
Const DCX_INTERSECTRGN = &H80&
Const DCX_EXCLUDEUPDATE = &H100&
Const DCX_INTERSECTUPDATE = &H200&
Const DCX_LOCKWINDOWUPDATE = &H400&
Const DCX_NORECOMPUTE = &H100000
Const DCX_VALIDATE = &H200000
Declare PtrSafe Function GetWindowDC Lib "user32" Alias "GetWindowDC" (ByVal hwnd As LongPtr) As LongPtr
Declare PtrSafe Function ReleaseDC Lib "user32" Alias "ReleaseDC" (ByVal hwnd As LongPtr, ByVal hdc As LongPtr) As Long
Declare PtrSafe Function BeginPaint Lib "user32" Alias "BeginPaint" (ByVal hwnd As LongPtr, lpPaint As PAINTSTRUCT) As LongPtr
Declare PtrSafe Function EndPaint Lib "user32" Alias "EndPaint" (ByVal hwnd As LongPtr, lpPaint As PAINTSTRUCT) As Long
Declare PtrSafe Function GetUpdateRect Lib "user32" Alias "GetUpdateRect" (ByVal hwnd As LongPtr, lpRect As RECT, ByVal bErase As Long) As Long
Declare PtrSafe Function GetUpdateRgn Lib "user32" Alias "GetUpdateRgn" (ByVal hwnd As LongPtr, ByVal hRgn As LongPtr, ByVal fErase As Long) As Long
Declare PtrSafe Function ExcludeUpdateRgn Lib "user32" Alias "ExcludeUpdateRgn" (ByVal hdc As LongPtr, ByVal hwnd As LongPtr) As Long
Declare PtrSafe Function InvalidateRect Lib "user32" Alias "InvalidateRect" (ByVal hwnd As LongPtr, lpRect As RECT, ByVal bErase As Long) As Long
Declare PtrSafe Function ValidateRect Lib "user32" Alias "ValidateRect" (ByVal hwnd As LongPtr, lpRect As RECT) As Long
Declare PtrSafe Function InvalidateRgn Lib "user32" Alias "InvalidateRgn" (ByVal hwnd As LongPtr, ByVal hRgn As LongPtr, ByVal bErase As Long) As Long
Declare PtrSafe Function ValidateRgn Lib "user32" Alias "ValidateRgn" (ByVal hwnd As LongPtr, ByVal hRgn As LongPtr) As Long
第1套教程:VBA代碼解決方案
第2套教程:VBA數據庫解決方案
第3套教程:VBA數組與字典解決方案
第4套教程:VBA代碼解決方案之視頻(第一套的視頻講解)
第5套教程:VBA中類的解讀和利用
第6套教程:VBA信息獲取與處理
第7套教程:VBA之EXCEL應用
第8套教程:VBA之Word應用(最新推出)
上述教程的學習順序:
① 7→1→3→2→6→5或者7→4→3→2→6→5。
② 7→8
更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!