跳到主要內容

發表文章

目前顯示的是 六月, 2013的文章

DBGrid scrolling (滾動條事件) 生成

C++ Builder的DBGrid比較麻煩,可以的話還是從Delphi建一個後再使用帶入使用吧。
/* JDBGrid.h文件内容 */ //------------------------------------------------------------------------- #ifndef JDBGridH #define JDBGridH //------------------------------------------------------------------------- #include #include #include #include #include //------------------------------------------------------------------------- class PACKAGE TJDBGrid : public TDBGrid { enum TDBGridOption{ dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect ,dgThumbTracking,dgMouseWheel}; typedef Set TDBGridOptions; private: TDBGridOptions FOptions; protected: TWndMethod DBGridProc; TWndMethod DBInplaceEditProc; virtual void __fastcall JDBInplaceEditProc(Messages::TMessage &Message); …