Click here to Skip to main content
15,917,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Network Detecting Pin
RomTibi14-Dec-07 6:10
RomTibi14-Dec-07 6:10 
GeneralRe: Network Detecting Pin
KarstenK14-Dec-07 4:14
mveKarstenK14-Dec-07 4:14 
GeneralRe: Network Detecting Pin
RomTibi14-Dec-07 6:19
RomTibi14-Dec-07 6:19 
General[ DIRECTSOUND C++] Playing songs on differents channels Pin
totoleproduvelo13-Dec-07 4:50
totoleproduvelo13-Dec-07 4:50 
GeneralRe: [ DIRECTSOUND C++] Playing songs on differents channels Pin
Matthew Faithfull13-Dec-07 5:11
Matthew Faithfull13-Dec-07 5:11 
Generaldialoge data transfer Pin
dobhal.mca13-Dec-07 3:12
dobhal.mca13-Dec-07 3:12 
GeneralRe: dialoge data transfer Pin
toxcct13-Dec-07 3:16
toxcct13-Dec-07 3:16 
GeneralRe: dialoge data transfer Pin
Chandrasekharan P13-Dec-07 18:35
Chandrasekharan P13-Dec-07 18:35 
Generalcompile CSerialPort from command line Pin
Ein.Stein13-Dec-07 1:01
Ein.Stein13-Dec-07 1:01 
GeneralRe: compile CSerialPort from command line Pin
KarstenK13-Dec-07 2:40
mveKarstenK13-Dec-07 2:40 
GeneralRe: compile CSerialPort from command line Pin
Ein.Stein13-Dec-07 4:19
Ein.Stein13-Dec-07 4:19 
GeneralRe: compile CSerialPort from command line Pin
Ein.Stein13-Dec-07 4:52
Ein.Stein13-Dec-07 4:52 
GeneralI am new to Visual C++ :: HELP!!! [modified] Pin
Anthony Appleyard13-Dec-07 0:49
Anthony Appleyard13-Dec-07 0:49 
GeneralRe: I am new to Visual C++ :: HELP!!! Pin
Matthew Faithfull13-Dec-07 1:21
Matthew Faithfull13-Dec-07 1:21 
GeneralRe: I am new to Visual C++ :: HELP!!! Pin
KarstenK13-Dec-07 2:37
mveKarstenK13-Dec-07 2:37 
GeneralRe: I am new to Visual C++ :: HELP!!! Pin
CPallini13-Dec-07 4:07
mveCPallini13-Dec-07 4:07 
GeneralRe: I am new to Visual C++ :: HELP!!! Pin
Nathan Holt at EMOM13-Dec-07 8:00
Nathan Holt at EMOM13-Dec-07 8:00 
GeneralWM_DRAWITEM does not process for tab control Pin
yaminisridaran13-Dec-07 0:46
yaminisridaran13-Dec-07 0:46 
QuestionRe: WM_DRAWITEM does not process for tab control Pin
Nelek13-Dec-07 1:45
protectorNelek13-Dec-07 1:45 
GeneralRe: WM_DRAWITEM does not process for tab control Pin
yaminisridaran13-Dec-07 17:16
yaminisridaran13-Dec-07 17:16 
GeneralRe: WM_DRAWITEM does not process for tab control Pin
Mark Salsbery13-Dec-07 6:26
Mark Salsbery13-Dec-07 6:26 
GeneralRe: WM_DRAWITEM does not process for tab control Pin
yaminisridaran13-Dec-07 17:19
yaminisridaran13-Dec-07 17:19 
GeneralRe: WM_DRAWITEM does not process for tab control Pin
Mark Salsbery13-Dec-07 19:05
Mark Salsbery13-Dec-07 19:05 
The following code works for me...

Note you have to have a tab control subclassed by an object of your
CTabCtrl-derived class, otherwise DrawItem() will never get called...
class CMyTabCtrl : public CTabCtrl
{
public:
    CMyTabCtrl() : CTabCtrl()  {}

    virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
};


void CMyTabCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
    CDC dc;
    dc.Attach(lpDrawItemStruct->hDC);

    // Note:  My test tab control has two tabs inserted :)

    if (0 == lpDrawItemStruct->itemID)
        dc.DrawText(_T("Tab 1"), &lpDrawItemStruct->rcItem, DT_CENTER);
    else
        dc.DrawText(_T("Tab 2"), &lpDrawItemStruct->rcItem, DT_CENTER);

    dc.Detach();
}

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: WM_DRAWITEM does not process for tab control Pin
yaminisridaran13-Dec-07 19:26
yaminisridaran13-Dec-07 19:26 
GeneralRe: WM_DRAWITEM does not process for tab control Pin
Mark Salsbery13-Dec-07 19:32
Mark Salsbery13-Dec-07 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.