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

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

?? bttncur.c

?? 英文版的 想要的話可以下載了 為大家服務
?? C
?? 第 1 頁 / 共 2 頁
字號:
            return FALSE;
        }

    //Create a dithered bitmap.
    hBmpMono=CreateBitmap(dx-2, dy-2, 1, 1, NULL);

    if (NULL==hBmpMono)
        return FALSE;

    hBmpMonoOrg=(HBITMAP)SelectObject(g_hDCMono,  hBmpMono);


    //Save the DC state before we munge on it.
    iSaveDC=SaveDC(hDC);

    /*
     * Draw a button sans image.  This also fills g_crSys with the
     * system colors for us which has space for five colors.
     * We don't use the fifth, the frame color, in this function.
     */
    DrawBlankButton(hDC, x, y, dx, dy
        , (BOOL)(uState & BUTTONGROUP_DOWN), g_crSys);

    //Shift coordinates to account for the button's border
    x++;
    y++;
    dx-=2;
    dy-=2;

    /*
     * Determine the offset necessary to center the image but also
     * reflect the pushed-in state, which means just adding 1 to
     * the up state.
     */
    i=(uState & BUTTONGROUP_DOWN) ? 1 : 0;
    xOffsetGlyph=((dx-bmx) >> 1)+i;
    yOffsetGlyph=((dy-bmy) >> 1)+i;


    //Select given image into the glyph DC before calling MaskCreate
    if (NULL!=hBmp)
        hBmpSave=(HBITMAP)SelectObject(g_hDCGlyphs, hBmp);


    /*
     * Draw the face on the button.  If we have an up or [mouse]down
     * button then we can just draw it as-is.  For indeterminate,
     * disabled, or down disabled we have to gray the image and
     * possibly add a white shadow to it (disabled/down disabled).
     *
     * Also note that for the intermediate state we first draw the
     * normal up state, then proceed to add disabling looking
     * highlights.
     */

    //Up, mouse down, down, indeterminate
    if ((uState & BUTTONGROUP_ACTIVE)
        && !(uState & BUTTONGROUP_BLANK))
        {
        BOOL            fColorsSame=TRUE;

        /*
         * In here we pay close attention to the system colors.
         * Where the source image is black, we paint COLOR_BTNTEXT.
         * Where light gray, we paint COLOR_BTNFACE.  Where dark gray
         * we paint COLOR_BTNSHADOW, and where white we paint
         * COLOR_BTNHILIGHT.
         *
         * The uColors variable contains flags to prevent color
         * conversion.  To do a little optimization, we just do a
         * single BitBlt if we're preserving all colors or if no
         * colors are different than the standards, which is by far
         * the most common case.  Otherwise, cycle through the four
         * colors we can convert and do a BitBlt that converts it to
         * the system color.
         */

        //See what colors are different.
        for (i=STDCOLOR_BLACK; i<=STDCOLOR_WHITE; i++)
            fColorsSame &= (g_crSys[i]==g_crStandard[i]);

        if (PRESERVE_ALL==uColors || fColorsSame)
            {
            BitBlt(hDC, x+xOffsetGlyph, y+yOffsetGlyph, bmx, bmy
                , g_hDCGlyphs, iImage*bmx, 0, SRCCOPY);
            }
        else
            {
            /*
             * Cycle through hard-coded colors and create a mask that
             * has all regions of that color in white and all other
             * regions black.  Then we select a pattern brush of the
             * color to convert to: if we aren't converting the color
             * then we use a brush of the standard hard-coded color,
             * otherwise we use the actual system color.  The
             * ROP_DSPDxax means that anything that's 1's in the mask
             * get the pattern, anything that's 0 is unchanged in
             * the destination.
             *
             * To prevent too many Blts to the screen, we use an
             * intermediate bitmap and DC.
             */

            hMemDC=CreateCompatibleDC(hDC);

            //Make sure conversion of monochrome to color stays B&W
            SetTextColor(hMemDC, 0L);                 //mono 0's->0
            SetBkColor(hMemDC, (COLORREF)0x00FFFFFF); //mono 1's->1

            hBmpT=CreateCompatibleBitmap(hDC, bmx, bmy);
            SelectObject(hMemDC, hBmpT);

            //Copy the unmodified bitmap to the temporary bitmap
            BitBlt(hMemDC, 0, 0, bmx, bmy, g_hDCGlyphs, iImage*bmx
                , 0, SRCCOPY);

            for (i=STDCOLOR_BLACK; i<=STDCOLOR_WHITE; i++)
                {
                //Convert pixels of convert color to 1's in the mask
                SetBkColor(g_hDCGlyphs, g_crStandard[i]);
                BitBlt(g_hDCMono, 0, 0, bmx, bmy, g_hDCGlyphs, iImage*bmx
                    , 0, SRCCOPY);

                //Preserve or modify the color depending on the flag.
                hBR=CreateSolidBrush((uColors & (1 << i))
                    ? g_crStandard[i] : g_crSys[i]);

                if (NULL!=hBR)
                    {
                    hObj=SelectObject(hMemDC, hBR);

                    if (NULL!=hObj)
                        {
                        BitBlt(hMemDC, 0, 0, dx-1, dy-1, g_hDCMono, 0
                            , 0, ROP_DSPDxax);
                        SelectObject(hMemDC, hObj);
                        }

                    DeleteObject(hBR);
                    }
                }

            //Now put the final version on the display and clean up
            BitBlt(hDC, x+xOffsetGlyph, y+yOffsetGlyph, dx-1, dy-1
                   , hMemDC, 0, 0, SRCCOPY);

            DeleteDC(hMemDC);
            DeleteObject(hBmpT);

            }
        }


    //Disabled and indeterminate states (unless we're blank)
    if ((uState & BUTTONGROUP_DISABLED
        || ATTRIBUTEBUTTON_INDETERMINATE==uState)
        && !(uState & BUTTONGROUP_BLANK))
        {
        //Grayed state (up or down, no difference)
        MaskCreate(iImage, dx, dy, bmx, bmy, xOffsetGlyph
            , yOffsetGlyph, 0);

        //Make sure conversion of monochrome to color stays B&W
        SetTextColor(hDC, 0L);                     //0's in mono -> 0
        SetBkColor(hDC, (COLORREF)0x00FFFFFF);     //1's in mono -> 1

        //If we're disabled, up or down, draw the highlighted shadow.
        if (uState & BUTTONGROUP_DISABLED)
            {
            hBR=CreateSolidBrush(g_crSys[SYSCOLOR_HILIGHT]);

            if (NULL!=hBR)
                {
                hObj=SelectObject(hDC, hBR);

                if (NULL!=hObj)
                    {
                    //Draw hilight color where we have 0's in mask
                    BitBlt(hDC, x+1, y+1, dx-2, dy-2, g_hDCMono, 0, 0
                        , ROP_PSDPxax);
                    SelectObject(hDC, hObj);
                    }
                DeleteObject(hBR);
                }
            }

        //Draw the gray image.
        hBR=CreateSolidBrush(g_crSys[SYSCOLOR_SHADOW]);

        if (NULL!=hBR)
            {
            hObj=SelectObject(hDC, hBR);

            if (NULL!=hObj)
                {
                //Draw the shadow color where we have 0's in the mask
                BitBlt(hDC, x, y, dx-2, dy-2, g_hDCMono, 0, 0
                    , ROP_PSDPxax);
                SelectObject(hDC, hObj);
                }

            DeleteObject(hBR);
            }
        }

    //If the button is selected do the dither brush avoiding glyph
    if (uState & BUTTONGROUP_LIGHTFACE)
        {
        HBRUSH      hBRDither;

        /*
         * Get the dither brush.  This function will recreate it if
         * necessary or return the global one if the colors already
         * match.
         */
        hBRDither=HBrushDitherCreate(g_crSys[SYSCOLOR_FACE]
            , g_crSys[SYSCOLOR_HILIGHT]);
        hObj=SelectObject(hDC, hBRDither);

        if (NULL!=hObj)
            {
            /*
             * The mask we create now determines where the dithering
             * ends up.  In the down disabled state, we have to
             * preserve the highlighted shadow, so the mask we create
             * must have two masks of the original glyph, one of them
             * offset by one pixel in both x & y.  For the
             * indeterminate state, we have to mask all highlighted
             * areas.  The state passed to MaskCreate matters here
             * (we've used zero before).
             */
            MaskCreate(iImage, dx, dy, bmx, bmy
                       , xOffsetGlyph-1, yOffsetGlyph-1, uState);

            //Convert monochrome masks to B&W color bitmap in BitBlt.
            SetTextColor(hDC, 0L);
            SetBkColor(hDC, (COLORREF)0x00FFFFFF);

            /*
             * Only draw the dither brush where the mask is 1's.  For
             * the indeterminate state we have to not overdraw the
             * shadow highlight so we use dx-3, dy-3 instead of dx-1
             * and dy-1.  We do this whether or not we're blank.
             */
            i=(ATTRIBUTEBUTTON_INDETERMINATE==uState
               || BLANKBUTTON_INDETERMINATE==uState) ? 3 : 1;

            BitBlt(hDC, x+1, y+1, dx-i, dy-i, g_hDCMono, 0, 0
                , ROP_DSPDxax);
            SelectObject(hDC, hObj);
            }

        //DO NOT delete hBRDither!  It's a shared global.
        }

    //Cleanup g_hDCGlyphs:  Must do AFTER calling MaskCreate
    if (NULL!=hBmpSave)
        SelectObject(g_hDCGlyphs, hBmpSave);

    SelectObject(g_hDCMono,   hBmpMonoOrg);
    DeleteObject(hBmpMono);

    //Restore everything in the DC.
    RestoreDC(hDC, iSaveDC);
    return TRUE;
    }






/*
 * DrawBlankButton
 *
 * Purpose:
 *  Draws a button with no face using the current system colors in
 *  either an up or down state.
 *
 * Parameters:
 *  hDC             HDC on which to draw
 *  x, y            int coordinates where we start drawing
 *  dx,dy           int size of the button
 *  fDown           BOOL indicating the up or down state of the
 *                  button
 *  pcr             COLORREF * to five colors in which we store text,
 *                  shadow, face, highlight, and frame colors.  This
 *                  is a matter of convenience for the caller, since
 *                  we have to load these colors anyway we might as
 *                  well send them back.
 *
 * Return Value:
 *  None
 */

void DrawBlankButton(HDC hDC, int x, int y, int dx, int dy
    , BOOL fDown, COLORREF *pcr)
    {
    //Get the current system colors for buttons.
    pcr[0]=GetSysColor(COLOR_BTNTEXT);
    pcr[1]=GetSysColor(COLOR_BTNSHADOW);
    pcr[2]=GetSysColor(COLOR_BTNFACE);
    pcr[3]=GetSysColor(COLOR_BTNHIGHLIGHT);
    pcr[4]=GetSysColor(COLOR_WINDOWFRAME);

    //Draw the border around the button.
    PatB(hDC, x+1,    y,      dx-2, 1,    pcr[4]);
    PatB(hDC, x+1,    y+dy-1, dx-2, 1,    pcr[4]);
    PatB(hDC, x,      y+1,    1,    dy-2, pcr[4]);
    PatB(hDC, x+dx-1, y+1,    1,    dy-2, pcr[4]);

    //Shift coordinates to account for the border we just drew
    x++;
    y++;
    dx-=2;
    dy-=2;

    //Paint the interior grey as a default.
    PatB(hDC, x, y, dx, dy, pcr[2]);

    /*
     * Draw shadows and highlights.  The DOWN grouping that contains
     * down, mouse down, and down disabled are drawn depressed.  Up,
     * indeterminate, and disabled are drawn up.
     */

    if (fDown)
        {
        PatB(hDC, x, y, 1,  dy, pcr[1]);
        PatB(hDC, x, y, dx, 1,  pcr[1]);
        }
    else
        {
        //Normal button look.
        PatB(hDC, x, y, 1,    dy-1, pcr[3]);
        PatB(hDC, x, y, dx-1, 1,    pcr[3]);

        PatB(hDC, x+dx-1, y,      1,  dy, pcr[1]);
        PatB(hDC, x,      y+dy-1, dx, 1,  pcr[1]);

        PatB(hDC, x+1+dx-3, y+1,    1,    dy-2, pcr[1]);
        PatB(hDC, x+1,      y+dy-2, dx-2, 1,    pcr[1]);
        }

    return;
    }






/*
 * PatB
 * Internal
 *
 * Purpose:
 *  A more convenient PatBlt operation for drawing button borders and
 *  highlights.
 *
 * Parameters:
 *  hDC             HDC on which to paint.
 *  x, y            int coordinates at which to paint.
 *  dx, dy          int dimensions of rectangle to paint.
 *  rgb             COLORREF to use as the background color.
 *
 * Return Value:
 *  None
 */

void PatB(HDC hDC, int x, int y, int dx, int dy, COLORREF rgb)
    {
    RECT        rc;

    SetBkColor(hDC, rgb);
    SetRect(&rc, x, y, x+dx, y+dy);
    ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL);
    }




/*
 * MaskCreate
 * Internal
 *
 * Purpose:
 *  Creates a monochrome mask bitmap of the given image at the given
 *  offset in the global g_hDCMono.  Anywhere in the image that you
 *  have the light gray (STDCOLOR_LTGRAY) or the white highlight
 *  (STDCOLOR_WHITE) you get get 1's.  All other pixels are 0's
 *
 * Parameters:
 *  iImage          UINT index of the image for which to create a
 *                  mask.
 *  dx, dy          int dimensions of the button.
 *  bmx, bmy        int dimensions of the bitmap to use.
 *  xOffset         int offset for x inside g_hDCMono where we paint.
 *  yOffset         int offset for y inside g_hDCMono where we paint.
 *  uState          UINT state of the image.  Special cases are made
 *                  for ATTRIBUTEBUTTON_DOWNDISABLED and
 *                  ATTRIBUTEBUTTON_INDETERMINATE.  In any case
 *                  where you do not want a special case, pass zero
 *                  here, regardless of the true button state.
 *
 * Return Value:
 *  None
 */

void MaskCreate(UINT iImage, int dx, int dy, int bmx, int bmy
    ,int xOffset, int yOffset, UINT uState)
    {
    //Initalize whole area with zeros
    PatBlt(g_hDCMono, 0, 0, dx, dy, WHITENESS);

    if (uState & BUTTONGROUP_BLANK)
        return;

    //Convert face colored pixels to 1's. all others to black.
    SetBkColor(g_hDCGlyphs, g_crStandard[STDCOLOR_LTGRAY]);
    BitBlt(g_hDCMono, xOffset, yOffset, bmx, bmy, g_hDCGlyphs
        , iImage*bmx, 0, SRCCOPY);

    //Indeterminate state, don't turn highlight's to 1's--leave black
    if (ATTRIBUTEBUTTON_INDETERMINATE!=uState)
        {
        //Convert highlight colored pixels to 1's, OR with previous.
        SetBkColor(g_hDCGlyphs, g_crStandard[STDCOLOR_WHITE]);
        BitBlt(g_hDCMono, xOffset, yOffset, bmx, bmy, g_hDCGlyphs
            , iImage*bmx, 0, SRCPAINT);
        }

    /*
     * For the down disabled state, AND this same mask with itself at
     * an offset of 1, which accounts for the highlight shadow.
     */
    if (ATTRIBUTEBUTTON_DOWNDISABLED==uState)
        BitBlt(g_hDCMono, 1, 1, dx-1, dy-1, g_hDCMono,  0, 0, SRCAND);

    return;
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人18精品视频| 欧美成人a视频| 日韩视频一区二区在线观看| 国产午夜精品一区二区三区嫩草 | 亚洲1区2区3区4区| 国产在线国偷精品免费看| 色综合欧美在线| 久久这里只有精品首页| 亚洲国产一二三| a级精品国产片在线观看| 欧美一级免费观看| 亚洲成av人片在线观看| 成年人网站91| 久久久久久久久一| 久久99久久精品| 欧美色图天堂网| 亚洲乱码中文字幕| 高清免费成人av| 久久看人人爽人人| 精彩视频一区二区三区| 正在播放亚洲一区| 亚洲一卡二卡三卡四卡无卡久久| 国产成人在线观看| 精品免费视频.| 久久精品国产精品亚洲综合| 欧美三级日韩三级| 一区二区在线观看免费视频播放| 国产1区2区3区精品美女| 欧美电影精品一区二区| 日韩精品视频网站| 欧美夫妻性生活| 青青草97国产精品免费观看| 欧美理论在线播放| 五月激情综合网| 欧美日韩高清在线| 午夜精品久久久久影视| 欧美日韩精品免费观看视频| 亚洲一区二区三区在线看| 99精品视频在线免费观看| 国产精品美女久久久久久久| 成人av在线一区二区| 欧美国产日本视频| 99在线精品视频| 一区二区在线免费| 欧美在线综合视频| 午夜精品福利一区二区蜜股av| 欧美日韩一二三区| 免费成人美女在线观看.| 日韩美女主播在线视频一区二区三区| 性做久久久久久久久| 91精品国产综合久久精品图片| 亚洲高清视频在线| 日韩欧美国产成人一区二区| 欧美亚洲免费在线一区| 日韩欧美成人一区| 黄色日韩三级电影| 国产日韩欧美精品综合| 成人免费视频caoporn| 亚洲欧美激情在线| 91麻豆精品国产| 国产精品 欧美精品| 亚洲免费三区一区二区| 欧美日韩三级视频| 国产综合久久久久影院| 国产精品久久久久一区 | 日本电影亚洲天堂一区| 日韩经典中文字幕一区| 欧美精品一区二区在线播放| www.亚洲精品| 视频一区二区三区在线| 国产丝袜美腿一区二区三区| 91极品视觉盛宴| 国产一区二区三区四区在线观看| 中文字幕制服丝袜一区二区三区 | 91精品欧美综合在线观看最新| 激情六月婷婷久久| 一区二区三区国产精华| 久久久久99精品国产片| 欧美视频在线观看一区二区| 国产高清视频一区| 日韩福利电影在线| 中文字幕一区二区三区乱码在线| 欧美一区二区三区四区久久| www.久久精品| 久久99精品国产.久久久久| 亚洲视频每日更新| 2023国产精品自拍| 欧美日韩一级二级| 91在线视频免费观看| 紧缚捆绑精品一区二区| 亚洲成人免费观看| 1区2区3区精品视频| 精品人伦一区二区色婷婷| 91福利在线导航| 成人高清在线视频| 激情深爱一区二区| 日韩av二区在线播放| 亚洲伦在线观看| 国产精品天干天干在观线| 欧美xxxx老人做受| 欧美高清精品3d| 欧美蜜桃一区二区三区| 日本二三区不卡| 91丝袜高跟美女视频| 国产99精品国产| 国产精品综合久久| 免费成人在线视频观看| 免费在线欧美视频| 石原莉奈在线亚洲三区| 亚洲第一综合色| 亚洲电影视频在线| 午夜精品福利视频网站| 亚洲狠狠爱一区二区三区| 一区二区免费看| 日韩久久一区二区| 中文字幕一区二区三区在线观看| 久久精品视频在线看| 久久九九影视网| 久久久久国产一区二区三区四区| 精品女同一区二区| 久久久久久久av麻豆果冻| 欧美videos中文字幕| 欧美一卡二卡在线| 欧美r级在线观看| 337p粉嫩大胆噜噜噜噜噜91av | 欧美视频你懂的| 欧美亚洲精品一区| 欧美日韩精品欧美日韩精品一综合| 色综合久久99| 精品视频在线免费看| 欧美日韩1区2区| 精品久久久久99| 国产精品久久久久一区| 国产精品护士白丝一区av| 国产精品日日摸夜夜摸av| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美色图天堂网| 日韩女同互慰一区二区| 精品国产亚洲一区二区三区在线观看| 精品日韩av一区二区| 欧美激情在线观看视频免费| 亚洲欧美偷拍卡通变态| 亚洲国产一区二区三区青草影视| 丝袜国产日韩另类美女| 精品一区二区成人精品| 成人午夜视频在线| 99国产精品视频免费观看| 91最新地址在线播放| 欧美日韩你懂得| 26uuu国产一区二区三区| 中文一区二区在线观看| 亚洲精品视频自拍| 免费观看一级欧美片| 不卡的av在线| 777色狠狠一区二区三区| 精品粉嫩超白一线天av| 亚洲精品乱码久久久久| 麻豆成人av在线| av午夜精品一区二区三区| 制服丝袜国产精品| 中文字幕在线不卡一区二区三区| 视频一区二区三区入口| 国产成人午夜视频| 777奇米成人网| 亚洲日本在线观看| 久久电影网电视剧免费观看| 91亚洲精华国产精华精华液| 欧美一卡2卡三卡4卡5免费| 国产精品乱码一区二三区小蝌蚪| 日韩中文字幕av电影| 成人禁用看黄a在线| 欧美视频在线一区二区三区| 中文在线免费一区三区高中清不卡| 亚洲图片欧美视频| 91麻豆国产精品久久| 欧美草草影院在线视频| 午夜精品aaa| 91麻豆文化传媒在线观看| 日韩精品一区二区三区老鸭窝| 亚洲乱码国产乱码精品精98午夜 | 最新成人av在线| 国产在线观看一区二区| 欧美日韩成人综合| 亚洲综合激情网| aaa欧美日韩| 国产欧美日韩另类视频免费观看| 婷婷久久综合九色综合绿巨人| 99久久国产综合色|国产精品| 26uuu精品一区二区| 青青草国产成人av片免费| 欧美日韩国产欧美日美国产精品| 亚洲欧美综合另类在线卡通| 国产精品一区二区三区四区| 欧美本精品男人aⅴ天堂| 美女精品自拍一二三四| 日韩无一区二区| 免费在线观看一区| 精品欧美一区二区在线观看| 久久国产精品无码网站| 日韩欧美三级在线|