Answered You can hire a professional tutor to get the answer.

QUESTION

Question A 2 : Windows Event Handling - ( 10 marks ) The Windows Operating System and applications are event- driven . Describe how a Windows*...

Question A2: Windows Event Handling. The Windows Operating System and applications are event driven.

Question A 2 : Windows Event Handling - ( 10 marks )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 mainmessage procedure WindProc . You also need to describe the role of the parameters . Refer to thesource code example below . Discuss how event-driven systems are beneficial for interactive*applications .LRESULT CALLBACK WHOProc ( HWIND hund , UINT message , WPARAM WParam , LPARAM 1 Param )\intI wmId , wmEvent ;PAINTSTRUCT PS ;]HDC hoc ;switch ( message )Case WM COMMAND :`wm Id*\= LOWORD ( WParam ) ;WINEvent = HIWORD ( WParam ) ;1 1 Parse the menu selections :`switch ( wmId )Case IDM ABOUT :`Dialog Box ( hInst , MAKEINTRESOURCE ( IDD_ ABOUTBOX ) , hund , About ) ;]break ;case IDM_ EXIT :`Destroy Window ( hand ) ;break ;default :`return Defwindow Proc ( hund , message , WParam , 1 Param ) ;\break ;]case WM PAINT :`hoc = BeginPaint ( hund , & ps ) ;]1 1 TODO : Add any drawing code here ...EndPaint ( hund , &ips ) ;break ;\Case WM DESTROY :`PostQuit Message ( 8 ) ;`break ;\default :`return Defwindowproc ( hund , message , WParam , 1 Param ) ;return 8 ;]
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question