| 97 | // CAPIExampleDlg message handlers |
| 98 | |
| 99 | BOOL CAPIExampleDlg::OnInitDialog() |
| 100 | { |
| 101 | CDialogEx::OnInitDialog(); |
| 102 | |
| 103 | // Add "About..." menu item to system menu. |
| 104 | |
| 105 | // IDM_ABOUTBOX must be in the system command range. |
| 106 | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); |
| 107 | ASSERT(IDM_ABOUTBOX < 0xF000); |
| 108 | |
| 109 | CMenu* pSysMenu = GetSystemMenu(FALSE); |
| 110 | if (pSysMenu != nullptr) |
| 111 | { |
| 112 | BOOL bNameValid; |
| 113 | CString strAboutMenu; |
| 114 | bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); |
| 115 | ASSERT(bNameValid); |
| 116 | if (!strAboutMenu.IsEmpty()) |
| 117 | { |
| 118 | pSysMenu->AppendMenu(MF_SEPARATOR); |
| 119 | pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // Set the icon for this dialog. The framework does this automatically |
| 124 | // when the application's main window is not a dialog |
| 125 | SetIcon(m_hIcon, TRUE); // Set big icon |
| 126 | SetIcon(m_hIcon, FALSE); // Set small icon |
| 127 | |
| 128 | // TODO: Add extra initialization here |
| 129 | std::string strAppID = GET_APP_ID; |
| 130 | if (strcmp(strAppID.c_str(), "") == 0) |
| 131 | { |
| 132 | AfxMessageBox(_T("APP ID is not set, you can see readme file on how to get an APP ID.")); |
| 133 | ExitProcess(1); |
| 134 | } |
| 135 | InitCtrlText(); |
| 136 | InitSceneDialog(); |
| 137 | InitSceneList(); |
| 138 | |
| 139 | return TRUE; // return TRUE unless you set the focus to a control |
| 140 | } |
| 141 | |
| 142 | void CAPIExampleDlg::OnSysCommand(UINT nID, LPARAM lParam) |
| 143 | { |
nothing calls this directly
no outgoing calls
no test coverage detected