Unable to get combobox data from java applet in C++

  applet, c++, java

Using win32 c++ EnumChildWindow API to get a handle of the combo box in Applet. I can get the handle of the Combobox and use SendMessage() with a message of CB_GETLBTEXT trying to get the data from Combobox but it gives different random characters every time.

int idx = SendMessage(hWnd, CB_GETCURSEL, 0, 0);
WCHAR* data = new WCHAR[MAX];
int return = SendMessage(hWnd, CB_GETLBTEXT, wParam, (LPARAM)data);

output is 䉀ᙛ. instead of Red.

Source: Windows Questions C++

LEAVE A COMMENT