Yes, this is both possible and relatively easy. Whether or not I used GDI or GDI+ would depend on whether or not I wanted to support transparency/gradients - your image appears to show shadows generated by semi-opaque black lines, so gdi+ would be needed to duplicate it exactly.
Here's a little something to get you started. Its quite simple, just a series of circles, lines and arcs with a touch of text.
HBITMAP zCreateDibSection(HDC hdc, int width, int height, int bitCount)
{
BITMAPINFO bi;
ZeroMemory(&bi, sizeof(bi));
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
bi.bmiHeader.biWidth = width;
bi.bmiHeader.biHeight = height;
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = bitCount;
bi.bmiHeader.biCompression = BI_RGB;
return CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, 0,0,0);
}
HBITMAP genTexture(wchar_t *text1, wchar_t *text2, COLORREF col1, COLORREF col2, int fillPercent1, int fillPercent2)
{
HPEN origPen, thinBlack, thickBlack;
HBRUSH origBrush, bkgBrush, col1Brush, col2Brush;
HDC memDC;
HBITMAP origBmp, result;
RECT imgRect;
RECT outerRc, innerRc;
HFONT origFont, font;
memDC = CreateCompatibleDC(0);
origBmp = (HBITMAP) GetCurrentObject(memDC, OBJ_BITMAP);
origPen = (HPEN) GetCurrentObject(memDC, OBJ_PEN);
origBrush = (HBRUSH) GetCurrentObject(memDC, OBJ_BRUSH);
origFont = (HFONT) GetCurrentObject(memDC, OBJ_FONT);
result = zCreateDibSection(memDC, 256, 256, 24);
SelectObject(memDC, result);
SetRect(&innerRc, 256/4,256/4,256*3/4-1,256*3/4-1);
SetRect(&outerRc, 0,0,255,255);
bkgBrush = CreateSolidBrush( RGB(204,204,204) );
FillRect(memDC, &outerRc, bkgBrush);
thickBlack = CreatePen(PS_SOLID, 2, 0);
SelectObject(memDC, thickBlack);
SelectObject(memDC, GetStockObject(WHITE_BRUSH));
Ellipse(memDC, outerRc.left,outerRc.top,outerRc.right,outerRc.bottom);
BeginPath(memDC);
col2Brush = CreateSolidBrush(col2);
SelectObject(memDC, col2Brush);
MoveToEx(memDC,128,128,NULL);
AngleArc(memDC, 127,127,126,-90.0,(fillPercent2 / 100.0)*180.0);
LineTo(memDC,128,128);
EndPath(memDC);
FillPath(memDC);
BeginPath(memDC);
col1Brush = CreateSolidBrush(col1);
SelectObject(memDC, col1Brush);
MoveToEx(memDC,128,128,NULL);
AngleArc(memDC, 127,127,126,-90.0,-(fillPercent1 / 100.0)*180.0);
LineTo(memDC,128,128);
EndPath(memDC);
FillPath(memDC);
SelectObject(memDC, GetStockObject(WHITE_BRUSH));
Ellipse(memDC, 64,64,(256*0.75)-1,(256*0.75)-1);
MoveToEx(memDC, 66, 128, NULL);
LineTo(memDC, 190,128);
RECT textRectTop, textRectBottom;
SetRect(&textRectTop, 64,64,192,128);
SetRect(&textRectBottom, 64,128,192,192);
font = CreateFont(-24, 0, 0, 0, 0, FALSE, FALSE, FALSE, 1, 0, 0, 0, 0, "Verdana"); SelectObject(memDC, font);
DrawTextW(memDC, text1, -1, &textRectTop, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
DrawTextW(memDC, text2, -1, &textRectBottom, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
SelectObject(memDC, origBrush);
SelectObject(memDC, origPen);
SelectObject(memDC, origBmp);
SelectObject(memDC, origFont);
DeleteObject(col1Brush);
DeleteObject(col2Brush);
DeleteObject(font);
DeleteObject(thickBlack);
DeleteObject(bkgBrush);
DeleteDC(memDC);
return result;
}
void onPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
HBITMAP img = genTexture(L"Text 1",L"Text 2", RGB(255,192,0),RGB(192,80,77), 50,66);
HDC hdc;
PAINTSTRUCT ps;
HBITMAP old;
HDC memDC;
memDC = CreateCompatibleDC(0);
old = (HBITMAP)SelectObject(memDC, img);
hdc = BeginPaint(hwnd, &ps);
BitBlt(hdc, 0,0, 255,255, memDC, 0,0, SRCCOPY);
EndPaint(hwnd, &ps);
SelectObject(memDC, old);
DeleteObject(img);
}
BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
{
}
return TRUE;
case WM_CLOSE:
{
EndDialog(hwndDlg, 0);
}
return TRUE;
case WM_PAINT:
onPaint(hwndDlg, wParam, lParam);
return 0;
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
}
}
return TRUE;
}
return FALSE;
}