[MFC] Débutant : Problème avec OnPaint()
hello à tous
j'ai un problème avec OnPaint() de MaClasseFrame héritant de CFrameWnd.
J'aimerais juste afficher une bitmap sur cette frame (par l'intermediaire de CPicture, http://www.codeproject.com/bitmap/pictureshow.asp)
Code:
1 2 3 4 5 6 7 8 9
| void MaClasseFrame::OnPaint()
{
CPaintDC dc(this); // device context for painting
if (m_pExpPicture!=NULL)
{
m_pExpPicture->Show(&dc);//call to CPicture::Show(CDC *pDC, CRect DrawRect)
}
} |
Aucune erreur d'execution, mais malheureusement rien ne s'affiche... ai je oublier qqch d'important ?
PS: j'ai verifier le polymorphisme de CPaintDC -> CDC, pas de problème.
PS2 : j'ai essayer de rajouter un appel à UpdateWindow() et Invalidate() mais pas de changement...
PS3 : WM_PAINT est bien linké sur OnPaint()