CoMondialog provided by Windows in MFC

xiaoxiao2021-03-05  19

In the project, the project -> add to project -> Components and Controls, the selection window appears, enter the directory registered activex controls, find and select Microsoft Common Dialog Control, Version 6.0, then click the INSERT button, this time the VC will make you choose A derived class name, enter CCOMDLG in ClassName, which will automatically insert a new CWnd derived ccomdlg in the project. You can use the common system inserted in the use of the usage, you can use it. code show as below:

CCOMDLG * m_pcdlg = new ccomdlgm_pcdlg-> Create ("CommonDialog", WS_CHILD | WS_VISIBLE, CRECT (0, 0, 20, 20), THIS, 1234); m_pcdlg-> setDialogtitle ("Select Save Path"); m_pcdlg-> setinitdir ("C: //"); m_pcdlg-> showsave ();

More use methods can refer to class methods declared in Commondialog.h.

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

New Post(0)