PDA

Click to See Complete Forum and Search --> : Adding tabs to my tab control


SteveCRM
Nov 5th, 2001, 07:41 PM
doing this doesn't work.....niether work :(

SendMessage(Tab, TCM_INSERTITEM, 1, (LPARAM) "Test");
SendMessage(Tab, TCM_SETITEM, 1, (LPARAM) "TEST");

what is the correct way to add tabs (my control is called Tab) :confused:

abdul
Nov 5th, 2001, 09:02 PM
Is "Tab" declared as "HWND" and is it a handle to the tab when you ceate the tab control like

Tab = CreateWindow(...);

jim mcnamara
Nov 6th, 2001, 05:27 AM
Abdul is saying that the variable tab has to be

HWND tab;

and actually be the handle to the tab control.

CornedBee
Nov 6th, 2001, 08:40 AM
if it's not, but rather a #define, you need to call GetDlgItem(parentHWnd, Tab); to get the hwnd.

SteveCRM
Nov 6th, 2001, 03:00 PM
I've already decalred it......thats not my problem

I have the control on my form...I was able to add some tabs, now how do I put text into the tabs :confused:

CornedBee
Nov 7th, 2001, 04:30 AM
the LPARAM of both TCM_INSERTITEM and TCM_SETITEM must be a pointer to a TCITEM struct. There is a member to set the item text.