原创 程序2-1 SCRNSIZE程序

program Scrnsize;uses  windows; procedure MessageBoxPrintf(Caption, Format: PChar; const Args: array of const);var  Out

原创 程序5-2 Sinewave

program Sinewave; uses  Windows,  Messages,  Math;const  NUM = 1000; function WndProc(hWindow: HWND; msg, wParam, lPara

原创 程序5-7 RandRect

program RandRect;//程序5-7 RandRectuses  Windows, Messages;var  cxClient, cyClient: LongWord; procedure DrawRectangle(hWi

原创 以面向對象方式撰寫的SDK程序包含了VCL的消息循環的精髓

program Project3; uses  Windows,  Messages; type  TWndMethod = procedure(var Message: TMessage) of object;{這句類型聲明的意思是:T

原创 回調函數到對象方法Thunk技術(轉載自http://blog.csdn.net/wr960204/archive/2008/01/29/2071480.aspx)

構造一個通用的回調Thunk.(把回調函數指向對象的方法)最近又看到了VCL代碼中的MakeObjectInstance函數,實際上是一段WndProc的Thunk代碼.再一次感嘆VCL設計之精巧,效率之高.不喜歡MFC的消息映射方式,M

原创 自省

這幾天,發生了兩件事,一個是給同學 幫忙改戶口,一個是同事張老師讓我查浙江嘉興的由來並發短信通知王老師,這兩件事我處理的都不好,唉,爲此我做了自省,總結了一下三點,寫在這裏,時刻提醒自己。     1、要學會看到別人的長處、優點。人們大多

原创 程序5-8 Clover

program Clover;//程序5-8 Cloveruses  Windows, Messages, Math; function WndProc(hWindow: HWND; Msg, wParam, lParam: LongIn

原创 程序5-5 AltWind

program Altwind; uses  Windows, Messages; function WndProc(hWindow: HWND; Msg, wParam, lParam: LongInt): LRESULT; stdca

原创 程序1-1 HelloMsg

 program HelloMsg; uses  Windows;begin  MessageBox(0, 'Hello Windows 98!', 'HelloMsg', 0);end. 點贊 收藏 分享

原创 //程序5-6 WhatSize

program WhatSize;//程序5-6 WhatSizezeuses  Windows,  Messages; procedure Show(hWindow: HWND; hWndc: HDC; xText, yText, iM

原创 程序5-3 LineDemo

program LineDemo; uses  Windows, Messages; function WndProc(hWindow: HWND; msg, wParam, lParam: LongInt): LRESULT; stdc

原创 程序5-4 Bezier

program Bezier; uses  Windows,  Messages; procedure DrawBezier(hdc1: HDC; apt: array of TPoint);begin    PolyBezier(hdc

原创 變體記錄及存儲方式(轉載自 http://www.cnblogs.com/okwary/articles/1364018.html)

DELPHI中記錄的存儲方式 在DELPHI中,我們用record關鍵字來表明一個記錄,有時候,我們還會看到用packed record來聲明的記錄,這二者的區別就在於存儲方式的不同;在windows中,內存的分配一次是4個字節的,而

原创 爲cxGrid增加行號(http://blog.csdn.net/estudy2008/archive/2007/08/09/1733546.aspx)

其實這個方法就是cxGrid範例中提供的,原範例在CellLevelMultiselectDemo目錄下 把cxGridView裏OptionsView選項中的兩項修改成如下       OptionsView.Indicator = T

原创 cxGrid使用技巧 轉載自http://topic.csdn.net/t/20060106/09/4500997.html#

小技巧:用代碼展開/收縮主從結構     Self.tvDepartment.ViewData.Expand(True);     Self.tvDepartment.ViewData.Collaspe(True);     注:tvDe