Changeset 496 for trunk/src/comctl32/comboex.c
- Timestamp:
- Aug 14, 1999, 6:13:16 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/comboex.c
r94 r496 1 /* $Id: comboex.c,v 1. 3 1999-06-10 16:21:57 achimhaExp $ */1 /* $Id: comboex.c,v 1.4 1999-08-14 16:13:09 cbratschi Exp $ */ 2 2 /* 3 3 * ComboBoxEx control … … 16 16 * 17 17 * FIXME: 18 * - should include "combo.h" 18 * - should include "combo.h" 19 19 */ 20 20 … … 50 50 51 51 if ((GetWindowLongA (hwnd, GWL_STYLE) & CBS_DROPDOWNLIST) != CBS_DROPDOWN) 52 52 return 0; 53 53 54 54 // TRACE (comboex, "-- 0x%x\n", GetDlgItem (infoPtr->hwndCombo, ID_CB_EDIT)); … … 103 103 104 104 if ((DWORD)wParam) { 105 105 infoPtr->dwExtStyle = (infoPtr->dwExtStyle & ~(DWORD)wParam) | (DWORD)lParam; 106 106 } 107 107 else 108 108 infoPtr->dwExtStyle = (DWORD)lParam; 109 109 110 110 /* FIXME: repaint?? */ … … 150 150 // FIXME (comboex, "(0x%x 0x%x 0x%lx): stub\n", uMsg, wParam, lParam); 151 151 152 if (infoPtr->hwndCombo) 153 152 if (infoPtr->hwndCombo) 153 return SendMessageA (infoPtr->hwndCombo, uMsg, wParam, lParam); 154 154 155 155 return 0; … … 166 166 infoPtr = (COMBOEX_INFO *)COMCTL32_Alloc (sizeof(COMBOEX_INFO)); 167 167 if (infoPtr == NULL) { 168 // 169 168 // ERR (comboex, "could not allocate info memory!\n"); 169 return 0; 170 170 } 171 171 … … 178 178 /* create combo box */ 179 179 dwComboStyle = GetWindowLongA (hwnd, GWL_STYLE) & 180 180 (CBS_SIMPLE|CBS_DROPDOWN|CBS_DROPDOWNLIST|WS_CHILD); 181 181 182 182 infoPtr->hwndCombo = CreateWindowA ("ComboBox", "", 183 184 185 183 WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | dwComboStyle, 184 0, 0, 0, 0, hwnd, (HMENU)1, 185 GetWindowLongA (hwnd, GWL_HINSTANCE), NULL); 186 186 187 187 return 0; … … 196 196 197 197 if (infoPtr->hwndCombo) 198 198 DestroyWindow (infoPtr->hwndCombo); 199 199 200 200 … … 217 217 218 218 MoveWindow (infoPtr->hwndCombo, 0, 0, rect.right -rect.left, 219 220 221 return 0; 222 } 223 224 225 LRESULT WINAPI219 rect.bottom - rect.top, TRUE); 220 221 return 0; 222 } 223 224 225 static LRESULT WINAPI 226 226 COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 227 227 { 228 228 switch (uMsg) 229 229 { 230 /* 231 232 233 234 235 236 237 238 239 240 241 242 243 244 /* 245 246 247 230 /* case CBEM_DELETEITEM: */ 231 232 case CBEM_GETCOMBOCONTROL: 233 return COMBOEX_GetComboControl (hwnd, wParam, lParam); 234 235 case CBEM_GETEDITCONTROL: 236 return COMBOEX_GetEditControl (hwnd, wParam, lParam); 237 238 case CBEM_GETEXTENDEDSTYLE: 239 return COMBOEX_GetExtendedStyle (hwnd, wParam, lParam); 240 241 case CBEM_GETIMAGELIST: 242 return COMBOEX_GetImageList (hwnd, wParam, lParam); 243 244 /* case CBEM_GETITEM32A: 245 case CBEM_GETITEM32W: 246 case CBEM_GETUNICODEFORMAT: 247 case CBEM_HASEDITCHANGED: 248 248 */ 249 249 250 251 252 253 /* 254 255 256 257 258 259 260 261 262 263 264 /* 265 250 case CBEM_INSERTITEMA: 251 return COMBOEX_InsertItemA (hwnd, wParam, lParam); 252 253 /* case CBEM_INSERTITEM32W: */ 254 255 case CBEM_SETEXTENDEDSTYLE: 256 return COMBOEX_SetExtendedStyle (hwnd, wParam, lParam); 257 258 case CBEM_SETIMAGELIST: 259 return COMBOEX_SetImageList (hwnd, wParam, lParam); 260 261 case CBEM_SETITEMA: 262 return COMBOEX_SetItemA (hwnd, wParam, lParam); 263 264 /* case CBEM_SETITEM32W: 265 case CBEM_SETUNICODEFORMAT: 266 266 */ 267 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 // 302 // 303 // 304 268 case CB_DELETESTRING: 269 case CB_FINDSTRINGEXACT: 270 case CB_GETCOUNT: 271 case CB_GETCURSEL: 272 case CB_GETDROPPEDCONTROLRECT: 273 case CB_GETDROPPEDSTATE: 274 case CB_GETITEMDATA: 275 case CB_GETITEMHEIGHT: 276 case CB_GETLBTEXT: 277 case CB_GETLBTEXTLEN: 278 case CB_GETEXTENDEDUI: 279 case CB_LIMITTEXT: 280 case CB_RESETCONTENT: 281 case CB_SELECTSTRING: 282 case CB_SETCURSEL: 283 case CB_SETDROPPEDWIDTH: 284 case CB_SETEXTENDEDUI: 285 case CB_SETITEMDATA: 286 case CB_SETITEMHEIGHT: 287 case CB_SHOWDROPDOWN: 288 return COMBOEX_Forward (hwnd, uMsg, wParam, lParam); 289 290 291 case WM_CREATE: 292 return COMBOEX_Create (hwnd, wParam, lParam); 293 294 case WM_DESTROY: 295 return COMBOEX_Destroy (hwnd, wParam, lParam); 296 297 case WM_SIZE: 298 return COMBOEX_Size (hwnd, wParam, lParam); 299 300 default: 301 // if (uMsg >= WM_USER) 302 // ERR (comboex, "unknown msg %04x wp=%08x lp=%08lx\n", 303 // uMsg, wParam, lParam); 304 return DefWindowProcA (hwnd, uMsg, wParam, lParam); 305 305 } 306 306 return 0; … … 323 323 wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); 324 324 wndClass.lpszClassName = WC_COMBOBOXEXA; 325 325 326 326 RegisterClassA (&wndClass); 327 327 } … … 332 332 { 333 333 if (GlobalFindAtomA (WC_COMBOBOXEXA)) 334 335 } 336 334 UnregisterClassA (WC_COMBOBOXEXA, (HINSTANCE)NULL); 335 } 336
Note:
See TracChangeset
for help on using the changeset viewer.