Hey What i understand according to this you want hide and show image on button click.
so following code is just suggestion
define object of CPitureEx in your dialog .h file.
like following,
CPictureEx m_piture;
in OnInitDialog() of you dialog just provide this lines of codes
if (m_Picture.Load(MAKEINTRESOURCE(IDR_FELIX),_T("GIF")))
m_Picture.Draw();
No on click of your HideShow() button
HideShow()
{
if(m_Picture.IsWindowVisible())
{
m_Picture.ShowWindow(0);
}
else
{
m_Picture.ShowWindow(1);
}
}
For more information you may see this example
Dispaying Image[
^]