Click here to Skip to main content
15,892,480 members
Articles / Programming Languages / C++

Using the Windows RunFile Dialog - The Documented and Undocumented Way

Rate me:
Please Sign up or sign in to vote.
4.64/5 (13 votes)
8 Aug 20023 min read 119.4K   1.8K   18  
An article describing how to use system RunFile dialog, both documented and undocumented way
// RunFileDlgDlg.h : header file
//

#if !defined(AFX_RUNFILEDLGDLG_H__A1B19D61_8B4F_41FE_AC07_BABE00CF1D3F__INCLUDED_)
#define AFX_RUNFILEDLGDLG_H__A1B19D61_8B4F_41FE_AC07_BABE00CF1D3F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CRunFileDlgDlg dialog

class CRunFileDlgDlg : public CDialog
{
// Construction
public:
	CRunFileDlgDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CRunFileDlgDlg)
	enum { IDD = IDD_RUNFILEDLG_DIALOG };
	
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRunFileDlgDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support	
	//}}AFX_VIRTUAL

public:
	BOOL CRunFileDlgDlg::RunDocumented( void );

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CRunFileDlgDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonRun();	
	//}}AFX_MSG
	void OnRunFileDlgOK( NMHDR* pNMHDR, LRESULT* pResult );
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RUNFILEDLGDLG_H__A1B19D61_8B4F_41FE_AC07_BABE00CF1D3F__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Software Developer (Senior) SafeNet Inc
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions