I'm writing my own shell replacement for Windows 7 and 8 (32 & 64bit). This is my hobby and I do this program for personal use only.

Currently I have done (in 90% - small issues left) reverse-engineering of the system tray. Now i'm trying to create the taskbar. Unfortunately I don't know how to create objects and how to set relationships between them. It's mostly about message management and the drawing.

I have base class called CWindow which provide basic functionality of window-controls and windows with title bar. My taskbar class called CTaskbarWnd is a class derived from CWindow. CTask is a base class having information about a task.

At the moment I decided to create a separate class, which will be used to draw the buttons. Object of this class through a pointer will access to information about the task. CTaskbarWnd will use this class to draw specific button.

I mean something like that:

Code:
CTask *pBtnTask;
WM_PAINT:
   hDC = BeginPaint(hWindow, &ps);
   iter = taskList.begin();
   while (iter < taskList.end())
   {
       pBtnTask = (*iter);
       pTaskBtnPainter->PaintBtn(hDC, &pBtnTask);
       iter++;
   }
   EndPaint(hWindow, &ps);
break;
Or maybe it would be better if each of these buttons will be a window, which itself will be painted?

I am asking for help because I want to do it in right way, I mean OOP.

By the way - is there someone who has experience in creating their own shell and would be willing to help?