- HPEN oldp;
- HBRUSH oldb ;
-
- HPEN penBorder;
- HPEN penLight;
- HPEN penShadow;
- HBRUSH brushFace;
- COLORREF ms_color;
-
- ms_color = GetSysColor(COLOR_WINDOWFRAME) ;
- penBorder = CreatePen(PS_SOLID,0,ms_color) ;
-
- ms_color = GetSysColor(COLOR_BTNSHADOW) ;
- penShadow = CreatePen(PS_SOLID,0,ms_color) ;
-
- ms_color = GetSysColor(COLOR_BTNHIGHLIGHT) ;
- penLight = CreatePen(PS_SOLID,0,ms_color) ;
-
- ms_color = GetSysColor(COLOR_BTNFACE) ;
- brushFace = CreateSolidBrush(ms_color) ;
-
- oldp = (HPEN) SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ;
- oldb = (HBRUSH) SelectObject( (HDC) dc, brushFace ) ;
- Rectangle( (HDC) dc, left, top, right, bottom ) ;
- SelectObject( (HDC) dc, penBorder) ;
- MoveToEx((HDC) dc,left+1,top,NULL);LineTo((HDC) dc,right-1,top);
- MoveToEx((HDC) dc,left,top+1,NULL);LineTo((HDC) dc,left,bottom-1);
- MoveToEx((HDC) dc,left+1,bottom-1,NULL);LineTo((HDC) dc,right-1,bottom-1);
- MoveToEx((HDC) dc,right-1,top+1,NULL);LineTo((HDC) dc,right-1,bottom-1);
-
- SelectObject( (HDC) dc, penShadow) ;
- if (sel)