?? image.c~
字號:
/*以下代碼實現圖片切換*/static BITMAP bmp;int Beijing_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Beijing.jpg")) { printf("LoadBitmap Beijing.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Tokyo_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Tokyo.jpg")) { printf("LoadBitmap Tokyo.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480); }int Newyork_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Newyork.jpg")) { printf("LoadBitmap Newyork.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Rome_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Rome.jpg")) { printf("LoadBitmap Rome.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Berlin_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Berlin.jpg")) { printf("LoadBitmap Berlin.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Paris_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Paris.jpg")) { printf("LoadBitmap Paris.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int London_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "London.jpg")) { printf("LoadBitmap London.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Cairo_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Cairo.jpg")) { printf("LoadBitmap Cairo.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Sydney_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, "Sydney.jpg")) { printf("LoadBitmap Sydney.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}int Brazilia_Bmp (HDC hdc){ if (LoadBitmap (HDC_SCREEN, &bmp, " Brazilia.jpg")) { printf("LoadBitmap Brazilia.jpg Error!"); return -1; } FillBoxWithBitmap (hdc, 320, 210, 325, 220, &bmp); Rectangle (hdc, 0, 0, 640, 480);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -