Delphi character and string [5]-string and Windows API

In Windows API, the string corresponds to the pchar (pansichar) of Delphi. In API, the string of Delphi is flexible. Assign values first: // Assignment Method 1: Give begin setwindowtext (handle, 'newtitle'); end; // Assignment Method

Winapi: formatting output functions of wvsprintf and wsprintf-Windows

Wvsprintf function declaration: Wvsprintf (output: pchar; {used to return the buffer} format: pchar; {format; similar to the format, it should be the same as the C-language printf format} Arglist: va_list {array pointer}): integer; {length

For more information about beep, messagebeep, and Windows. Beep

Delphi defines the beep method in the sysutils unit and can make a sound, which is generally used for reminder and debugging. Beep is actually the called API function: messagebeep (mb_ OK );Messagebeep can be used to call different audio files

Windows Programming [17]-change menu: loadmenu, destroymenu, setmenu

In this example: In this example, two menus are provided in the resource file,ProgramSwitch during running. Resource file (testres. Rc) used in this example ): Mymenu1 menuexbegin menuitem "open", 101 menuitem

Windows Programming [18]-change menu item: modifymenu

In this example: Resource file (testres. Rc) used in this example ): Mymenu1 menuexbegin menuitem "open", 101 menuitem "old", 102 menuitem "help", 103end This exampleCodeFile: Program project1; {$ R 'testres. res

Windows Programming [22]-menu selection and painting brush Modification

Tip: 1. The checkmenuitem function is used to change the menu item selection status; 2. The setclasslong function can modify all parameters registered before the window class registration. Here, the gcl_hbrbackground parameter indicates that

Windows API function in VCL (2): activatekeyboardlayout

Activatekeyboardlayout is used in the controls, dbgrids, and grids units respectively. The following statements are basically used: Activatekeyboardlayout (screen. defaultkblyout, kll_activate); {indicates activating the current input method}

Windows API function (4) in VCL: adjustwindowrectex

Adjustwindowrectex is used in forms and dbctrls units. The edge size that adjustwindowrectex can obtain based on the window style. Test: VaR R: trect; begin setrect (R, 0, 0, 0, 0); {This rectangle is not a global variable and needs to be

Start Control Panel windows

First, review how to call external Program : Delphi uses Windows. winexec or shellapi. ShellExecute to run external programs. For example: Winexec('notepad.exe ', sw_normal); unzip open the unzip winexec('regedit.exe', sw_normal); {open

Windows Programming [16]-add and delete menu items: getmenu, appendmenu, deletemenu, drawmenubar

In this example: In this example, three menus are dynamically added when the form is created, and the functions of Self-deletion are granted to them. Resource file (testres. Rc) used in this example ): Mymenu1

Windows Programming [15]-menu message: wm_command

In this example: When you click any menu item, a wm_command message is sent. The lower two digits of the wparam parameter of the message are the integers that identify the menu item! Resource file (testres. Rc) used in

Windows API function (6) in VCL: begindeferwindowpos

Begindeferwindowpos, deferwindowpos, and enddeferwindowpos are functions used together to adjust the position, size, and Z sequence of a set of windows. They are useful in extctrls units. Next, adjust a group of buttons in Panel1 using

Windows Programming [8]-wm_paint message

In this example: Program project1; uses Windows, messages; {custom process for wm_paint message calling} procedure onpaint (H: hwnd); const STR = 'codegear Delphi 2007 '; var DC: HDC; PS: paintstruct; rect: trect; begin messagebeep (0);

Windows Programming [12]-menus and menu Resources (1)

If we use the tmainmenu control to design the following menu: This menu is stored in the form source file as follows: Object mainmenu1: tmainmenuleft = 160top = 104 object file1: tmenuitem caption = '& file' object new1:

Windows API function (5) in VCL: alphablend

Alphablend is a function used to specify image transparency. It is used in graphics, graphutil, and ribbonstyleactnctrls. In the following test, an image is displayed in the form and the transparency can be adjusted. In this

Enumeration of all current IE Windows-Reply to "mixed posts"

Problem Source: http://www.cnblogs.com/del/archive/2008/02/28/1085432.html#1247615 To "mixed job": You mentioned the "input box" in IE at the same time, but you didn't understand what you mean. In this example, you just look for the top-

Windows Programming [21]-wm_menuselect message and getmenustring Function

Tip: 1. The identifier of the menu item is stored in the lower two of the lparam parameter of the wm_menuselect message. 2. wm_menuselect also includes messages sent from the system menu. 3. Because the top-level menu (file edit help)

Windows Programming [20]-change menu items and line feed

In this example: Resource file (testres. Rc) used in this example ): Mymenu1 menuexbegin menuitem "file", 101 menuitem "add", 102end This exampleCodeFile: Program project1; {$ R 'testres. res ''testres. RC '}

Windows Programming [19]-change the menu item status: getmenustate, enablemenuitem

In this example: Resource file (testres. Rc) used in this example ): Mymenu1 menuexbegin menuitem "menu", 101 menuitem "Change My prohibition and non-Prohibition status", 102 menuitem "change", 103end This

Windows Programming [11]-wm_size message

In this example: Program project1; uses Windows, messages; {custom process for wm_size message calling} procedure onsize (H: hwnd); var rect: trect; Pt: tpoint; Buf: array [0 .. 255] of char; begin getwindowrect (H, rect); {retrieve window

Total Pages: 1789 1 .... 446 447 448 449 450 .... 1789 Go to: GO

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.