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

I want to draw sth on the flash contorl

0 views
Skip to first unread message

kinb...@gmail.com

unread,
Sep 19, 2008, 3:31:08 AM9/19/08
to
I have already download the sourcecode of Transparent Flash Control
http://www.codeproject.com/KB/COM/flashcontrol.aspx

now I want to draw something on the flash control, I do it like this
OLECONTAINER(void)::Draw(HDC hdcDraw, const RECT *rcDraw, BOOL bErase)
{
HWND hwnd = GetHWND();
HRESULT hr;
RECT r;

IOleObject *lpO = m_lpO;
IViewObject *lpV = m_lpViewObjectEx ? (IViewObject
*)m_lpViewObjectEx : m_lpViewObject;

// if (!m_bTransparent)
{
RECT rTotal;
::GetClientRect(hwnd, &rTotal);
if (lpV)
{
if (!hdcDraw)
{
hdcDraw = ::GetDC(hwnd);
hr = OleDraw(lpV, DVASPECT_CONTENT, hdcDraw, &rTotal);
::ReleaseDC(hwnd, hdcDraw);
}
else
{
hr = OleDraw(lpV, DVASPECT_CONTENT, hdcDraw, &rTotal);
}
}

TextOut(hdcDraw, 0, 0, "test", 4); // <======= do it like this
return;
}
but nothing happen......how can I do it ?

misan

unread,
Sep 19, 2008, 5:23:50 AM9/19/08
to
(1) use spy to find if it's the actural window handle you draw into
(2) get window dc to draw, set clip region.

<kinb...@gmail.com>
??????:360cff46-2335-4b92...@b38g2000prf.googlegroups.com...

kinb...@gmail.com

unread,
Sep 19, 2008, 5:34:41 AM9/19/08
to
it's a ole Container, not a normal windows, so....
0 new messages