摘要: vc中获取windows版本信息,一般是调用GetVersionEx 这个API函数来获取的,这个API需要OSVERSIONINFOEX 这个结构体作为参数,OSVERSIONINFOEX 的对应的具体的OS版本类型详细如下:Operating systemVersion numberdwMajorVersiondwMinorVersionOtherWindows8.16.3*63OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATIONWindows Server2012R26.3*63OSVERSIONINFOEX.wProductType != 阅读全文
posted @ 2014-01-10 15:45 Jamy Cai 阅读(5343) 评论(1) 推荐(0) 编辑
摘要: 在VC++中,要实现对回车键的响应实现,一般通过截获消息来响应,即通过处理BOOL PreTranslateMessage(MSG* pMsg)这个函数来处理实现如下:BOOL PreTranslateMessage(MSG* pMsg){ if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN ) //屏蔽ALT+F4{ //处理响应回车键后的动作} return __super::PreTranslateMessage(pMsg);} 阅读全文
posted @ 2014-01-10 13:07 Jamy Cai 阅读(1914) 评论(0) 推荐(0) 编辑