// 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 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 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
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;
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:
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
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:
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
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;
// 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
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
// 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
// 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}
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