1

I am currently trying to set a CComboBox* with the ID that is assigned for existing combo box(IDC_COMBO).

I've tried CWnd's GetDlgItem() and ID assignment, but I could not figure it out yet.

I know this isn't exactly the expected details, but this is all I can give you.

Yoon5oo
  • 496
  • 5
  • 11
CodeMonkey
  • 1,136
  • 16
  • 31
  • [`CWnd::SetDlgCtrlID`](http://msdn.microsoft.com/en-us/library/a22k62xy.aspx) - if you are to change identifier of actual window. – Roman R. Oct 14 '14 at 21:29

1 Answers1

3

Is this what you want?

CComboBox* pCombo = reinterpret_cast<CComboBox*>(GetDlgItem (IDC_COMBO));
rrirower
  • 4,338
  • 4
  • 27
  • 45
  • YES! Thank you very much! I was banging my head against the wall trying to figure this out, and here you have the answer! Thank you again. Brilliant. – CodeMonkey Oct 15 '14 at 14:25