I am trying to add an image to a win32 static control using the code above.Code:hwnd = CreateWindowEx(0, "STATIC", "", SS_BITMAP + WS_CHILD + WS_VISIBLE, 50, 55, 200, 200, hWnd, 0, Application.Hinstance, ByVal 0&) Call SendMessage(hwnd, STM_SETIMAGE, IMAGE_BITMAP, GetHBMP(UserForm1.Image1))
The Static control is created successfully onto its parent form, but no image is displayed.
GetHBMP is a user function that successfully returns a valid bitmap handle from another image activeX on the form (<==tested and confirmed).
Do I need to set the static image in the static control window procedure for it to take effect or do I need to set the OwnerDrawn style and set the image in its Parent window procedure?
Note:
The Static control IS NOT OwnerDrawn.




Reply With Quote