0

I have some problems when working with Win32 api.

  1. Changing the text and background color of a button doesn't take effect. My code:

    case WM_CTLCOLORBTN:
            COLORREF colorref;
            colorref = RGB(0,0,255);
            HBRUSH hBrushBtn;
            hBrushBtn = CreateSolidBrush(colorref);
            return ((LRESULT)hBrushBtn);
        break;
  2. How do I create selectable text. My code:

    text = CreateWindow("STATIC","text",WS_VISIBLE | WS_CHILD , 0,0,100,60, hwnd , NULL, NULL, NULL);

  3. How do I create a filled rectangle?
2
Contributors
1
Reply
12
Views
1 Month
Discussion Span
Last Post by rproffitt
0

This looks correct on the surface but from what I read is not reliable. That is, may not have the desired effect in all situations. I'd leave it alone and complete your app. The background color of a button doesn't add much value IMO. Also if you want, just make the button a graphic and take full control.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.