mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Code cleanup.
This commit is contained in:
@ -235,82 +235,6 @@ void RunCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, bool asAdmin)
|
||||
}
|
||||
}
|
||||
|
||||
//void TransparentBltLS(HDC hdcDst, int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, int nXSrc, int nYSrc, COLORREF colorTransparent)
|
||||
//{
|
||||
// // Use the lsapi.dll version of the method if possible
|
||||
// if (fpTransparentBltLS)
|
||||
// {
|
||||
// fpTransparentBltLS(hdcDst, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, colorTransparent);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// HDC hdcMem, hdcMask, hdcDstCpy;
|
||||
// HBITMAP hbmMask, hbmMem, hbmDstCpy;
|
||||
// HBITMAP hbmOldMem, hbmOldMask, hbmOldDstCpy;
|
||||
//
|
||||
// // create a destination compatble dc containing
|
||||
// // a copy of the destination dc
|
||||
// hdcDstCpy = CreateCompatibleDC(hdcDst);
|
||||
// hbmDstCpy = CreateCompatibleBitmap(hdcDst, nWidth, nHeight);
|
||||
// hbmOldDstCpy = (HBITMAP)SelectObject(hdcDstCpy, hbmDstCpy);
|
||||
//
|
||||
// BitBlt(hdcDstCpy, 0, 0, nWidth, nHeight, hdcDst, nXDest, nYDest, SRCCOPY);
|
||||
//
|
||||
// // create a destination compatble dc containing
|
||||
// // a copy of the source dc
|
||||
// hdcMem = CreateCompatibleDC(hdcDst);
|
||||
// hbmMem = CreateCompatibleBitmap(hdcDst, nWidth, nHeight);
|
||||
// hbmOldMem = (HBITMAP)SelectObject(hdcMem, hbmMem);
|
||||
//
|
||||
// BitBlt(hdcMem, 0, 0, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, SRCCOPY);
|
||||
//
|
||||
// // the transparent color should be selected as
|
||||
// // bkcolor into the memory dc
|
||||
// SetBkColor(hdcMem, colorTransparent);
|
||||
//
|
||||
// // Create monochrome bitmap for the mask
|
||||
// hdcMask = CreateCompatibleDC(hdcDst);
|
||||
// hbmMask = CreateBitmap(nWidth, nHeight, 1, 1, NULL);
|
||||
// hbmOldMask = (HBITMAP)SelectObject(hdcMask, hbmMask);
|
||||
//
|
||||
// // Create the mask from the memory dc
|
||||
// BitBlt(hdcMask, 0, 0, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);
|
||||
//
|
||||
// // Set the background in hdcMem to black. Using SRCPAINT with black
|
||||
// // and any other color results in the other color, thus making
|
||||
// // black the transparent color
|
||||
// SetBkColor(hdcMem, RGB(0, 0, 0));
|
||||
// SetTextColor(hdcMem, RGB(255, 255, 255));
|
||||
//
|
||||
// BitBlt(hdcMem, 0, 0, nWidth, nHeight, hdcMask, 0, 0, SRCAND);
|
||||
//
|
||||
// // Set the foreground to black. See comment above.
|
||||
// SetBkColor(hdcDst, RGB(255, 255, 255));
|
||||
// SetTextColor(hdcDst, RGB(0, 0, 0));
|
||||
//
|
||||
// BitBlt(hdcDstCpy, 0, 0, nWidth, nHeight, hdcMask, 0, 0, SRCAND);
|
||||
//
|
||||
// // Combine the foreground with the background
|
||||
// BitBlt(hdcDstCpy, 0, 0, nWidth, nHeight, hdcMem, 0, 0, SRCPAINT);
|
||||
//
|
||||
// // now we have created the image we want to blt
|
||||
// // in the destination copy dc
|
||||
// BitBlt(hdcDst, nXDest, nYDest, nWidth, nHeight, hdcDstCpy, 0, 0, SRCCOPY);
|
||||
//
|
||||
// SelectObject(hdcMask, hbmOldMask);
|
||||
// DeleteObject(hbmMask);
|
||||
// DeleteDC(hdcMask);
|
||||
//
|
||||
// SelectObject(hdcMem, hbmOldMem);
|
||||
// DeleteObject(hbmMem);
|
||||
// DeleteDC(hdcMem);
|
||||
//
|
||||
// SelectObject(hdcDstCpy, hbmOldDstCpy);
|
||||
// DeleteObject(hbmDstCpy);
|
||||
// DeleteDC(hdcDstCpy);
|
||||
// }
|
||||
//}
|
||||
|
||||
std::string ConvertToAscii(LPCTSTR str)
|
||||
{
|
||||
std::string szAscii;
|
||||
|
Reference in New Issue
Block a user