0X0000058E

Fix ERROR_INVALID_COMBOBOX_MESSAGE (0x58E) on Windows

That 0x58E error means your app tried to send a text message to a dropdown-only combo box. Here's how to stop it.

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.

  1. Find the offending SendMessage call. Open the app source and search for every CB_ message being sent. The usual suspects are CB_GETEDITSEL, CB_SETEDITSEL, CB_LIMITTEXT, CB_GETLIMITTEXT, CB_SETCURSEL (when the control is also CBS_SIMPLE with no edit), and raw WM_SETTEXT.
  2. Check the combo box style. Right-click the control in the resource editor and look at Properties. Or, at runtime, call:
    LONG style = GetWindowLong(hCombo, GWL_STYLE);
    if ((style & 0x0003L) == CBS_DROPDOWNLIST) {
        // no edit control — bail out
    }
    The low two bits of the style tell you the combo type. 0x0003 is CBS_DROPDOWNLIST.
  3. 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.
  4. Or change the style. If the design actually wants a text field, change the style to CBS_DROPDOWN in the .rc file. Only do this if the product owner agrees — it changes behavior on screen.
  5. 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

StyleValueHas edit?Safe messages
CBS_SIMPLE0x0001YesAll CB_*
CBS_DROPDOWN0x0002YesAll CB_*
CBS_DROPDOWNLIST0x0003NoSelection 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.

Related Errors in Windows Errors
0XC00D32CA NS_E_PROPERTY_NOT_FOUND (0XC00D32CA): Fixed in 5 Minutes 0X000002E6 Oplock Break In Progress (0x000002E6) — What Triggers It 0XC0000006 STATUS_IN_PAGE_ERROR (0XC0000006) Fix Guide 0X801F000E ERROR_FLT_CBDQ_DISABLED (0x801F000E) Fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.