Urgent:: Problem in Changing the style of ComboBox
-
Hello everybody, In a program i need to change the style of a ComboBox (Using Win32 SDK in ATL) from CBS_DROPDOWN to CBS_DROPDOWNLIST (either way). I tried using SetWindowLong() and ModifyStyle(), but failed in both the ways and failed to get what i want. If anybody knows plz help me. Even i tried with subclassing. Thanx in advance.:confused:
-
Hello everybody, In a program i need to change the style of a ComboBox (Using Win32 SDK in ATL) from CBS_DROPDOWN to CBS_DROPDOWNLIST (either way). I tried using SetWindowLong() and ModifyStyle(), but failed in both the ways and failed to get what i want. If anybody knows plz help me. Even i tried with subclassing. Thanx in advance.:confused:
I think you'll have to re-create the combo - you can't change these styles at runtime. Save the control ID and position, then call DestroyWindow and Create with appropriate styles. Tomasz Sowinski -- http://www.shooltz.com