Learn message (19): wm_syscommand message [3]: wparam Parameter

Source: Internet
Author: User
Tmessage. wparam is twmsyscommand. commantype; this is the system command number.

The following program intercepts wparam and displays the Form title.

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) protected procedure wmsyscommand (VAR message: twmsyscommand); message wm_syscommand; end; var form1: tform1; implementation {$ R *. DFM} procedure tform1.wmsyscommand (VAR message: twmsyscommand); var STR: string; begin case message. required type of SC _size: Str: = 'SIZE'; SC _move: Str: = 'move '; SC _minimize: Str: = 'minimize'; SC _maximize: Str: = 'maximize'; SC _nextwindow: STR: = 'nextwindow'; SC _prevwindow: Str: = 'prevwindow'; SC _close: Str: = 'close'; SC _vscroll: Str: = 'vscroll '; SC _hscroll: Str: = 'hscroll '; SC _mousemenu: Str: = 'mousemenu'; SC _keymenu: Str: = 'keymenu '; SC _arrange: Str: = 'arrange'; SC _restore: Str: = 'restore'; SC _tasklist: Str: = 'tasklist'; SC _screensave: Str: = 'screensave'; SC _hotkey: Str: = 'hotkey'; SC _default: Str: = 'default'; SC _monitorpower: Str: = 'monitorpower'; SC _contexthelp: Str: = 'contexthelp'; SC _separator: Str: = 'separator'; 61441: Str: = 'drag the left border '; 61442: Str: = 'drag the right border'; 61443: Str: = 'drag the upper border '; 61444: Str: = 'drag the upper left corner '; 61445: Str: = 'drag upper right corner '; 61446: Str: = 'drag bottom border'; 61447: Str: = 'drag lower left corner '; 61448: Str: = 'drag the lower right corner '; 61458: Str: = 'drag the title bar'; 61558: Str: = 'horizontal scroll bar '; 61574: Str: = 'double-click horizontal scroll bar'; 61575: STR: = 'vertical scroll bar rolling '; 61559: Str: = 'double-click vertical scroll bar'; 61587: Str: = 'click the minimization icon '; 61490: Str: = 'double-click the title bar when maximization '; 61730: Str: = 'double-click the title bar when maximization'; end; If STR = ''then STR: = inttostr (message. optional type); text: = STR; inherited; end.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.