Méthode PaintWin
Voici la méthode PaintWin de CGUIPAPER de GUIPAPER. Cotisations.
HRESULT CGuiPaper::PaintWin(void)
{
HRESULT hr = E_FAIL;
COLORREF crInkColor;
SHORT nInkWidth;
if (m_pIPaper && !m_bPainting && !m_bInking)
{
m_bPainting = TRUE;
// Save and restore ink color and width since redraw otherwise
// ends up changing these values in CGuiPaper.
crInkColor = m_crInkColor;
nInkWidth = m_nInkWidth;
hr = m_pIPaper->Redraw(m_nLockKey);
m_nInkWidth = nInkWidth;
m_crInkColor = crInkColor;
m_bPainting = FALSE;
}
return hr;
}
PaintWin appelle essentiellement la méthode de redessin du codocument. Dans l’exemple StoServe , la méthode redessin a été montrée pour diffuser le tableau de données d’encre de l’ensemble du codocument sur tous les récepteurs connectés. PaintWin appelle un objet côté serveur pour renvoyer les données de dessin au client.