Files
Work/statbar/SCRAPS.TXT
2024-08-07 09:16:27 -04:00

128 lines
5.2 KiB
Plaintext

#if 0
void StatusBar::paintBarBitmap(void)
{
RECT tempRectOne;
RECT tempRectTwo;
RECT clientRect;
HFONT hOldFont;
HBRUSH hTempBrush;
PureDevice windowDevice;
WORD capLockLeft;
WORD numLockLeft;
String tempString;
windowDevice=mDisplayWindow;
::GetClientRect(mDisplayWindow,(RECT FAR *)&clientRect);
clientRect.top=clientRect.bottom-statusBarHeight();
capLockLeft=clientRect.left+systemBorderDeltaTimesNine()+statusInfoWidth();
numLockLeft=capLockLeft+systemBorderDeltaTimesNine()+stateInfoWidth();
hTempBrush=::CreateSolidBrush(::GetSysColor(COLOR_BTNFACE));
tempRectOne=clientRect;
tempRectOne.bottom=tempRectOne.top+systemBorderDeltaTimesThree();
tempRectOne.top+=systemBorderDeltaTimesTwo();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
tempRectOne=clientRect;
tempRectOne.top=tempRectOne.bottom-systemBorderDeltaTimesTwo();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
tempRectOne=clientRect;
tempRectOne.right=systemBorderDeltaTimesEight();
tempRectOne.top+=systemBorderDeltaTimesTwo();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
::DeleteObject(hTempBrush);
hTempBrush=::CreateSolidBrush(::GetSysColor(COLOR_BTNSHADOW));
tempRectOne=clientRect;
tempRectOne.top=clientRect.top+systemBorderDeltaTimesThree();
tempRectOne.bottom=tempRectOne.top+systemBorderDelta();
tempRectOne.left=systemBorderDeltaTimesEight();
tempRectOne.right=tempRectOne.left+statusInfoWidth();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
tempRectOne=clientRect;
tempRectOne.top+=systemBorderDeltaTimesThree();
tempRectOne.bottom-=systemBorderDeltaTimesTwo();
tempRectOne.left=systemBorderDeltaTimesEight();
tempRectOne.right=tempRectOne.left+systemBorderDelta();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
::DeleteObject(hTempBrush);
if(WIN30==windowsVersion()){hTempBrush=(HBRUSH)::GetStockObject(WHITE_BRUSH);::MessageBeep(0);}
else hTempBrush=::CreateSolidBrush(::GetSysColor(COLOR_BTNHIGHLIGHT));
tempRectOne=clientRect;
tempRectOne.top=clientRect.bottom-systemBorderDeltaTimesThree();
tempRectOne.bottom=tempRectOne.top+systemBorderDelta();
tempRectOne.left=systemBorderDeltaTimesEight();
tempRectOne.right=tempRectOne.left+statusInfoWidth();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
tempRectOne=clientRect;
tempRectOne.top+=systemBorderDeltaTimesThree();
tempRectOne.bottom-=systemBorderDeltaTimesTwo();
tempRectOne.left=capLockLeft-systemBorderDelta();
tempRectOne.right=tempRectOne.left+systemBorderDelta();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
tempRectOne=clientRect;
tempRectOne.top+=systemBorderDelta();
tempRectOne.bottom=tempRectOne.top+systemBorderDelta();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
::DeleteObject(hTempBrush);
hTempBrush=::CreateSolidBrush(::GetSysColor(COLOR_WINDOWTEXT));
tempRectOne=clientRect;
tempRectOne.bottom=tempRectOne.top;
tempRectOne.bottom+=systemBorderDelta();
::FillRect((HDC)windowDevice,(RECT FAR*)&tempRectOne,hTempBrush);
::DeleteObject(hTempBrush);
hOldFont=(HFONT)::SelectObject((HDC)windowDevice,statusFont());
::SetTextColor((HDC)windowDevice,::GetSysColor(COLOR_BTNTEXT));
::SetBkColor((HDC)windowDevice,::GetSysColor(COLOR_BTNFACE));
tempRectOne.top=clientRect.top+(systemBorderDelta()*4);
tempRectOne.bottom=clientRect.bottom-systemBorderDeltaTimesThree();
tempRectOne.left=systemBorderDeltaTimesNine();
tempRectOne.right=tempRectOne.left+statusInfoWidth()-systemBorderDelta();
tempRectTwo=tempRectOne;
::ExtTextOut((HDC)windowDevice,tempRectOne.left+systemBorderDeltaTimesTwo(),tempRectOne.top,
ETO_OPAQUE|ETO_CLIPPED,&tempRectTwo,(LPSTR)mLastDisplayString,mLastDisplayString.length(),0);
::SelectObject(windowDevice,hOldFont);
// Rect bmRect(capLockLeft,clientRect.top+systemBorderDeltaTimesThree(),systemBorderDeltaTimesEight(),clientRect.bottom-systemBorderDeltaTimesTwo());
Rect bmRect(capLockLeft,clientRect.top+systemBorderDeltaTimesThree(),numLockLeft+systemBorderDeltaTimesNine(),clientRect.bottom-systemBorderDeltaTimesTwo());
hTempBrush=::CreateSolidBrush(RGB(255,0,0));
::FillRect((HDC)windowDevice,(RECT FAR*)&bmRect,hTempBrush);
// PureDevice memDevice(windowDevice);
// memDevice.select((GDIObj)mPureBitmap);
// windowDevice.stretchBlt(bmRect,memDevice,Rect(0,0,mPureBitmap.width(),mPureBitmap.height()));
}
#endif
bmRect.right(bmRect.right()-bmRect.left());
bmRect.bottom(bmRect.bottom()-bmRect.top());
// PureDevice memDevice(windowDevice);
// memDevice.select((GDIObj)mPureBitmap);
// windowDevice.bitBlt(bmRect,memDevice,Point(0,0));
// windowDevice.stretchBlt(bmRect,memDevice,Rect(0,0,mPureBitmap.width(),mPureBitmap.height()));
// Rect paintRect(numLockLeft+systemBorderDeltaTimesNine()+stateInfoWidth()+1,clientRect.top+systemBorderDeltaTimesThree(),clientRect.right-systemBorderDeltaTimesNine(),clientRect.bottom-systemBorderDeltaTimesTwo());
// paintRect.right(paintRect.right()-paintRect.left());
// paintRect.bottom(paintRect.bottom()-paintRect.top());
Rect paintRect;
getPostPaintRect(paintRect);
postPaint(windowDevice,paintRect);