BOOL CWinCCChnDiagDlg::OnInitDialog() { CDialogEx::OnInitDialog(); pSystemMenu=GetSystemMenu(FALSE); menuItem.cbSize = sizeof(MENUITEMINFO); menuItem.fMask = MIIM_STATE; menuItem.fState = MFS_CHECKED; pSystemMenu->AppendMenu(MFS_CHECKED, IDM_SYSCOMMAND_CUSTOM, _T("Always on top")); // 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, FALSE); // Set small icon return TRUE; // return TRUE unless you set the focus to a control }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)