Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Windows Operating System and applications are event-driven. Describe how a Windows application is decoding a WM COMMAND event message to call a Dialog Box

The Windows Operating System and applications are event-driven. Describe how a Windows application is decoding a WM COMMAND event message to call a Dialog Box from its main message procedure WndProc. You also need to describe the role of the parameters. Refer to the source code example below. Discuss how event-driven systems are beneficial for interactive applications. LRESULT CALLBACK WwndProc (HAND hand, UINT message, WPARAM WParam, LPARAM 1Param) int wmId, wmEvent; PAINTSTRUCT ps; HDC

LRESULT CALLBACK WwndProc (HAND hand, UINT message, WPARAM WParam, LPARAM 1Param) int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (nessage) case WM_COMMAND: wmId - LOWORD (wParam); wmEvent - HIWORD (WParam); I/ Parse the menu selections: switch (wmId) case IDM ABOUT: DialogBox (hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hind, About); break; case IDM_EXIT: Destroywindow(hiwnd); break; default: return DefwindowProc(hind, message, wParam, 1Param); break; case WM PAINT: hdc - BeginPaint (hwnd, &ps); 1/ TODO: Add any drawing code here... EndPaint (hwnd, Sps): break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefwindowProc (hind, message, wParam, IParam); return e;

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Windows applications decoding of a WM COMMAND event message is based on UINT WPARAM and LPARAM param... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Survey of Economics

Authors: Irvin B. Tucker

8th edition

1111989664, 978-1133713357, 1133713351, 978-1111989668

More Books

Students also viewed these Programming questions

Question

Find dy/dx for the following functions. y = sin x + cos x

Answered: 1 week ago

Question

How will you establish groups?

Answered: 1 week ago

Question

How could a greater budget deficit increase the trade deficit?

Answered: 1 week ago

Question

State the rule of complements?

Answered: 1 week ago