| 154 | } |
| 155 | |
| 156 | void CBriefScreenEdit::OnSelchangeBriefAddsLayoutList() { |
| 157 | if (bm_handle > BAD_BITMAP_HANDLE) { |
| 158 | bm_FreeBitmap(bm_handle); |
| 159 | bm_handle = -1; |
| 160 | } |
| 161 | |
| 162 | CComboBox *combo = (CComboBox *)GetDlgItem(IDC_BRIEF_ADDS_LAYOUT_LIST); |
| 163 | int sel = combo->GetCurSel(); |
| 164 | if (sel > 0) { |
| 165 | bm_handle = bm_AllocLoadFileBitmap(PBlayouts[sel - 1].filename, 0); |
| 166 | } |
| 167 | |
| 168 | CWnd *objwnd; |
| 169 | RECT rect; |
| 170 | int w, h; |
| 171 | |
| 172 | objwnd = GetDlgItem(IDC_BRIEF_ADDS_PICTURE); |
| 173 | objwnd->GetWindowRect(&rect); |
| 174 | w = rect.right - rect.left; |
| 175 | h = rect.bottom - rect.top; |
| 176 | |
| 177 | int temp = bm_AllocBitmap(w, h, 0); |
| 178 | if (temp > BAD_BITMAP_HANDLE) { |
| 179 | bm_ClearBitmap(temp); |
| 180 | if (bm_handle > BAD_BITMAP_HANDLE) { |
| 181 | bm_ScaleBitmapToBitmap(temp, bm_handle); |
| 182 | } |
| 183 | bm_FreeBitmap(bm_handle); |
| 184 | bm_handle = temp; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | void CBriefScreenEdit::OnMissionflags() { |
| 189 | CBriefMissionFlagsDlg dlg(m_Set, m_UnSet); |
nothing calls this directly
no test coverage detected