I am trying to get the size of the button in Windows in my project using windows API GetSystemMetrics(SM_CXSIZE).
Whereas GetSystemMetrics(SM_CXSIZE) returns '36' in Windows 8 and I am able to adjust the tool bar window correctly. But it returns '22' in Windows Server 2012 and I am not able to adjust my tool bar properly.
A sample code snippet is:
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
int main()
{
printf("Value SM_CXSIZE: %d", GetSystemMetrics(SM_CXSIZE));
return 0;
}
Can you please suggest a way to accomplish this.