Play the IDE of BCB, experience Toolsapi

zhaozj2021-02-08  219

Most BCB programmers may not have to care for Toolsapi in their lives, but if you are bored like me, you may wish to play and discuss: Take a look at the following procedure, come to change the IDE:

---> BCB5.

0 / / ----------------------------------- ---------------------------- # include #pragma hdrstopuseres ("nodebug.res"); usepackage ("VCL50 .bpi "); // ------------------------------------------- -------------------------------- # include #include // -------------------------------------------------- ----------------------- # prgma package (smart_init) // ------------------- -------------------------------------------------- ------ // package source.//------------------------------------- -------------------------------------- Namespace Nodebug // Here The namespace Should Be Same with THIS File name. {BOOL NEEDLOCALIZE = true; Bool Needwritetoini = false; tinifile * ini, * chsini; Ansistring Section, Ident, Value; / / === [do Something On Menuitems.] ========== ====================================================================================================================================================== = false) Menuitem-> Visible = true; if (NE Edwritetoini &&! Menuitem-> name.isempty ()) {ident = menuitem-> name; value = menuitem-> caption; ini-> writeString (section, ide, value);}} // === [Do Something ON Menuitems.] ============================================= / / === [Enumerate All Menuitem '

S Subitems.] ======================================= Void __fastcall enumerateMenuiteM (TMenuItem * MenuItem) {DomenuItem (MenuItem); for INT i = 0; i count; i ) {enumerateMenuItem (MenuItem-> items [i]);}} // === [Enumerate All MenuItem's Subitems.] ========== ==================== Void __fastcall localizeAppmenu () {_di_intaservices IDE; HRESULT HR = BorlandIDeServices-> queryinterface (__ uuidof (intaservices), (void **) & IDE); IF (succeededed (hr)) {// ---------- [AppBuilder Macro Start] ------------------------- ------------- #ifndef AppBuilder #define AppBuilder IDE-> MainMenu-> Owner #ENDIF / / ---------- [AppBuilder Macro End] ----- -------------------------------- TStringList * SectionList = new TSTRINGLIST; TSTRINGLIST * IDENTLIST = New TstringList; Ansistring Value, DEFAULT ("null"); try {chsini -> readsections (sectionList); for (int i = 0; i count; i ) {chsini-> readsection (sectionList-> strings [i], identlist); for (int x = 0; x count; x ) {value = chsini-> readstring (sectionList->

Strings [I], Identlist-> strings [x], "null"); if (default! = Value) {tmenuitem * mi = Dynamic_cast (AppBuilder-> FindComponent (Identlist-> strings [x])))))) ; If (mi! = Null) mi-> caption = value;}}}} #undef appbuilder __finalList;}}} // === [bpl's 'main' function or entry function.] = ======================= void __fastcall package register () {ini = new tinifile (CHANGEFILEXT (Application-> Exename, ".ini")); chsini = New Tinifile (ChangefileExt (Application-> Exename, "Chs.ini")); if (NeedLocalize) localizeAppmenu (); _di_intaservices IDE; hres Ult hr = borlandideServices-> queryinterface (__ uuidof (intaservices), (void **) & IDE); if (succeededed (hr)) {// ---------- [AppBuilder Macro Start] ------ ---------------------------------- #ifndef AppBuilder #define AppBuilder IDE-> MainMenu-> Owner #ENDIF / / ---------- [AppBuilder Macro End] ---------------------------------- ---- for (int i = 0; i componentcount; i ) // companyTcount = 409 {ified (appbuilder->

Components [I] -> ClassNameis ("TmainMenu") // MainMenu1 {// ---------- [AppMainMenu Macro Start] -------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- # 1fnderf AppmainMenu #define AppmainMenu Dynamic_cast (AppBuilder-> Components [i]) #ENDIF / / ------ ------ [AppMainMenu Macro End] ------------------------------------ for (int x = 0; x items-> count; x ) // count 11 {if (needwritetoini) section = AppmainMenu-> items-> items [x] -> name; enumeratementMenuItem (AppmainMenu-> items- > Items [x]);} // for finished. # Indef AppmainMenu} // for finished #undef appbuilder} else showMessage ("Error: i can set ide./NYOU'D Better Unload "); delete ini; delete chsini;} // === [B PL's 'main' function or entry function.] =================================} // Namespace Finished.int WinAPI DLLENTRYPOINT (Hinstance Hinst, Unsigned Long REASON , void *) {return 1;} // --------------------------------------- ------------------------------------ I am not going to get a bright day version of BCB! !

Here is the Chinese cultural file I wrote. Put / bin, called BCBCHS.INI [FileMenu] FileMenu = File (& f) FilenewItem = New (& n) ... filenewapplicationItem = New Program FilenewFormItem = New Form (& F) FilenewIitithm = New Unit (& U) FilenewFrameItem = New frame (& m) FileOpenSeparater = -FileOpenItem = open FileOpenProjectItem (& O) ... = open project (& j) ... FileClosedFilesItem = (& R) FileSaveSeparater = -FileSaveItem reopen = stored (& S) FileSaveAsItem = save as (& A) ... FilesaveProjectas = Over-Project Save (& E) ... FilesaveAllItem = All Save (& V) FileClosem = Close (& C) FileCloseallItem = All Close (& L) FileMenuseParetor = -fileuseunititem = Contains Unit Head File (& I) ... FilePrintItem = Print (& P) ... FileExitItem = Exit (& X) [EditMenu] EditMenu = Edit (& E) EditundoItem = Cancel (& U) EditredoItem = Recovery (& R) EditcutItem = Cut (& T) EditCopyItem = Copy (& C) EditPastem = Paste (& P) EditdeeteItem = Delete (& D) EditSelectall = All Delete (& l) EditAlngridItem = Press Grid Alignment (& G) EditFrontItem = Control Advance (& F) EditBackItem = Control (& B) EditalignItem = Control Align (& A) .EditsizeItem = control size (& S ... EditScaleItem = control scale (& e) ... EdittaborderItem = Tab DESID (& O) ... EditCreationOrderItem = Control Creation Order (& n) ... EditflipChildrenItem = Mirror Sub-control (& H) EditflipChildrenAllItem = All (& a) editflipchildrenselectedItem = selected (& S) EditlockContr Olsitem = Lock Control (& K) CorbaEditseParetor = -

[SearchMenu] SearchMenu = Search (& S) SearchFindItem = Find (& f) ... SearchFileFindItem = Multi-file lookup (& D) ... SearchReplaceItem = Replacement (& R ... SearchagainItem = Reicing (& S) SearchIncremenTalItem = Increment Search (& I) SearchgotoItem = Jump to the specified line number (& g) ... SearchGotoadDressItem = Jump to the specified address (& E)

[ViewsMenu] ViewsMenu = See ViewPrjMgrItem (& V) = Project Manager (& P) TransMgrMenu = Translation Manager ViewObjInspItem (& M) = Object Viewer (& O) ViewToDoListItem = To-Do list (& L) ViewAlignItem = Align Panel (& A) CodeExplorer = class browser (& x) ViewCompListItem = list of components ViewWindowListItem (& C) = window list ViewDebugItem (& W) ... = debug window ViewBreakpointsItem ViewCallStackItem (& D) = breakpoints (& B) = call stack ViewWatchesItem = & WatchesViewLocalVariablesItem (& S) = partial variable (& L) ViewThreadsItem = thread (& T) ViewModulesItem = module ViewEventLogItem (& M) = event record (& E) ViewCodeGuardLogItem = CodeGuard recording ViewCPUItem = & CPUViewFPUItem = & FPUAltViewCallStackItem = AltViewCallStackItemAltViewCPUItem = AltViewCPUItemViewDesktopsMenu = table (& k) SaveDesktop1 = save the desktop (& S) .. .Deletedesktop = Delete (& T) ... setbugdesktop1 = Settings Debug Desktop (& D) ViewToggleFormItem = Switch Form / Unit (& G) ViewUnitItem = Unit (& U) ... ViewFormItem = Form (& f) ... ViewTypeLibraryItem = Type Library (& T) ViewNeweditorItem = New Edit Window (& E) ViewToolbarsItem = Toolbar (& R) ViewswapSourceFormItem = Press text (& V) ViewNextWindowItem = Next window (hidden item)

[ProjectMenu] ProjectMenu = Engineering (& P) ProjectAddItem = added to the project (& A) ... ProjectRemoveItem = introducing type library (& L) ... ProjectAddRepositoryItem = is removed from the project (& R) ... ProjectImportTypeLibraryItem = added to the repository (& t ... ViewPrjSourceItem = View Source File (& V) InternationalMenu = Language (& G) AddLangMenu = Add (& A) ... RemovelandMenu = Remove (& R) ... setActiveLangMenu = Set the activation (& S) ... (< no>) UpdateResDLLMenu = upgrade resources (& U) DLLsProjectViewMakefileItem = compiler option to edit the source file (& p) ProjectExportMakefileItem = output Makefile ... N2 = -ProjectAddNewProjectItem = Add a new project (& N) ... ProjectAddExistingProjectItem = Add existing project (& x) ... ProjectCompileSeparator = -ProjectCompileUnitItem = compilation unit (& C) ProjectCompileItem = & MakeProjectBuildItem = & BuildProjectInformationItem = & Engineering information N1 = -ProjectCompileAllItem = Make the whole project (& k) ProjectBuildAllItem = Build the entire project (& u) ProjectSeparator = -ProjectDepOptItem = Web publishing options ( & W) ... ProjectDeployItem = Web Publish (& D) ProjectseParator2 = -ProjectOptionsItem = Option (& O) ...

[RunMenu] RunMenu = Run (& R) RunRunItem = Run RunAttachtoProcessItem RunUnregisterComItem (& R) = attached to the process (& o) ... RunParametersItem = operating parameter (& P) ... RunRegisterComItem = Register ActiveX Server (& A) = cancellation Activex server ( & X) RunParametersSeparator = -RunStepOverItem = single step step Over (& RunTraceIntoItem S) = single step trace into (& T) RunTraceToSourceItem = track to the next row source (& N) RunGotoCursorItem = running to the cursor (& RunUntilReturnItem C) = run to the call returns (& U RunshowCSIPITEM = Display execution point (& H) RunpauseItem = program pause (& g) runresetitem = program reset (& e) runinspectseParetor = -RuninspectITEM = Inspection (& i) ... runevalmoditem = evaluation / modification (& V) ... RunadDwatchItem = Add Watch (& W) ... RunAddBreakItem = Add breakpoints (& B) RunAddSourceBreakpointItem = source breakpoints (& S) ... RunAddAddressBreakpointItem = address break (& A) ... RunAddDataBreakpointItem = data breakpoints (& D) ... RunAddModuleLoadBreakpointItem = Module Load Breakpoint (& M) ... [ComponentMenu] ComponentMenu = Component (& C) ComponentnewItem = New Components (& N) ... ComponentAddtopackage = Installation Components (& I) ... ComponentImportaxcitem = Introduced ActiveX Control (& X) .. .ComponentInstallCompositiveItem = Create a component template (& T) ... ComponentInstallPackagesItem = Installation Pack (& ​​P) ... ComponentPalettetem = Settings panel (& C) ...

[DatabaseMenu] DatabaseMenu = Database (& D) Borland_dbexplorerMenu = Browse (& E) Borland_SqlmonitorMenu = SQL Monitor (& S) Borland_FormWizardMenu = Form Wizard (& f) ...

[ToolsMenu] ToolsMenu = Tool (& T) ToolsOptionsItem = Environment Options (& O) ... ToolseditorOptionsItem = Editor Options (& E) ... ToolsdebuggerOptionsItem = Debugger Options (& D) ... IteoptionsMenu = Translation Tools Options (& n). ..ToolSgalleryItem = Warehouse (& R) ... repositorymenu = Translate warehouse (& A) ... CORBATOOLSSEPARATOR1 = -corbatoolsseparator2 = -toolstoolsitem = Setting Custom Tool (& T) ...

[HelpMenu] HelpMenu = help (& H) HelpContentsItem = C Builder help HelpCBuilderToolsItem = C Builder Tools (& T) HelpWinSDKItem = Windows SDK (& W) HelpInprisePage = Borland home page (& B) HelpCommunityPage = Borland Forum Home HelpCBuilderPage = C Homepage Builder (& P) HelpDevSupportPage = C Builder support development DirectItem (& S) = C Builder train (& r) ... HelpProgGuideSeparater = -HelpCustomizeItem = custom (& t) ... HelpAboutSeparator = -HelpAboutItem = about (& A) ... The problem is that the database menu is not effective.

转载请注明原文地址:https://www.9cbs.com/read-2230.html

New Post(0)