PRB: ????? ???? ???? ??? BS_GROUPBOX ????? ?????

?????? ????????? ?????? ?????????
???? ???????: 79982 - ??? ???????? ???? ????? ????? ??? ???????.
3.00 3.10 kbcode kbprb kbprg WINDOWS
????? ???? | ?? ????

???????

??? ????? ???? ??? BS_GROUPBOX ?? ??? ??????? ?????? ?? ???? ????.

?????

????? ???? ????? ?? ???? ??? BS_GROUPBOX ??? WS_CLIPCHILDREN ??? ???? ?????? ????? ?? ??? ??????? ???? ??????.

????

??? ????? ???? ???? ???????? ?????? ??????? WM_ERASEBKGND ?????? ??? ??????? ?????? ??. ??????? ????? ??? ????????? ?????? ??? ??? ??? ???????.

?????

????? ??? ?????? ??? ???????.

??????? ????

???? ??? WS_CLIPCHILDREN ???? ???????? ????? ??????? ?????? ???????? ??????? ??? ?????? ????? ????? ?????? ?????? ??. ??? ???? ???? ??? BS_GROUPBOX ?? ???? ???? ????? ????? ??? ??????? ?????? ??. ??? ??????? ??? ????? ??? ????? ???? ?? ??????? ???? ???? ???? ???? ??????.

????? ??? ??? ????? ??? ???? ?????? ???? ???? ??? ???? ??? ??? ?????? ? ???? ????? ?? ????? ???? ?????? ????? ?? ??? ?????? ??????. ?? ???? ??? ??????? ????? ?? ????? ?????? ????? ??? WS_CLIPCHILDREN.

??? ??? ??? ????????? ???????? ??????? ?? ???? ?????? ????? ???????. ??? ??? ???????? ???????? ????? ???? ??????.
   case WM_ERASEBKGND:

    {
    HBRUSH  hBrush, hOldBrush;
    HPEN    hPen, hOldPen;
    RECT    rect;
    HDC     hDC;

    hDC = GetDC(hWnd);

    // Obtain a handle to the parent window's background brush.
    hBrush = GetClassWord(ghWnd, GCW_HBRBACKGROUND);
    hOldBrush = SelectObject(hDC, hBrush);

    // Create a background-colored pen to draw the rectangle
    // borders, where gWindowColor is some globally defined
    // COLORREF variable used to paint the window's background
    hPen = CreatePen(PS_SOLID, 1, gWindowColor);
    hOldPen = SelectObject(hDC, hPen);

    // Erase the group box's background.
    GetClientRect(hWnd, &rect);
    Rectangle(hDC, rect.left, rect.top, rect.right, rect.bottom);

    // Restore the original objects before releasing the DC.
    SelectObject(hDC, hOldPen);
    SelectObject(hDC, hOldBrush);

    // Delete the created object.
    DeleteObject(hPen);

    ReleaseDC(hWnd, hDC);

    // Instruct Windows to paint the group box text and frame.
    InvalidateRect(hWnd, NULL, FALSE);

    // Insert code here to instruct the contents of the group box
    // to repaint as well.

    return TRUE; // Background has been erased.
    }
				

???????

???? ???????: 79982 - ????? ??? ??????: 02/????/1426 - ??????: 1.1
????? ???
  • Microsoft Windows Software Development Kit 3.1
????? ??????: 
kbmt kb16bitonly kbbutton kbctrl kbprb KB79982 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????79982
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com