Link to home
Start Free TrialLog in
Avatar of ravikirang
ravikirang

asked on

Common dialog controls using ATL

hi i have to use common dialog control using atl.
i used my code as below,
i got error as interface ICommonDialog not found.
is there any better way,
thanks in advance
What is the header file i have to use

#import "c:\winnt\system32\comdlg32.ocx"

CComPtr<ICommonDialog> sp_CmnDlg;

CoCreateInstance(__uuidof(CCommonDialog), ..., ...

sp_CmnDlg->ShowOpen();

ravi.
ASKER CERTIFIED SOLUTION
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ravikirang
ravikirang

ASKER

thanks mr ramson, it worked for me. could u tell me changes for save dialog box.
For that u can use GetSaveFileName API

GOOD LUCK