连连看API版本的源代码[11]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

     rect.left=0;
     rect.right=0 ;
     rect.top=0;
     rect.bottom=0;
     PlaySound (TEXT ("no.wav"), NULL, SND_FILENAME | SND_ASYNC) ;
    
    }
    pSelected[0].x=0;
    pSelected[0].y=0;
    pSelected[1].x=0;
    pSelected[1].y=0;

    
   }
   else
   {//同一张牌或花色不一致

    rect.left = pSelected[0].x *(cxBack-3);
    rect.right = rect.left+(cxBack-3)+3;
    rect.top  = pSelected[0].y *(cyBack-4)-30;
    rect.bottom = rect.top + (cyBack-4)+4;
    InvalidateRect (hwnd, &rect, true) ;

    pSelected[0].x=x;
    pSelected[0].y=y;
    pSelected[1].x=0;
    pSelected[1].y=0;

    rect.left = pSelected[0].x *(cxBack-3);
    rect.right = rect.left+(cxBack-3)+3;
    rect.top  = pSelected[0].y *(cyBack-4)-30;
    rect.bottom = rect.top + (cyBack-4)+4;
    InvalidateRect (hwnd, &rect, true) ;
    /*
    rect.left=0;
    rect.right=0 ;
    rect.top=0;
    rect.bottom=0;*/
   }
  

  }
  }

  if( iCount==(M-2)*(N-2)/2 )
  { 
   iCount=0;
   KillTimer (hwnd, TimerID) ;
   MessageBox (hwnd, TEXT ("恭喜你,你赢了!!"),szAppName, MB_OK | MB_ICONQUESTION) ;


   SendMessage(hwnd,WM_COMMAND,IDM_APP_START,0);
  }
  return 0;
  

 case WM_CLOSE://用户关闭程序
  if ( IDYES == MessageBox (hwnd, TEXT ("确认关闭程序"),
    szAppName, MB_YESNO | MB_ICONQUESTION) )
  //弹出确认窗口,按YES退出程序
  {
   PlaySound (TEXT ("close.wav"), NULL, SND_FILENAME | SND_ASYNC) ;
   KillTimer (hwnd, TimerID) ;
   DestroyWindow (hwnd) ;
   Sleep(2000);
  }
  return 0 ;
 case WM_DESTROY:
  
  PostQuitMessage (0) ;
  return 0 ;
 }

 return DefWindowProc (hwnd, message, wParam, lParam) ;
}

本文关键:连连看API版本的源代码
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top