Private Sub Command1_Click()
Dim pObject As Long
Dim dcMemory As Long
Dim hMemoryBitmap As Long
Dim dummy As Long
dcMemory = CreateCompatibleDC(Picture1.hdc)
hMemoryBitmap = CreateCompatibleBitmap(Picture1.hdc, Picture1.ScaleWidth \ Screen.TwipsPerPixelX, Picture1.ScaleHeight \ Screen.TwipsPerPixelY)
pObject = SelectObject(dcMemory, hMemoryBitmap)
dummy = BitBlt(dcMemory, 0, 0, Picture1.ScaleWidth \ Screen.TwipsPerPixelX, Picture1.ScaleHeight \ Screen.TwipsPerPixelY, Picture1.hdc, 0, 0, &HCC0020)
dummy = SelectObject(dcMemory, pObject)
dummy = ModifyMenu(GetSubMenu(GetMenu(Me.hwnd), 0), 0, &H404, 0, _
hMemoryBitmap)
End Sub
i can see 2 things in these code:
1- why the caption is losed?
2 - why, when the item is selected(mouse move), the image is inverted?


