怎么设置tab控件的头,为icon图片加上cstring字符串?

解决方案 »

  1.   

    在都文件中:
    CImageList m_TabImageList;
    HICON hIcon_Curve;
    HICON hIcon_Identify;
    HICON hIcon_Simulator;初始化:
    m_TabImageList.Create(32, 32, ILC_COLORDDB, 3, 3); hIcon_Curve = AfxGetApp()->LoadIcon(IDI_ICON1);
    m_TabImageList.Add(hIcon_Curve);
    hIcon_Identify = AfxGetApp()->LoadIcon(IDI_ICON2);
    m_TabImageList.Add(hIcon_Identify);
    hIcon_Simulator = AfxGetApp()->LoadIcon(IDI_ICON3);
    m_TabImageList.Add(hIcon_Simulator); m_tabControl.SetImageList(&m_TabImageList); m_tabControl.InsertItem(0, "one", 0);
    m_tabControl.InsertItem(1, "two", 1);
    m_tabControl.InsertItem(2, "thr", 2);