|
-
a problem when using "SendMessage" to retrieve the number of the buttons on toolbar
I encountered a problem when use API function "SendMessage" to retrieve the
number of the buttons on the toolbar supported by CommCtrl32. I add two buttons
on the toolbar by its property dialog box. i just want to testify the retrieve
value of the "SendMessage"function is 2, however in my project,the result
is out of my expect! it is 0, shown in my TextBox. what's wrong with me ?
my code is as follws:
###########################################################################
Private Const WM_USER = &H400
Private Const TB_BUTTONCOUNT = WM_USER + 75
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
Long
Private Sub Command1_Click()
Dim throw As Long
throw = SendMessage(Toolbar1.hwnd, TB_BUTTONCOUNT, 0, 0)
Text1.Text = throw
End Sub
###########################################################################
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks