WIN32API:獲取螢幕的解析度

左手青春發表於2020-10-30

#include <windows.h>
#include <stdio.h>
int main()
{
    DWORD widthScreen = GetSystemMetrics(SM_CXSCREEN);
    DWORD heightScreen = GetSystemMetrics(SM_CYSCREEN);
    printf("%lu x %lu\n", widthScreen, heightScreen);
    return 0;
}

 

相關文章