亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bttncur.c

?? 英文版的 想要的話可以下載了 為大家服務
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 * BTTNCUR.C
 * Buttons & Cursors
 *
 * Public functions to generate different states of toolbar buttons
 * from a single bitmap.  States are normal, pressed, checked, and
 * disabled.
 *
 * Copyright (c)1992-1995 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#include "inoledll.h"

//Cache GDI objects to speed drawing.
HDC     g_hDCGlyphs    = NULL;
HDC     g_hDCMono      = NULL;
HBRUSH  g_hBrushDither = NULL;

//Standard images to use in case caller doesn't provide them
HBITMAP g_rghBmpStandardImages[3];

//Standard button colors.
const COLORREF g_crStandard[4]={ RGB(0, 0, 0)      //STDCOLOR_BLACK
                   , RGB(128, 128, 128)            //STDCOLOR_DKGRAY
                   , RGB(192, 192, 192)            //STDCOLOR_LTGRAY
                   , RGB(255, 255, 255)};          //STDCOLOR_WHITE


COLORREF g_crSys[5];



/*
 * Mapping from image identifier to button type (command/attribute).
 * Version 1.00 of this DLL has no attribute images defined, so
 * the code will only support three states for each command
 * button.  Any state is, however, valid for an application
 * defined image.
 */

UINT mpButtonType[TOOLIMAGE_MAX-TOOLIMAGE_MIN+1]=
        {
        BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND,
        BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND,
        BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND, BUTTONTYPE_COMMAND
        };


/*
 * UIToolConfigureForDisplay
 * Public API
 *
 * Purpose:
 *  Initializes the library to scale button images for the display
 *  type.  Without calling this function the library defaults to 96
 *  DPI (VGA).  By calling this function an application acknowledges
 *  that it must use the data returned from this function to
 *  configure itself for the display.
 *
 * Parameters:
 *  lpDD            LPTOOLDISPLAYDATA to fill with the display-
 *                  sensitive size values.
 *
 * Return Value:
 *  BOOL            TRUE if the sizes were obtained, FALSE otherwise.
 */

BOOL WINAPI UIToolConfigureForDisplay(LPTOOLDISPLAYDATA lpDD)
    {
    int         cy;
    HDC         hDC;


    if (NULL==lpDD || IsBadWritePtr(lpDD, sizeof(TOOLDISPLAYDATA)))
        return FALSE;

    /*
     * Determine the aspect ratio of the display we're currently
     * running on and calculate the necessary information.
     *
     * By retrieving the logical Y extent of the display driver, you
     * only have limited possibilities:
     *      LOGPIXELSY      Display
     *      ----------------------------------------
     *         48             CGA    (unsupported)
     *         72             EGA
     *         96             VGA
     *        120             8514/a (i.e. HiRes VGA)
     */

    hDC=GetDC(NULL);

    if (NULL==hDC)
        return FALSE;

    cy=GetDeviceCaps(hDC, LOGPIXELSY);
    ReleaseDC(NULL, hDC);

    /*
     * Instead of single comparisons, check ranges instead, so in
     * case we get something funky, we'll act reasonable.
     */
    if (72 >=cy)
        {
        lpDD->uDPI     =72;
        lpDD->cyBar    =CYBUTTONBAR72;
        lpDD->cxButton =TOOLBUTTON_STD72WIDTH;
        lpDD->cyButton =TOOLBUTTON_STD72HEIGHT;
        lpDD->cxImage  =TOOLBUTTON_STD72IMAGEWIDTH;
        lpDD->cyImage  =TOOLBUTTON_STD72IMAGEHEIGHT;
        lpDD->uIDImages=IDB_STANDARDIMAGES72;
        }
    else
        {
        if (72 < cy && 120 > cy)
            {
            lpDD->uDPI     =96;
            lpDD->cyBar    =CYBUTTONBAR96;
            lpDD->cxButton =TOOLBUTTON_STD96WIDTH;
            lpDD->cyButton =TOOLBUTTON_STD96HEIGHT;
            lpDD->cxImage  =TOOLBUTTON_STD96IMAGEWIDTH;
            lpDD->cyImage  =TOOLBUTTON_STD96IMAGEHEIGHT;
            lpDD->uIDImages=IDB_STANDARDIMAGES96;
            }
        else
            {
            lpDD->uDPI     =120;
            lpDD->cyBar    =CYBUTTONBAR120;
            lpDD->cxButton =TOOLBUTTON_STD120WIDTH;
            lpDD->cyButton =TOOLBUTTON_STD120HEIGHT;
            lpDD->cxImage  =TOOLBUTTON_STD120IMAGEWIDTH;
            lpDD->cyImage  =TOOLBUTTON_STD120IMAGEHEIGHT;
            lpDD->uIDImages=IDB_STANDARDIMAGES120;
            }
        }

    return TRUE;
    }








/*
 * ToolButtonInit
 * Internal
 *
 * Purpose:
 *  Initializes GDI objects for drawing images through
 *  UIToolButtonDraw. If the function fails, the function has
 *  already performed proper cleanup.
 *
 * Parameters:
 *  hInst           HINSTANCE of the DLL
 *
 * Return Value:
 *  BOOL            TRUE if initialization succeeded.  FALSE
 *                  otherwise.
 */

BOOL ToolButtonInit(HINSTANCE hInst)
    {
    UINT        i;

    //DC for BitBltting the image (the glyph)
    g_hDCGlyphs=CreateCompatibleDC(NULL);

    //Create a monochrome DC and a brush for doing pattern dithering.
    g_hDCMono=CreateCompatibleDC(NULL);

    g_hBrushDither=HBrushDitherCreate(GetSysColor(COLOR_BTNFACE)
        , GetSysColor(COLOR_BTNHIGHLIGHT));

    for (i=0; i < 3; i++)
        {
        g_rghBmpStandardImages[i]=LoadBitmap(hInst
            , MAKEINTRESOURCE(IDB_STANDARDIMAGESMIN+i));
        }

    if (NULL==g_hDCGlyphs || NULL==g_hDCMono
        || NULL==g_hBrushDither || NULL==g_rghBmpStandardImages[0])
        {
        //On failure, cleanup whatever might have been allocated.
        ToolButtonFree();
        return FALSE;
        }

    return TRUE;
    }





/*
 * ToolButtonFree
 * Internal
 *
 * Purpose:
 *  Free all GDI allocations made during initialization.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  None
 */

void ToolButtonFree(void)
    {
    UINT        i;

    if (NULL!=g_hDCMono)
        DeleteDC(g_hDCMono);

    g_hDCMono=NULL;

    if (NULL!=g_hDCGlyphs)
        DeleteDC(g_hDCGlyphs);

    g_hDCGlyphs=NULL;

    if (NULL!=g_hBrushDither)
        DeleteObject(g_hBrushDither);

    g_hBrushDither=NULL;

    for (i=0; i < 3; i++)
        {
        if (NULL!=g_rghBmpStandardImages[i])
            DeleteObject(g_rghBmpStandardImages[i]);

        g_rghBmpStandardImages[i]=NULL;
        }

    return;
    }





/*
 * HBrushDitherCreate
 * Internal
 *
 * Purpose:
 *  Creates and returns a handle to a pattern brush created from
 *  an 8*8 monochrome pattern bitmap.  We use the button face and
 *  highlight colors to indicate the resulting colors of a PatBlt
 *  using this brush.
 *
 * Parameters:
 *  rgbFace         COLORREF of the button face color.
 *  rgbHilight      COLORREF of the button highlight color.
 *
 * Return Value:
 *  HBITMAP         Handle to the dither bitmap.
 */

HBRUSH HBrushDitherCreate(COLORREF rgbFace, COLORREF rgbHilight)
    {
    struct  //BITMAPINFO with 16 colors
        {
        BITMAPINFOHEADER    bmiHeader;
        RGBQUAD             bmiColors[16];
        } bmi;

    HBRUSH          hBrush=NULL;
    DWORD           patGray[8];
    HDC             hDC;
    HBITMAP         hBmp;
    static COLORREF rgbFaceOld   =0xFFFFFFFF;  //Initially impossible
    static COLORREF rgbHilightOld=0xFFFFFFFF;  //Initially impossible

    /*
     * If the colors haven't changed from last time, just return the
     * existing brush.
     */
    if (rgbFace==rgbFaceOld && rgbHilight==rgbHilightOld)
        return g_hBrushDither;

    rgbFaceOld=rgbFace;
    rgbHilightOld=rgbHilight;

    /*
     * We're going to create an 8*8 brush for PatBlt using the
     * button face color and button highlight color.  We use this
     * brush to affect the pressed state and the disabled state.
     */
    bmi.bmiHeader.biSize         = sizeof(BITMAPINFOHEADER);
    bmi.bmiHeader.biWidth        = 8;
    bmi.bmiHeader.biHeight       = 8;
    bmi.bmiHeader.biPlanes       = 1;
    bmi.bmiHeader.biBitCount     = 1;
    bmi.bmiHeader.biCompression  = BI_RGB;
    bmi.bmiHeader.biSizeImage    = 0;
    bmi.bmiHeader.biXPelsPerMeter= 0;
    bmi.bmiHeader.biYPelsPerMeter= 0;
    bmi.bmiHeader.biClrUsed      = 0;
    bmi.bmiHeader.biClrImportant = 0;

    bmi.bmiColors[0].rgbBlue     = GetBValue(rgbFace);
    bmi.bmiColors[0].rgbGreen    = GetGValue(rgbFace);
    bmi.bmiColors[0].rgbRed      = GetRValue(rgbFace);
    bmi.bmiColors[0].rgbReserved = 0;

    bmi.bmiColors[1].rgbBlue     = GetBValue(rgbHilight);
    bmi.bmiColors[1].rgbGreen    = GetGValue(rgbHilight);
    bmi.bmiColors[1].rgbRed      = GetRValue(rgbHilight);
    bmi.bmiColors[1].rgbReserved = 0;

    //Create the byte array for CreateDIBitmap.
    patGray[6]=patGray[4]=patGray[2]=patGray[0]=0x5555AAAAL;
    patGray[7]=patGray[5]=patGray[3]=patGray[1]=0xAAAA5555L;

    //Create the bitmap
    hDC=GetDC(NULL);
    hBmp=CreateDIBitmap(hDC, &bmi.bmiHeader, CBM_INIT, patGray
                        , (LPBITMAPINFO)&bmi, DIB_RGB_COLORS);
    ReleaseDC(NULL, hDC);

    //Create the brush from the bitmap
    if (NULL!=hBmp)
        {
        hBrush=CreatePatternBrush(hBmp);
        DeleteObject(hBmp);
        }

    /*
     * If we could recreate a brush, clean up and make it the current
     * pattern.  Otherwise the best we can do it return the old one,
     * which will be colored wrong, but at least it works.
     */
    if (NULL!=hBrush)
        {
        if (NULL!=g_hBrushDither)
            DeleteObject(g_hBrushDither);

        g_hBrushDither=hBrush;
        }

    return g_hBrushDither;
    }





/*
 * UIToolButtonDraw
 * Public API
 *
 * Purpose:
 *  Draws the complete image of a toolbar-style button with a given
 *  image in the center and in a specific state.  The button is drawn
 *  on a specified hDC at a given location, so this function is
 *  useful on standard owner-draw buttons as well as on toolbar
 *  controls that have only one window but show images of multiple
 *  buttons.
 *
 * Parameters:
 *  hDC             HDC on which to draw.
 *  x, y            int coordinates at which to draw.
 *  dx, dy          int dimensions of the *button*, not the image.
 *  hBmp            HBITMAP from which to draw the image.
 *  bmx, bmy        int dimensions of each bitmap in hBmp.  If hBmp
 *                  is NULL then these are forced to the standard
 *                  sizes.
 *  iImage          int index to the image to draw in the button
 *  uStateIn        UINT containing the state index for the button
 *                  and the color control bits.
 *  pTDD            LPTOOLDISPLAYDATA containing display
 *                  configuration. Can be NULL if hBmp is non-NULL.
 *
 * Return Value:
 *  BOOL            TRUE if drawing succeeded, FALSE otherwise
 *                  meaning that hDC is NULL or hBmp is NULL and
 *                  iImage is not a valid index for a standard image.
 */

BOOL WINAPI UIToolButtonDraw(HDC hDC, int x, int y, int dx, int dy
    , HBITMAP hBmp, int bmx, int bmy, int iImage, UINT uStateIn
    , LPTOOLDISPLAYDATA pTDD)
    {
    UINT            uState=(UINT)LOBYTE((WORD)uStateIn);
    UINT            uColors=(UINT)HIBYTE((WORD)uStateIn
                        & PRESERVE_ALL);
    int             xOffsetGlyph, yOffsetGlyph;
    int             i, iSaveDC;
    HDC             hMemDC;
    HGDIOBJ         hObj;
    HBRUSH          hBR;
    HBITMAP         hBmpT;
    HBITMAP         hBmpMono;
    HBITMAP         hBmpMonoOrg;
    HBITMAP         hBmpSave=NULL;
    TOOLDISPLAYDATA tdd;

    if (NULL==hDC)
        return FALSE;

    if (NULL==pTDD)
        {
        pTDD=&tdd;
        UIToolConfigureForDisplay(pTDD);
        }

    /*
     * If we're given no image bitmap, then use the standard and
     * validate the image index.  We also enforce the standard
     * bitmap size and the size of the button (as requested by
     * User Interface designers).
     */
    if (NULL==hBmp && !(uState & BUTTONGROUP_BLANK))
        {
        i=pTDD->uIDImages-IDB_STANDARDIMAGESMIN;
        hBmp=g_rghBmpStandardImages[i];

        bmx=pTDD->cxImage;            //Force bitmap dimensions
        bmy=pTDD->cyImage;

        dx=pTDD->cxButton;            //Force button dimensions
        dy=pTDD->cyButton;

        if (iImage > TOOLIMAGE_MAX)
            return FALSE;

        /*
         * If we are using a standard command button, verify that
         * the state does not contain the LIGHTFACE group which
         * only applies to attribute buttons.
         */
        if (BUTTONTYPE_COMMAND==mpButtonType[iImage]
            && (uState & BUTTONGROUP_LIGHTFACE))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲精品国产欧美kt∨ | 青青草国产精品97视觉盛宴 | 欧美一区二区三区四区久久| 日韩免费高清av| 亚洲国产精品v| 开心九九激情九九欧美日韩精美视频电影| 国产精品亚洲专一区二区三区| 欧美日韩免费观看一区三区| 中文字幕电影一区| 久久精品久久精品| 婷婷开心激情综合| 2023国产一二三区日本精品2022| 一区二区在线观看视频| 国产主播一区二区| 日韩一区二区电影| 亚洲一区二区三区在线播放| 成人一区二区视频| 久久久亚洲高清| 精品无人区卡一卡二卡三乱码免费卡| 欧美三级韩国三级日本三斤| 亚洲精品写真福利| 成人免费视频视频| 国产日韩欧美激情| 国产成人一区在线| 中文字幕精品综合| 成人动漫中文字幕| 国产精品短视频| 不卡一区在线观看| 中文字幕在线一区二区三区| 国产盗摄视频一区二区三区| 久久精品欧美一区二区三区不卡 | 国产精品久久久久久久久快鸭 | 亚洲欧美一区二区久久| 国产综合色视频| 精品乱人伦小说| 激情综合五月天| 久久网站最新地址| 国产成人鲁色资源国产91色综 | 最新高清无码专区| 国产成人一区在线| 国产精品国产三级国产普通话99 | 国产日韩亚洲欧美综合| 久久综合狠狠综合久久激情| 国产一区不卡在线| 国产亚洲精品资源在线26u| 国产精品综合一区二区| 久久精品视频在线免费观看| 国产宾馆实践打屁股91| 国产精品日韩成人| 91亚洲精华国产精华精华液| 亚洲国产精品一区二区尤物区| 欧美日韩国产小视频| 日韩电影在线观看电影| 日韩精品中文字幕在线一区| 九色porny丨国产精品| 久久久久久久久久久久久久久99 | 欧美不卡一区二区三区四区| 国产一本一道久久香蕉| 中文字幕五月欧美| 在线视频国内一区二区| 精油按摩中文字幕久久| 欧美激情一区二区三区不卡| 在线观看欧美精品| 黑人巨大精品欧美黑白配亚洲 | 精品国产网站在线观看| 成人午夜av在线| 性欧美大战久久久久久久久| 久久女同精品一区二区| 色综合久久天天综合网| 免费不卡在线观看| 亚洲女同女同女同女同女同69| 欧美日本精品一区二区三区| 国产一区二区精品在线观看| 亚洲欧美日韩久久| 精品精品国产高清a毛片牛牛 | 国产成人在线观看免费网站| 亚洲第一搞黄网站| 国产精品卡一卡二| 日韩免费高清视频| 精品视频在线视频| 不卡的av电影| 黄一区二区三区| 亚洲福利视频一区| ㊣最新国产の精品bt伙计久久| 日韩亚洲欧美一区二区三区| 日本韩国欧美国产| 国产成人鲁色资源国产91色综| 天堂影院一区二区| 亚洲免费在线观看视频| 久久精品无码一区二区三区| 91麻豆精品国产| 欧美三级欧美一级| 色欧美88888久久久久久影院| 国产在线乱码一区二区三区| 丝袜美腿亚洲色图| 一级做a爱片久久| 日韩美女啊v在线免费观看| 中文字幕一区视频| 久久99精品国产麻豆不卡| 中文字幕欧美区| 久久免费午夜影院| 亚洲精品在线观看视频| 在线不卡免费欧美| 欧美日韩美女一区二区| 91国产丝袜在线播放| 9i在线看片成人免费| 99精品桃花视频在线观看| 国产麻豆成人精品| 国模大尺度一区二区三区| 久久精品久久99精品久久| 偷窥少妇高潮呻吟av久久免费| 一区二区三区四区国产精品| 亚洲男人的天堂在线aⅴ视频| 国产精品乱码妇女bbbb| 欧美国产一区二区| 一区二区中文视频| 亚洲婷婷国产精品电影人久久| 亚洲视频一区在线| 亚洲综合免费观看高清完整版在线| 亚洲乱码国产乱码精品精可以看 | 亚洲黄色免费电影| 一区二区三区中文免费| 亚洲国产日韩av| 五月天一区二区三区| 免费在线观看一区二区三区| 奇米777欧美一区二区| 狠狠色丁香婷婷综合久久片| 精品一区二区av| 成人午夜短视频| 在线观看网站黄不卡| 91精品免费观看| 国产午夜亚洲精品理论片色戒| 国产精品国产三级国产aⅴ原创| 亚洲黄色av一区| 日韩av电影天堂| 国产精品一区二区久久精品爱涩| 福利电影一区二区| 欧洲精品在线观看| 91精品国产欧美一区二区成人| 精品少妇一区二区三区在线播放| 国产网红主播福利一区二区| 亚洲青青青在线视频| 日韩电影在线观看电影| 国产 日韩 欧美大片| 色8久久精品久久久久久蜜| 欧美日韩高清在线| 国产亚洲成aⅴ人片在线观看| 日韩一区欧美小说| 麻豆精品蜜桃视频网站| gogo大胆日本视频一区| 欧美电影在线免费观看| 国产色综合久久| 亚洲国产乱码最新视频 | 日韩高清在线不卡| 国产一区在线不卡| 91福利在线观看| 欧美电影免费提供在线观看| 亚洲理论在线观看| 精品一区二区成人精品| 色94色欧美sute亚洲线路二| 日韩精品最新网址| 亚洲激情av在线| 风流少妇一区二区| 欧美一区二区三区在线电影| **性色生活片久久毛片| 韩国理伦片一区二区三区在线播放| 色菇凉天天综合网| 日本一区二区视频在线| 男人操女人的视频在线观看欧美| 91视频一区二区三区| 久久―日本道色综合久久| 亚洲国产日产av| 色欧美日韩亚洲| 国产精品午夜在线观看| 精品一区二区三区在线视频| 欧美性受xxxx黑人xyx性爽| 国产精品久久久久久户外露出| 美女脱光内衣内裤视频久久影院| 色综合久久久久久久久久久| 久久精品无码一区二区三区| 日韩成人免费电影| 欧美日韩中文字幕一区二区| 日韩毛片精品高清免费| 成人性生交大片免费看在线播放| 日韩免费视频一区| 日韩avvvv在线播放| 欧美剧在线免费观看网站| 亚洲精品国产无天堂网2021| 97久久人人超碰| 日韩美女久久久| 91同城在线观看| 最近中文字幕一区二区三区| 成人av中文字幕| 亚洲欧洲99久久| 色综合久久久久网| 亚洲欧美日韩在线不卡| 欧美中文字幕一区二区三区亚洲| 综合中文字幕亚洲| 欧亚洲嫩模精品一区三区| 亚洲成a人片在线观看中文|