Winapi: getdiskfreespaceex-Get disk capacity information

// Declaration: getdiskfreespaceex (lpdirectoryname: pchar; {disk root path} var lpfreebytesavailabletocaller: tlargeinteger; {available space} var lptotalnumberofbytes: tlargeinteger; {total space} totalfree: plargeinteger {available space}): bool;

Winapi: getlogicaldrives-Identify the logical drive in the system

// Declaration: getlogicaldrives: DWORD; {No parameter} // return value: 1 on the right of the binary returned value indicates that drive a: exists; the second right of the binary value returned is 1, indicating drive B: exists... and so on. //

When is the global variable hinstance assigned?

When learning resource files and hook functions, we often use the global variable of the current module handle (hinstance). Today I want to know when it assigns a value. Enter hinstance; "Ctrl + mouse" to find its declaration: Row 29th of the

A method to obtain the maximum value of an unsigned integer:

// A method for obtaining the maximum value of an unsigned integer: Procedure tform1.button1click (Sender: tobject); var {there are only three unsigned integer types in Delphi standard} num_byte: byte; num_word: word; num_cardinal: Cardinal; {There

Sysutils. strlcopy, sysutils. strpcopy, sysutils. strplcopy

Strlcopy only has a limited length parameter than strcopy; strpcopy is equivalent to strcopy; strplcopy is equivalent to strlcopy. Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs;

Sysutils. strend, sysutils. strlen

Strend gets the pchar string without a pointer; strlen gets the pchar String Length. Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1:

Demonstrate the anchors attribute of the control

In this example: Preparation: after creating a new project, add a panel and four checkboxes on the form. Double-click them to generate default events, and select all Code And overwrite the following code. Unit unit1; interfaceuses

Sysutils. comparestr, sysutils. comparetext-string comparison

Comparestr is case sensitive; comparetext is case insensitive. Example: VaR S1, S2: string; I: integer; begin S1: = 'abc'; S2: = 'adc '; I: = comparestr (S1, S2 ); showmessage (inttostr (I); {-2} I: = comparetext (S1, S2); showmessage (inttostr

Learn to use tstringgrid [8]-font list

In this example: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls, grids; Type tform1 = Class (tform) stringgrid1: tstringgrid; procedure stringgrid1click

Winapi: alphablend-image transparency

Alphablend (DC: HDC; {target device environment handle} P2, P3, P4, P5: integer; {target location and width and height} dc6: HDC; {Source Device environment handle} P7, p8, P9, P10: integer; {source location and width and height} P11: tblendfunction

Learning the implementation of the tlist class [3]-unavoidable topic: Memory Allocation

We can use the following three methods to apply for the required memory for pointers (for example, pointers of the double type: VaR PD: pdouble; begin new (PD); PD ^: = 99.9; showmessage (floattostr (PD ^); {99.9} dispose (PD); end; VaR PD:

Use clipboard [5]: setashandle, getashandle-custom format

If you want to store your own format in the clipboard, you need to use the setashandle and getashandle methods. Setashandle (the format ID used for the clipboard, the memory handle of the data); the two parameters of this method are a bit

Use the hook function [2]

Although there are not many hook functions, their parameters are complex. You should start with the parameters before proceeding. Unhookwindowshookex only needs the hook handle returned by setwindowshookex as the parameter, which is simple;

Winapi: settextjustification-set the alignment between the two ends

// Declaration: settextjustification (DC: HDC; {Device environment handle} breakextra, {width} breakcount: INTEGER {divided into several parts; generally separated by spaces}): integer; {A non-0 value is returned for success; a 0 value is returned

Sysutils. strlcomp, sysutils. strlicomp

Strlcomp and strlicomp are basically the same as strcomp and stricomp, but a parameter is used to specify the valid length. Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs; Type tform1

System. New, system. Dispose-apply for and release memory for a pointer

Example: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; button3: tbutton; Procedure button1click

Winapi: getlocaltime, setlocaltime, and setsystemtime-Get and set the system time

// Declare getlocaltime (VAR lpsystemtime: tsystemtime {tsystemtime structure}); {No return value} // set the local time setlocaltime (const lpsystemtime: tsystemtime {tsystemtime structure}): bool; // setsystemtime is set to the Greenwich Mean Time

Winapi: setwindowpos-change the position and status of the window

// Declaration: setwindowpos (hwnd: hwnd; {window handle} hwndinsertafter: hwnd; {window Z sequence} X, Y: integer; {location} CX, Cy: integer; {size} uflags: uint {Option}): bool; // optional value of hwndinsertafter parameter: hwnd_top = 0;

Winapi: drawframecontrol-draw Control

// Declaration: drawframecontrol (DC: HDC; {Device environment handle} const rect: trect; {rectangle} utype, ustate: uint {control type and control status}): bool; // optional value of the control type utype parameter: dfc_caption = 1; {Title button}

Use tstringgrid [7]-colwidths [0], rowheights [0], and gridlinewidth

In this example: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls, grids; Type tform1 = Class (tform) stringgrid1: tstringgrid; outputs: tpanel; outputs: tbutton;

Total Pages: 64722 1 .... 27093 27094 27095 27096 27097 .... 64722 Go to: GO

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.