GetWindowsLong()

Hello,can anyone clear me the following?
1) I feel that the program is working fine without WM_DESTROY,WM_CREATE then what is the use of them?

2)What is the use of InvalidateRect & ValidateRect &GetWindowsLong()

3)What is the difference btwn ,createCompatibleDC,GetDC,CreateCompatibleIC()

4)What is the use of createIndirectBrush()..

5)How to locate a cursor to the particular location in client area except MovetoEx..

6)How to change the color ,caption of a button,&how to write inside a rectangle..

7)What is the use of WM_ERASEBACKGROUND..

Advance thanks...
Geez! I could spend the whole rest of today trying to explain that stuff. Probably tomorrow and the next day too! Your question kind of reminds me of something like this...

I need to build a rocket ship to go to Mars. Could someone tell me...

1) How to build the propulsion system;

2) How should life support be handled;

3) What's the best way to navigate to there?

4) I don't understand why the ship doesn't need wings.

I'd appreciate having this information by this evening, because I need to leave for there by tomorrow.

Have you ever encountered the concept of acquiring a textbook containing these topics and studying it?
Freddie, you left out the part about what does fuel have to do with it.
fuel?... we use thermonuclear ractors!...

1) I feel that the program is working fine without WM_DESTROY,WM_CREATE then what is the use of them?


There are hundreds of Windows messages. You don't need to provide specific handlers for all of them in any one program. You only need to handle those that affect the functionality of your program, and that is something you have to determine yourself.

GetWindowLong() / SetWindowLong() are very important and commonly used functions. I first learned them in Charles Petzold's Checkers series of programs (there were two or three) in his Programming Windows books. I'd recommend you do the same for those functions, as well as the rest of your questions.

With regard to colors of buttons, the WM_CTLCOLORSTATIC message needs to be handled. You can look up that message on MSDN or get a copy of Win32 Programming by Rector & Newcomer.
Last edited on
Topic archived. No new replies allowed.