How set with Windows API Edit Control, Static text, Dialog Box

Hi everybody,
I work with a rc file. with
EDITTEXT ==> Edit Control
LTEXT       ==> Static
CONTROL  ==> Dialog Box

With API windows ==>   SendMessage

1) How set disable a Dialog Box (checkbox) and set gray the text with windows API
I can set check or uncheck with SendDlgItemMessage(HdlDlg,1005,BM_SETCHECK,0,0) butI dont know how set it disable.
125 pts

2) How set gray a Static text with windows API
50 pts

3) How set disable a Edit Control with windows API (not set readonly) because I don't want be able to click on it (see blinking cursor in it)
125 pts

Somebody can help me,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hello  jlvill, you can disable a window (button or Edit) with the standard EnableWindow function -

EnableWindow(hEdit, False);

to change the color of the text in a static control is more code you will need to process the WM_CTLCOLORSTATIC message in the static control's parent window Proc, , ,  like this -

{WM_CTLCOLORSTATIC is the pre Static Paint message to get
colors to paint the Static}
WM_CTLCOLORSTATIC: if (LParam = abs(hStatic1)) then
                       You MUST Exit so the DefWindowProc is NOT called
                       try it without Exit and the Static will NOT change colors}

 = = = = = = = = = = = = = = = = = = =

ask questions if you need more information

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
or maybe this is more useful -

jlvillAuthor Commented:
Thanks Guys! ;-)
Itst works!
If you are working with templete Dialogs and API programs, , you may want to read this page at DelphiZeus web site -

you can go to other pages there and get information about other methods of API program creation
jlvillAuthor Commented:
Thanks Slick for your information,
Have a nice day!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.