FIX: ??? ??????? SendMessage ?? TB_GETIMAGELIST ?????? ??? ?????? ImageList ??? Windows XP, ????? ??? ????? ???? ?????

?????? ????????? ?????? ?????????
???? ???????: 811415 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

???????

????? ??????? SendMessage ?????? ??? ???? ?????? ?? ????? ?????? ???????? ?? ????? ???? ????? Microsoft Windows 6.0 (Mscomctl.ocx). ???????? SendMessage ????? ????? TB_GETIMAGELIST LVM_GETIMAGELIST ? TVM_GETIMAGELIST ?? TCM_GETIMAGELIST ?????? ??? ???? imagelist ????? ListView ? TreeView ?????? ???? TabStrip.

??? ???? ??? ?????? ????? ??? ???? ??????? ????? "??????? Windows XP?" ??? ????? ?????? ??? ????. ??? ??? ??????? ?? API ??? ?? ????? ??? ?????? ??? ????????? API ?? ???? ???? ????.

?????

???? ??? ??????? ????? ??? Windows XP ? Mscomctl.ocx ????? ??????? ??????? Comctl32.dll ??? ???????.

????

????? ???? ????? ???? ????? ?? Microsoft ???? ????? ??? ?? ?? ??????? ??????? ?? ??? ??????? ???. ??? ?????? ??? ??????? ???? ????? ??? ??????? ????????. ?? ??? ????? ???????? ?????? ??? ??? ??????? ??????. ?????? ??? ?? ??? ????? ??? ??????? ??????? ???? ????????? ??? ??????? ?????? ?? ???? ?????? 6.0 Visual Studio ???? ????? ??? ??? ??????? ??????.

??? ??? ??????? ?????? ???? ?????? ??? ???????? ?? Microsoft "?????? ??? ???????. ?????? ??? ????? ????? ?????? ?????? ????? ??? ?????? Microsoft ???? ??????? ??? ?????? ?????? ?? ?????? ???? Microsoft ?????? ??? ?????:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
?????? ?? ??? ???????? ?? ??? ????? ????????? ???? ?????? ????? ??? ??????? ????? ??? ??? ?????? ????? ??? Microsoft ?? ??????? ?????? ??? ???? ??? ?? ???????. ???? ????? ?????? ????? ???????? ??? ????? ????? ???????? ????????? ???? ?? ???? ??? ???? ??? ???????.

????? ????? ?????????? ?? ??? ??????? ???? ????? (?? ??????) ???????? ?? ?????? ??????. ??? ??? ???????? ???????? ?????? ???? ??????? ???????? ??????? coordinated (UTC). ????? ???? ???? ??????? ?????? ??? ??????? ??? ??????? ??????. ?????? ????? ??? ??????? ??????? (UTC) ???????? ??????? ?????? ????? ??????? ??????? ??????? ?? ???? ??????? ?????? ?? "???? ??????".
   Date         Time   Version   Size       File name
   -----------------------------------------------------
   13-Dec-2002  00:18  6.0.97.1  1,062,160  Mscomctl.ocx

?????

???? Microsoft ?? ??? ??? ?? ?????? Microsoft ??????? ?? ????? ??? ???????.

??????? ????

????? ????? ????? ?? ????

????? ????? ??????? ???????? ???? ???? ???? ????? "? ???? ??????? ???????:
  1. ??? ????? ????? EXE Visual Basic 6.0 ????? ????. ?????????? ??? ????? Form1.
  2. ?? ??????? ' ???????? ' ? ???? ??? ????????. ?? ???? ?????? ?????? ????? ???? ??? 6.0 ????? ?????? ?????? ?? Microsoft Windows.
  3. ????? ???? ???? ImageList (ImageList1) ? ???? ???? ???? ????? (Toolbar1) CommandButton (Command1) ??? Form1 ".
  4. ???? ??? ?????? ?????? ??? ???? ?????? ImageList ?? ???? ??? ????? ??????? "?????" ????? ?????? ???????? ??? ImageList.
  5. Add the following code to Form1:
    Option Explicit
    
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
    Private Declare Function GetImageCount Lib "comctl32" Alias "ImageList_GetImageCount" (ByVal p As Long) As Long
    Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal cmd As Long) As Long
    
    
    Private Const WM_USER = &H400
    Private Const TB_GETIMAGELIST = WM_USER + 49
    Private Const GW_CHILD = 5
    
    Private Sub Command1_Click()
        Dim hImageList As Long, hChild As Long
        
        hChild = GetWindow(Toolbar1.hwnd, GW_CHILD)
        
        hImageList = SendMessage(hChild, TB_GETIMAGELIST, 0, 0)
        MsgBox "Image Count = " & GetImageCount(hImageList)
    End Sub
    
    Private Sub Form_Load()
        Set Toolbar1.ImageList = ImageList1
        Toolbar1.Buttons.Add , , "Button 1"
        Toolbar1.Buttons.Add , , "Button 2"
        Toolbar1.Buttons(1).Image = 1
        Toolbar1.Buttons(2).Image = 2
    End Sub
    
  6. ?? ?????? ??????? ?? ???? ??? Command1. ????? ???? ???? ??? ??? ??? 0. ??? ????? ??????? ?????? ????? ??? ?????? ???? ???? ?? 2.

???????

???? ???????: 811415 - ????? ??? ??????: 28/???? ??????/1435 - ??????: 2.3
????? ???
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Learning Edition
  • the operating system: Microsoft Windows XP
????? ??????: 
kbnosurvey kbarchive kbmt kbvbp600fix kbfix kbqfe KB811415 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????811415

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com