Some practical tips for VC (=)

zhaozj2021-02-11  199

11: How to quickly generate a new project that is exactly the existing project except for the project name?

Using the File menu to generate the Custom Appwizard in a new project, select An EXISTING Project, then select the project file name (* .dsp) finish of the existing project, then generate one can generate the same, which can be the same but you can re-name Project AppWizard. You can use it like MFC AppWizard. If you don't want to use it, you can delete this Wizard and .pdb file in the COMMON / MSDEV98 / TEMPLATE directory in the VC installation directory.

12: How to locate the cursor to the symmetrical {} and #IF, #ENDIF?

The former uses Ctrl and "}" keys, the latter uses Ctrl and "K" keys.

13: How do I set the header file and library file in the VC?

In addition to the VC default header files and library files, if you often use a third-party header file and library files can be set in the Directories for Tools Options. If you are just this project, you can set the library file in the Project Setting-> Link Object / Library Modules.

14: If the console application supports the MFC class library?

INCLUDE can be in the console application

To introduce the MFC library, but the console application is a single-thread, the MFC is multi-threaded, in order to solve the contradiction, in the Project Setting-> C / C option, select Code Generation, in the Use Run-Time Library drop-down box Select Debug Multithread.

15: How to add an ODBC function for an MFC application?

(1) Add the following line at the end of the file stdafx.h file:

#include

// MFC ODBC Database Classes

(2) Edit the RC file in text mode (using the file-> open as text)

Drawings in the following procedures (two places)

#include "l.chs / afxprint.rc" // Printing / Print Preview Resources

Add a next line:

#include "l.chs / afxdb.rc" // Database Resources

16: How do I quickly update a CRecordset recordset that binds to a table after the database table changes?

Use UpdateColoumns and Bind ALLs after selecting the record category under the MEMBER VARIABLES tab.

17: How to Chinese only if there is an executable code ?exe file?

Using VC Open file in NT to open the * .exe file in the resources method, the resource file is directly modified, and then saved.

The above is just some small problems that are often encountered by the first school VC, hoping to learn together with you.

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

New Post(0)