|
Shabbir,
This was helpfull, but in VC 8.0 (VS2005), you have to do things a little different.
1. The IDE will not let you add a variable of CStatic type. You have to edit the code directly:
Calling code header:
CPictureBox m_PicBox;
Calling code implementaion:
void XXX::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
...
DDX_Control(pDX, IDC_PICTBOX1, m_PicBox);
}
2. You have to overload the CStatic DrawItem function because winctrl1.cpp has this in it:
// Derived class is responsible for implementing all of these handlers
// for owner/self draw controls
void CStatic::DrawItem(LPDRAWITEMSTRUCT)
{
ASSERT(FALSE);
}
PictureBox.h:
void DrawItem(LPDRAWITEMSTRUCT ds);
PictureBox.cpp:
void CPictureBox::DrawItem(LPDRAWITEMSTRUCT ds)
{
//Do nothing
}
-Gabe
|