高分:关于获取操作系统版本
程序是这样的
BOOL CRegFixDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, TRUE); // Set small icon
OSVERSIONINFO osinfo;
int num=osinfo.dwMajorVersion ;
if (num==5)
MessageBox(_T("NT5"));
DWORD iButtonStyle=WS_CHILD|WS_VISIBLE|BS_CENTER|BS_FLAT|BS_MULTILINE|BS_VCENTER;
m_button1.Create (_T("Button1"),iButtonStyle,CRect(20,197,100,227),this,501);
......
}
就是说先判断操作系统版本,如果是Windows 2000/XP/Server 2003,就弹出信息,提示是NT5
但是现在根本没有弹出信息来
这是怎么回事啊?