I'm having nothing but bad luck from Windows Messages. Specifically, I am trying to add items to a combo box. Here is the line I am using to add the item:
long err = SendMessage(hWnd, CB_ADDSTRING, MAKEWPARAM(0, IDC_COMBO), (LPARAM)Item);
I immediatly call GetLastError after this line, and get a value of 0x58d (Control ID not found.) I have specified the Control ID in the Hiword of the wParam, so I don't understand why I get this error. And yes, I did specify the same control ID when creating the window. I have also tried the line like this:
long err = SendMessage(hWnd, CB_ADDSTRING, 0, (LPARAM)Item);
and get the same result.