Machine-translated by Google. Questions are authored in English.
Top

Discussion

In win 32-Windows programming, the first message received by a windows procedure is :

  • A.WM_INIT
  • B.WM_CREATE
  • C.WM_PAINT
  • D.WM_ACTIVATE

Answer: B

The first message is WM_CREATE.

When a program calls CreateWindow, Windows sends WM_CREATE to the window procedure before the function returns, so the program can initialise the window, for example creating child controls. Petzold's Programming Windows describes it as the first message a window procedure processes; strictly a few non-client messages such as WM_NCCREATE come before it, but none of them is offered here.

WM_PAINT arrives later, when the window is shown and needs drawing, and WM_ACTIVATE when it is activated. WM_INIT is not a Windows message; dialog boxes use WM_INITDIALOG.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.