我用GetSystemMetrics为什么得到的屏蔽大小居然不对,难道是这个API函数有BUG吗?别列举一堆使用方法,我会用,就是不知道为什么某些情况下获取到的屏幕大小不同

解决方案 »

  1.   

    SM_CXFULLSCREEN
    SM_CYFULLSCREEN代码?
      

  2.   

    我这里的结果:
    SM_CXSCREEN 1280
    SM_CYSCREEN 1024
    SM_CXFULLSCREEN 1280
    SM_CYFULLSCREEN 963
      

  3.   

    我一般用GetClientRect..............
      

  4.   

    Height of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.
    MSDN上的解释
      

  5.   

    SM_CXSCREEN
    SM_CYSCREEN
    我就是这样获取的,让窗口全屏化,没有问题的呀
    列举一下你的屏幕值以及获取的值,才好分析问题
    如果是效果不对,则可能
    1.SM_CXFULLSCREEN
    SM_CYFULLSCREEN获取的是最大化区域,并非整个显示屏
    2.你对显示器的设置导致,比如太偏右
    至于对分辨率的设置导致的,倒不太可能