添加WM_TIME消息映射,
在OnTime函数中添加显示图片的代码,
注意要设置SetTimer(0,100,NULL);100是0.1秒,1000是1秒,

解决方案 »

  1.   

    1。做个定时器,间隔为1秒
      2。在WM_ONTIMER中载入图象
      

  2.   

    在程序初始化中加入SetTimer(具体用法参考Win32API).然后在WM_TIMER消息中让picture控件加载新的图片.
      

  3.   

    #define  TM_LOADPICT      800
    void CAppView::OnStartPict() 
    {
       SetTimer(0,1000,NULL);}void CAppView::OnTimer(UINT nIDEvent) 
    {
    // TODO: Add your message handler code here and/or call default
    if ( nIDEvent== TM_LOADPICT )
    {
               // 处理LOADPICT;
       
    } CView::OnTimer(nIDEvent);
    }
      

  4.   

    如果定时要比较准确,请使用多媒体定时器。Obtaining and Setting Timer Resolution#define TARGET_RESOLUTION 1         // 1-millisecond target resolutionTIMECAPS tc;
    UINT     wTimerRes;if (timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMERR_NOERROR) 
    {
        // Error; application can't continue.
    }wTimerRes = min(max(tc.wPeriodMin, TARGET_RESOLUTION), tc.wPeriodMax);
    timeBeginPeriod(wTimerRes); Starting a Single Timer EventUINT SetTimerCallback(NPSEQ npSeq,  // sequencer data
        UINT msInterval)                // event interval

        npSeq->wTimerID = timeSetEvent(
            msInterval,                    // delay
            wTimerRes,                     // resolution (global variable)
            OneShotCallback,               // callback function
            (DWORD)npSeq,                  // user data
            TIME_ONESHOT );                // single timer event
        if(! npSeq->wTimerID)
            return ERR_TIMER;
        else
            return ERR_NOERROR;
    } Writing a Timer Callback Functionvoid CALLBACK OneShotTimer(UINT wTimerID, UINT msg, 
        DWORD dwUser, DWORD dw1, DWORD dw2) 

        NPSEQ npSeq;             // pointer to sequencer data 
        npSeq = (NPSEQ)dwUser;
        npSeq->wTimerID = 0;     // invalidate timer ID (no longer in use)
        TimerRoutine(npSeq);     // handle tasks 
    } Canceling a Timer Eventvoid DestroyTimer(NPSEQ npSeq)
    {
        if(npSeq->wTimerID) {                // is timer event pending?
            timeKillEvent(npSeq->wTimerID);  // cancel the event
            npSeq->wTimerID = 0;
        }

      

  5.   

    依旧关注
    那位大侠有着方面的代码没有?
    可发[email protected]
      

  6.   

    画完图之后!
    Sleep();//单位是毫秒
    不久解决了!!
    不用太复杂!!
    不过呢,想请你给我看看我的问题!!http://www.csdn.net/expert/topic/675/675963.xml?temp=.3516199
    谢谢!!!
      

  7.   

    如何在ONtimer函数中显示一幅图画?