Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

STM_GETIMAGE returns NULL

11 views
Skip to first unread message

Gernot Frisch

unread,
Jan 30, 2012, 11:01:27 AM1/30/12
to
Hi,

I can set the HBITMAP of a static control perfectly. But when I try to get
the HBITMAP, I always get 0.

// this works, I can see it
HBITMAP copyxp = SendMessageA((HWND)pW, STM_SETIMAGE, (WPARAM)0,
(LPARAM)(*pBmp));

// this will return 0. I call it right after the STM_SETIMAGE.
HBITMAP hGetImg = SendMessageA((HWND)pW, STM_GETIMAGE, (WPARAM)0,
(LPARAM)0);

..
if(copyxp) DeleteObject(copyxp);

0 new messages