Quick answer
ERROR_INVALID_COMBOBOX_MESSAGE (0x0000058E) fires when an application sends a message like CB_GETEDITSEL, CB_SETEDITSEL, CB_LIMITTEXT, or WM_SETTEXT to a combo box created without the CBS_DROPDOWN or CBS_SIMPLE style. The control has no edit field, so Windows rejects the call. The fix lives in the app code, not in your Windows install.
What's actually happening
I know this error is infuriating because it usually shows up in a dialog box, crashes the app, and gives you absolutely nothing to click. Here's the context: Windows combo boxes come in three flavors — CBS_SIMPLE, CBS_DROPDOWN, and CBS_DROPDOWNLIST. Only the first two have a text entry field. The third one is a picker, nothing more. If a developer accidentally sends an edit-related message to a CBS_DROPDOWNLIST, the window procedure returns 0x58E, and depending on how the app handles the return value, it can throw, log, or flat-out crash.
This error was everywhere when companies ported VB6 and MFC apps to Windows 7 and again when they moved to Windows 10 1809 and later. The classic trigger: a legacy line of code like SendMessage(hCombo, CB_SETEDITSEL, 0, MAKELPARAM(0, -1)) that used to run harmlessly on a simple combo, then someone changed the dialog resource in Visual Studio's resource editor and silently flipped the style to CBS_DROPDOWNLIST. Everything compiles, everything looks fine, and then the dialog blows up on one user's machine during a demo. Fun times.
The real fix
If you're the developer, this is a code fix. If you're an end user seeing this in an app you didn't write, jump to the alternative section below.
- Find the offending SendMessage call. Open the app source and search for every
CB_message being sent. The usual suspects areCB_GETEDITSEL,CB_SETEDITSEL,CB_LIMITTEXT,CB_GETLIMITTEXT,CB_SETCURSEL(when the control is alsoCBS_SIMPLEwith no edit), and rawWM_SETTEXT. - Check the combo box style. Right-click the control in the resource editor and look at Properties. Or, at runtime, call:
The low two bits of the style tell you the combo type.LONG style = GetWindowLong(hCombo, GWL_STYLE); if ((style & 0x0003L) == CBS_DROPDOWNLIST) { // no edit control — bail out }0x0003isCBS_DROPDOWNLIST. - Guard the call. Wrap every edit-only message in that check. That's the actual fix. Don't try to "add an edit control" to a dropdown-list — you'll break the UI design.
- Or change the style. If the design actually wants a text field, change the style to
CBS_DROPDOWNin the .rc file. Only do this if the product owner agrees — it changes behavior on screen. - Rebuild and test on a clean machine. Legacy app resources cached in a stale .res file will keep you chasing ghosts. Do a full rebuild, not an incremental one.
Quick reference
| Style | Value | Has edit? | Safe messages |
|---|---|---|---|
| CBS_SIMPLE | 0x0001 | Yes | All CB_* |
| CBS_DROPDOWN | 0x0002 | Yes | All CB_* |
| CBS_DROPDOWNLIST | 0x0003 | No | Selection only |
If you can't touch the code
You're stuck with a third-party app that throws 0x58E on startup or during a specific action. Try these in order:
- Update the app. This bug is almost always fixed in a point release. Check the vendor's changelog for "combo box" or "0x58E" mentions.
- Run in compatibility mode. Right-click the .exe → Properties → Compatibility → try Windows 7 or Windows 8. Older routing sometimes bypasses the bad code path if the app has a legacy branch.
- Check for a newer .NET or VC++ runtime. A surprising number of these errors come from an app linking against an older MFC DLL that mishandles the return value. Installing the latest VC++ 2015-2022 redistributable is a five-minute shot worth taking.
- Repair the install. Settings → Apps → find the program → Modify → Repair. This replaces the resource file, which occasionally has been corrupted by a bad update.
- File it with the vendor. Give them the exact error code (0x58E) and the steps that trigger it. That's the only path to a real fix if it's not your code.
Prevention
If this is your codebase: never send a CB_* edit message without checking the style first. Wrap it in a helper function. Add a unit test that instantiates each combo style and asserts the return value. I've seen this bug ship three times at three different companies because nobody wrote that one test. Also, put a comment next to any CB_SETEDITSEL call explaining why the guard exists — otherwise some future dev will "clean it up" and reintroduce the crash at 4:55pm on a Friday.