Timerを作る
 今回作るTimeは決まった間隔で画像を表示するためのものではなく、
実行速度を調べるためのものです。現在、自分のパソコンです。
 1秒間に30回画像を更新できるようなSpriteアニメを作ることを
目標にしております。
 しかし、一秒間に30回も画像を更新できないかも知れないです。そんな時のために
Timerを作ります。遅延の原因を探るのためには正確な時間を知る必要があります。
詳しい内容はYosshin's Web Page
BM98'sROOMを見る良いでしょう。
以下、私が今回学んだこと。
以下使用するAPI
../win32apiのhelpから
typedef struct { 
    UINT wPeriodMin; 
    UINT wPeriodMax; 
} TIMECAPS;
MMRESULT timeGetDevCaps(
    LPTIMECAPS ptc,	
    UINT cbtc	
   );
MMRESULT timeBeginPeriod(
    UINT uPeriod	
   );
MMRESULT timeEndPeriod(
    UINT uPeriod	
   );	
DWORD timeGetTime(VOID);
/*
wPeriodMin
Minimum supported resolution.
wPeriodMax
Maximum supported resolution. 
*/
以下使用するAPI
void Frame::onInit()
{
  
  TIMECAPS caps;
  timeGetDevCaps(&caps,sizeof(TIMECAPS));
  timeBeginPeriod(caps.wPeriodMin);
  
}
void Frame::onPaint(PaintEvent e)
{
  Image bitmap;
  
  char ch[100];
  DWORD te;
  te  = timeGetTime();
  bitmap.loadBitmap();
  StretchDIBits(e.hdc,
                0,
                0,
                200,
                200,
                0,
                0,
                200,
                200,
                bitmap.getBitmapMap(),
                &bitmap.getBitmapInfo(),
                DIB_RGB_COLORS,
                SRCCOPY
                );
        te -= timeGetTime();
        wsprintf(ch,"sdf\n%d\n",-te);
        MessageBox(NULL,ch,"",MB_OK);  
}
 現在、 どのようにしてTimer性能を確認すればよいのだろうか? 分からない。 
ここまでの内容