Write registry management programs with VC6

zhaozj2021-02-08  233

Write registry management programs with VC6 (-)

Solarsoft

Abstract This article gives a detailed introduction to the development of similar registry management programs.

Keyword regedit, registry management

On the market, there are many registry management procedures, such as magical rabbits, IE protector, etc. However, they are fixed to the registry, which is not enough for the senior administrator of Windows, and often used regedit, how is it designed? After analyzing it, it is mainly divided into the following 1, the display and operation of the registry data; 2, the import and export of registry data; 3 Finding and replacement of the registry data. The following describes the implementation of the display and operation of the registry data in VC6. An explanation will be made in the next two points.

The program running interface is as follows:

Create a single document in VC6, you can name regexplorer, before 5 steps can be performed by default, in STEP6 of the AppWizard dialog, select the base class of the view class as ClistView.

To support the expression of the tree and the list, you must also add the CREGLEFTVIEW class manually, the base class is CTREEVIEW. And the communication and display of various objects are required.

Some modifications to the InitInstance () of the Cregexplorerapp class

PDOCTEMPLATE = New CSINGLEDOCTEMPLATE

IDR_MAINFRAME,

Runtime_class (CREGEXPLORDOC),

Runtime_Class (CMAINFRAME),

Runtime_class (cregleftView)); // This is CREGEXPLORERVIEW

Add a PROTECTED-type member variable in the CMAINFRAME class CSPLITTERWND M_WNDSPLITER to implement the segmentation of the window, add #include "regleftview.h" in mainfrm.cpp.

Bool CMAINFRAME :: OnCreateClient (lpcreateStruct LPCS, CCReateContext * PContext)

{

IF (! m_wndsplitter.createstatic (this, 1, 2))

Return False;

IF (! M_Wndsplitter.createView (0, 0, Runtime_Class (CregleftView), CSIZE (100, 100), PCONTEXT) ||

! m_Wndsplitter.createView (0, 1, Runtime_Class (CregexplorerView), CSIZE (100, 100), PCONText))

{

m_wndsplitter.destroyWindow ();

Return False;

}

M_Wndsplitter.SetColumnInfo (0, 200, 100);

Return True;

}

Class CregexplorerView can be added to the class definition of document CREGEXPLORERDOC; and join the public type CREGEXPLORVIEW pointer * m_regExplorerView; use the document class to communicate between objects. Design of the left tree CREGLEFTVIEW class: 1. And code for communicating the document class: class CRegExplorerDoc added prior to the class definition; and implement type public member functions CRegExplorerDoc * CRegLeftView :: GetDocument in class () {ASSERT (m_pDocument-> IsKindOf (RUNTIME_CLASS (CRegExplorerDoc))); return CregExplorerdoc *) m_pdocument;

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

New Post(0)