[an error occurred while processing this directive]
Ответ: а MSDN безотносительна к студии, она годами датируется. Вот из июля 2004 (+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено DASM 17 декабря 2005 г. 01:59
В ответ на: У кого МСДН6 есть, несочтите за труд проверить отправлено колян безпарольный 17 декабря 2005 г. 01:47


Call this function to display the Windows common file dialog box and allow the user to browse files and directories and enter a filename.

virtual INT_PTR DoModal( );
Return Value
IDOK or IDCANCEL. If IDCANCEL is returned, call the Windows CommDlgExtendedError function to determine whether an error occurred.

IDOK and IDCANCEL are constants that indicate whether the user selected the OK or Cancel button.

Remarks
If you want to initialize the various file dialog-box options by setting members of the m_ofn structure, you should do this before calling DoModal, but after the dialog object is constructed.

When the user clicks the dialog box's OK or Cancel buttons, or selects the Close option from the dialog box's control menu, control is returned to your application. You can then call other member functions to retrieve the settings or information the user inputs into the dialog box.

DoModal is a virtual function overridden from class CDialog.

Example
void CChildFrame::OnFileOpen()
{
// szFilters is a text string that includes two file name filters:
// "*.my" for "MyType Files" and "*.*' for "All Files."
char CChildFrame::szFilters[]=
"MyType Files (*.my)|*.my|All Files (*.*)|*.*||";

// Create an Open dialog; the default file name extension is ".my".
CFileDialog fileDlg (TRUE, "my", "*.my",
OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);

// Display the file dialog. When user clicks OK, fileDlg.DoModal()
// returns IDOK.
if( fileDlg.DoModal ()==IDOK )
{
CString pathName = fileDlg.GetPathName();

// Implement opening and reading file in here.
...
//Change the window's title to the opened file's title.
CString fileName = fileDlg.GetFileTitle ();

SetWindowText(fileName);
}

}
See Also


Составить ответ  |||  Конференция  |||  Архив

Ответы


Отправка ответа

Имя (обязательно): 
Пароль: 
E-mail: 
NoIX ключ Запомнить

Тема (обязательно):
Сообщение:

Ссылка на URL: 
Название ссылки: 

URL изображения: 


Rambler's Top100 Рейтинг@Mail.ru
Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание

E-mail: info@telesys.ru