Windows mobile Windows Mobile GetDeviceCaps始终返回零
调用GetDeviceCaps是否有先决条件?我试图(在运行时)发现Windows Mobile设备的本机屏幕分辨率是QGVA还是VGA。OnInitDialog()中的以下返回值均为零: 试试这个: int horzRes=GetSystemMetrics(SM_CXSCREEN)Windows mobile Windows Mobile GetDeviceCaps始终返回零,windows-mobile,Windows Mobile,调用GetDeviceCaps是否有先决条件?我试图(在运行时)发现Windows Mobile设备的本机屏幕分辨率是QGVA还是VGA。OnInitDialog()中的以下返回值均为零: 试试这个: int horzRes=GetSystemMetrics(SM_CXSCREEN) int vertRes=GetSystemMetrics(SM_CYSCREEN) 肯定有先决条件 说: 从“插入”菜单中,选择“资源” 单击“自定义”按钮 为资源类型输入CEUX 将资源数据设置为01 00 单击
int vertRes=GetSystemMetrics(SM_CYSCREEN) 肯定有先决条件 说:
HI_RES_AWARE CEUX {1} // To turn off the emulation layer
应用程序代码还需要具有介绍性:
AfxEnableDRA( true );
即使在那之后,上面的所有GetDeviceCaps值仍然为零,但是
int widthX = GetSystemMetrics( SM_CXFULLSCREEN );
int heightY = GetSystemMetrics( SM_CYFULLSCREEN );
int captionHeight = GetSystemMetrics( SM_CYCAPTION );
int menuHeight = GetSystemMetrics( SM_CYMENU );
int dialogFrameWidth = GetSystemMetrics( SM_CXDLGFRAME );
int dialogFrameHeight = GetSystemMetrics( SM_CYDLGFRAME );
VGA分辨率PPC03se和WM5设备及模拟器上的所有返回(高分辨率)值
int widthX = GetSystemMetrics( SM_CXFULLSCREEN );
int heightY = GetSystemMetrics( SM_CYFULLSCREEN );
int captionHeight = GetSystemMetrics( SM_CYCAPTION );
int menuHeight = GetSystemMetrics( SM_CYMENU );
int dialogFrameWidth = GetSystemMetrics( SM_CXDLGFRAME );
int dialogFrameHeight = GetSystemMetrics( SM_CYDLGFRAME );