Advertisement Jump to content
Sign in to follow this  

Combo Box in OpenGL using Visual C++

This topic is 3819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am developing a Visual C++ application that uses OpenGL. I need to add a combo box with its regular properties, and associate a variable (say, frame_width) to it. While I could initialize and display the combo box using the following code: // Declaration HWND hWndCombo[3]; LPCTSTR lpComboBoxName[3] = { "Length", "Width", "Height" }; UINT idComboBoxID[3] = { IDC_COMBO1, IDC_COMBO2, IDC_COMBO3 }; // Display Combo Boxes // hWndCombo[1]: Width of nest { char slicemsg[100]; if(cw_GlobalVar_ptr_CurrentCT != NULL){ sprintf_s(slicemsg, 100, "Width: %d\n", frame_width); } else sprintf_s(slicemsg, 100, "Width: N/A"); SetWindowText(hWndCombo[1], slicemsg); } I cannot add any new value to the list (to be shown once the combo box is clicked by the user, as usual). Also, once it can be shown, the variable frame_width should be set to the new value selected from the list by the user (as usual). Any suggestion how to proceed? Or any link to some tutorial showing how to do this? Thanks in advance.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!