Hi everyone i am new to this forum. I need help with the api Setbkcolor in Delphi..will someone guide me on how to use Setbkcolor api in delphi. Thanks in advance.
: Hi everyone i am new to this forum. : I need help with the api Setbkcolor in Delphi..will someone guide me : on how to use Setbkcolor api in delphi. : Thanks in advance. : First you need to get the DC handle for the component, for which the background color needs to be changed. Then you can set the color using its RGB value. The format of the color is (in hex): 00RRGGBB. There are alternatives, depending on what you want to do.
: First you need to get the DC handle for the component, for which the : background color needs to be changed. Then you can set the color : using its RGB value. The format of the color is (in hex): 00RRGGBB. : There are alternatives, depending on what you want to do.
Here's How i have done
First I Got the Dc Handle DC:= GetDC(hWnd);
Then i set the Background Mode SetBkMode(DC, OPAQUE);
Then i create a brush and Set the Color CreateSolidBrush(00000000); SetBkColor(DC, 00000000);
But still i have no luck with it .. someone guide me
: : First you need to get the DC handle for the component, for which the : : background color needs to be changed. Then you can set the color : : using its RGB value. The format of the color is (in hex): 00RRGGBB. : : There are alternatives, depending on what you want to do. : : Here's How i have done : : First I Got the Dc Handle : DC:= GetDC(hWnd); : : Then i set the Background Mode : SetBkMode(DC, OPAQUE); : : Then i create a brush and Set the Color : CreateSolidBrush(00000000); : SetBkColor(DC, 00000000); : : But still i have no luck with it .. someone guide me : But what do you want to do? This is quite low level coding, and Delphi probably has better ways of handling this.
Comments
: I need help with the api Setbkcolor in Delphi..will someone guide me
: on how to use Setbkcolor api in delphi.
: Thanks in advance.
:
First you need to get the DC handle for the component, for which the background color needs to be changed. Then you can set the color using its RGB value. The format of the color is (in hex): 00RRGGBB.
There are alternatives, depending on what you want to do.
: background color needs to be changed. Then you can set the color
: using its RGB value. The format of the color is (in hex): 00RRGGBB.
: There are alternatives, depending on what you want to do.
Here's How i have done
First I Got the Dc Handle
DC:= GetDC(hWnd);
Then i set the Background Mode
SetBkMode(DC, OPAQUE);
Then i create a brush and Set the Color
CreateSolidBrush(00000000);
SetBkColor(DC, 00000000);
But still i have no luck with it .. someone guide me
: : background color needs to be changed. Then you can set the color
: : using its RGB value. The format of the color is (in hex): 00RRGGBB.
: : There are alternatives, depending on what you want to do.
:
: Here's How i have done
:
: First I Got the Dc Handle
: DC:= GetDC(hWnd);
:
: Then i set the Background Mode
: SetBkMode(DC, OPAQUE);
:
: Then i create a brush and Set the Color
: CreateSolidBrush(00000000);
: SetBkColor(DC, 00000000);
:
: But still i have no luck with it .. someone guide me
:
But what do you want to do? This is quite low level coding, and Delphi probably has better ways of handling this.