How to set background color of window after I have registered it?

后端 未结 3 969
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 18:21

I am not using a dialog, I\'m using my own custom class which I have registered and then used the CreateWindow call to create it, I have preset the background c

3条回答
  •  一向
    一向 (楼主)
    2020-12-05 18:48

    You may try the following:

    HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255));
    SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, (LONG_PTR)brush);
    

提交回复
热议问题