I have implemented a custom tooltip below is the code. Below is the function taht is called at last while drawing the tip.
void CustomToolTipPlain::DrawTip(CDC *pDC)
CBitmap *oldBitmap = dcMem.SelectObject(m_tipImage);
pDC->BitBlt(0, 0, bm.bmWidth, bm.bmHeight, &dcMem, 0, 0, SRCCOPY);
There is also another function
Now in the situation where the Ontimer function is called before even calling the CClientDC dc(this); and finishing the drawing (DrawTip(&dc);
My tooltip is always blank in this situation and it doesn't draw anything. It just shows a blank window from the ShowWindow(SW_SHOW) function of the OnTimer.
From the debugging its clear that the call to CClientDC dc(this); is giving a blank dc value when the window is open. Is this true,do you guys think this is the reason? So my question is:
Does CClientDC dc(this); fails when the client windows is open?