BOOL C测试气泡Dlg::OnInitDialog() { CDialog::OnInitDialog(); // 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动 // 执行此操作 SetIcon(m_hIcon, TRUE); // 设置大图标 SetIcon(m_hIcon, FALSE); // 设置小图标 SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = this->GetSafeHwnd(); mbi.nToolBarId = IDR_MENU1; mbi.dwFlags = SHCMBF_HMENU | SHCMBF_HIDESIPBUTTON; mbi.hInstRes = AfxGetApp()->m_hInstance; mbi.nBmpId = 0; mbi.cBmpImages = 0; ::SHCreateMenuBar(&mbi); return TRUE; // 除非将焦点设置到控件,否则返回 TRUE } BOOL C测试气泡Dlg::OnInitDialog() { CDialog::OnInitDialog(); // 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动 // 执行此操作 SetIcon(m_hIcon, TRUE); // 设置大图标 SetIcon(m_hIcon, FALSE); // 设置小图标 SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = this->GetSafeHwnd(); mbi.nToolBarId = IDR_MENU1; mbi.dwFlags = SHCMBF_HMENU | SHCMBF_HIDESIPBUTTON; mbi.hInstRes = AfxGetApp()->m_hInstance; mbi.nBmpId = 0; mbi.cBmpImages = 0; ::SHCreateMenuBar(&mbi); return TRUE; // 除非将焦点设置到控件,否则返回 TRUE } 还要在加入 头文件 #include <aygshell.h>