I am creating a Windows Forms control derived from UserControl to be embedded in a WPF app. I have generally followed the procedures given in this link.
public ref class CTiledImgViewControl : public UserControl
{
...
virtual void OnPaint( PaintEventArgs^ e ) override;
...
};
And in my CPP file:
void CTiledImgViewControl::OnPaint( PaintEventArgs^ e )
{
UserControl::OnPaint(e);
// do something interesting...
}
Everything compiles and runs, however the OnPaint method is never getting called.
Any ideas of things to look for? I've done a lot with C++, but am pretty new to WinForms and WPF, so it could well be something obvious...