●GetSystemMetricsのサンプルプログラム |
#include <windows.h> int WINAPIWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd){ char szMessage[1024]; wsprintf(szMessage,"現在のディスプレイの解像度は、%d * %dです。", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) ); MessageBox(NULL,szMessage,"システム情報",MB_ICONINFORMATION | MB_OK); return (0); } |