启动Timer SetTimer(100,100,NULL); 添加WM_TIMER处理(ClassView右键CxxxDlg选择Add windows message handler然后选择WM_TIMER add and edit) void CxxxDlg::OnTimer(UINT nIDEvent) { // TODO: Add your message handler code here and/or call default CStatic next = IDB_BITMAP2; CBitmap bmp; bmp.LoadBitmap(next); ((CStatic*)GetDlgItem(IDC_PIC))->SetBitmap(bmp.operator HBITMAP()); next = next== IDB_BITMAP1 ? IDB_BITMAP2:IDB_BITMAP1; CDialog::OnTimer(nIDEvent); }
在Picture控件中显示轮换图象
支持原创技术分享,据说打赏我的人,都找到了女朋友!