请问这个画图函数是怎么实现的,还有画图的时候,程序每次运行到红色标注的语句输出窗口就会提示:“0x4aeee2e0 处最可能的异常: 0x80000001: 尚未实现”请问这个是什么原因
         ::WaitForSingleObject(m_hPause, INFINITE); //m_hPause手工重置,初始有信号
//pageGuid的值在显示GIF为FrameDimensionTime,显示TIF时为FrameDimensionPage
GUID   pageGuid = FrameDimensionTime; RECT rect;
UINT width, height;
HDC  hDC = GetDC(m_hWnd);
int  BltMode = SetStretchBltMode (hDC, COLORONCOLOR) ;
::SetMapMode(hDC,MM_TEXT);
if (m_hdcMem)
{
width = GetWidth();
height = GetHeight();
SetRect(&rect, 0, 0, width, height);
FillRect(m_hdcMem,&rect,(HBRUSH) (COLOR_WINDOW+1));
Graphics graphics(m_hdcMem);
graphics.DrawImage(this, 0, 0, width, height);
StretchBlt(hDC, m_rect.left, m_rect.top,
m_rect.right-m_rect.left, m_rect.bottom-m_rect.top,
m_hdcMem, 0, 0, width, height, SRCCOPY);
}
SetStretchBltMode (hDC, BltMode) ;
ReleaseDC(m_hWnd, hDC); long lPause = ((long*) m_pPropertyItem->value)[m_nFramePosition] * 10;
if(lPause<10)
lPause=80;
else if(lPause>5000)
lPause=80;
DWORD dwErr = WaitForSingleObject(m_hExitEvent, lPause); //m_hExitEvent手工重置,初始无信号 if(WAIT_OBJECT_0 != dwErr) 
{
if(++m_nFramePosition == m_nFrameCount)
m_nFramePosition = 0;
SelectActiveFrame(&pageGuid, m_nFramePosition);
return false;
}
else
return true; // 如果在lPause时间内产生信号,则返回true,表示要退出线程

解决方案 »

  1.   

    DrawImage第一个参数是Image、Bitmap或MetaFile指针,你传的this是啥啊?
      

  2.   

    因为这个类是从gdi+的IMAGE类继承而来的,说以传this是可以的。
      

  3.   

    DWORD dwErr = WaitForSingleObject(m_hExitEvent, lPause); //m_hExitEvent手工重置,初始无信号
    后加 ResetEvent( m_hExitEvent );
      

  4.   

    我是用CImage这个类才有的,但很奇怪,之前用一模一样的函数就没有