Programming > Problems & Solutions
Colored Button
Nicola:
Hi,
Excuse me for my very little experience in O2, but I can't color the buttons. I did a lot of research, but I couldn't find the right path.
Among other things I tried this, but it's not good ...
--- Code: OxygenBasic ---% IDC_BTN = 1005......case WM_CREATEsys hBtn hBtn=CreateWindowEx(0,"Button", "Stop", style,178, 58, 79, 24, hWin, IDC_BTN, inst, null) SendMessaGE(hBtn,0x100A,IDC_BTN,red)
The compiler does not detect errors, but the result is not as expected. Everything remains gray ...
Help please. :-[
JRS:
Under the Windows API I believe you need to define it as a custom control. Unlike VB which allows changing it via a property setting.
Maybe this will help.
https://stackoverflow.com/questions/18745447/how-can-i-change-the-background-color-of-a-button-winapi-c
Nicola:
Hi john,
Really very interesting and also nice effect created.
But is there an easier way?
such as (in windows API)
SetBkColor (hwnd, Color)
JRS:
This is why I use VB6 and IUP for GUI projects. I'm too old to recreate the wheel.
Nicola:
lol
I have to learn how to use IUP, also because I understand that it is also used under other OS ...
;)
Navigation
[0] Message Index
[#] Next page
Go to full version