I can't call the OnPaint() in my OnChange(), it produces all kinds of errors.
How can I solve that?
What's a nice workaround?
Doc,
It seems to be difficult to attached the class in a sdi project or because I'm only novice.
I have a sdi project that inherits CFormView not CView (where you can put controls in sdi at design time).
My problem is that when I add onpaint "debug assertion failed" happens.
Here's a some code snippet to further elaborate:
void CEPSView::OnPaint()
{
HWND hWnd = AfxGetApp()->GetMainWnd()->m_hWnd;
CPaintDC dc(this); // device context for painting
CRect ClientArea;
::GetClientRect(hWnd, &ClientArea);
m_Picture.UpdateSizeOnDC(&dc); // Get Picture Dimentions In Pixels
m_Picture.Show(&dc, CRect(0,30,ClientArea.Width(),ClientArea.Height())); // Change Original Dimentions
// Do not call CFormView::OnPaint() for painting messages
}
void CEPSView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
m_Picture.Load("EPS_bg.gif");
}
Thank you in advance....
Hello man,
It's very nice 2 hear from a real Microsoft person
By the way, I saw your article only few days after I publish my article on CodeGuru,
(Maybe I should work 4 Microsoft 2
I read your comment about the rights stuff,
Anyway, your article, my article and many other articles
that uses the IPicture intece does not violate any rights,
This is becuase all of these articles or software that are made
using the IPicture intece do not actually do the decompression,
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-27278-5.html
帮做不断提高产品质量
送测
对于马老大本人还是比较佩服的