Window Controls

Started by
3 comments, last by xstreme2000 24 years, 1 month ago
I would like to know how to put control on to windows like radio buttons, check boxes. The only ones I can get to work are BUTTON and COMBOBOX can someone list the other class which can be used...I tried RADIO, CHECKBOX, CONTROL, SPIN but they didn''t work. eg CreateWindow("BUTTON", "Button1", ... );
Advertisement
You got visual studio? Then it should be in the MSDN. But then, why won''t you use the GUI editor? It''s no shame, imho and works pretty good.

Jaap Suter
____________________________Mmmm, I''ll have to think of one.
I do use the Editor but now I need to use a combo box and the CB_ADDSTRING message. To do this I need hComboWnd to post the messages to if you have an easier way to do this Pleese tell me can you do something like this:
SendMessage((HWND)IDC_COMBOBOX1, CB_ADDSTRING, 0, &string);
???????????????????????????????????????????????????????????

//--- Created by Tom Oram ---
// tom.oram@vodafone.net
I have just found out how to do it so if anyone is interested then here it is.

HWND hCombo = GetDlgItem(hDlg, IDC_COMBOBOX1);
SendMessage(hCombo, CB_ADD ... );

xstreme2000, u kind of solve part of my problem too, thanx!

Maybe they should change the name, GetDlgItem() to GetCtrlHandle()? Doesn''t it mean better?
"after many years of singularity, i'm still searching on the event horizon"

This topic is closed to new replies.

Advertisement