Hi!
I´d like to create a pattern-brush from a bitmap in a CPictureHolder-object. I´ve tried it this way:
IPicture* iPicture=m_Picture.m_pPict;
HBRUSH PatternBrush=NULL;
OLE_HANDLE hPic;
iPicture->get_Handle(&hPic);
PatternBrush=CreatePatternBrush((HBITMAP)hPic);
m_Picture is the CPictureHolder-object.
get_Handle returns a OLE_HANDLE, but the CreatePatternBrush-function needs a HBRUSH-handle. The way i tried to convert from OLE_HANDLE to HBITMAP doesn´t seem to work, no HBRUSH-handle is returned in PatternBrush.
Who can help?
Thanks!
Olli.
I´d like to create a pattern-brush from a bitmap in a CPictureHolder-object. I´ve tried it this way:
IPicture* iPicture=m_Picture.m_pPict;
HBRUSH PatternBrush=NULL;
OLE_HANDLE hPic;
iPicture->get_Handle(&hPic);
PatternBrush=CreatePatternBrush((HBITMAP)hPic);
m_Picture is the CPictureHolder-object.
get_Handle returns a OLE_HANDLE, but the CreatePatternBrush-function needs a HBRUSH-handle. The way i tried to convert from OLE_HANDLE to HBITMAP doesn´t seem to work, no HBRUSH-handle is returned in PatternBrush.
Who can help?
Thanks!
Olli.