how to call File Open dialog box function from File Menu (Open menu)?
-
Hi i am beginner of win32 Vc++. I create Menu item and call File open dialog box. I have a File Menu. it contains Open, save and exit menu items.I have file open dialog box function. Open menu item id is: ID_FILE_OPEN. my code like
case WM\_COMMAND: switch(wParam) { case IDOK: EndDialog(hWndDlg, 0); return TRUE; case IDCANCEL: EndDialog(hWndDlg, 0); return TRUE; case ID\_FILE\_OPEN: OnFileOpen(hWnd, ID\_FILE\_NEW, 0, 0); break; }
But error is come like ID_FILE_OPEN' : undeclared identifier how to fix this? Regards, M.Mathivanan
-
Hi i am beginner of win32 Vc++. I create Menu item and call File open dialog box. I have a File Menu. it contains Open, save and exit menu items.I have file open dialog box function. Open menu item id is: ID_FILE_OPEN. my code like
case WM\_COMMAND: switch(wParam) { case IDOK: EndDialog(hWndDlg, 0); return TRUE; case IDCANCEL: EndDialog(hWndDlg, 0); return TRUE; case ID\_FILE\_OPEN: OnFileOpen(hWnd, ID\_FILE\_NEW, 0, 0); break; }
But error is come like ID_FILE_OPEN' : undeclared identifier how to fix this? Regards, M.Mathivanan
In your menu in the Resources window you will have specified a value for the menu item File>Open. You can find this value in the properties window (View->Other Windows->Properties Window) and click on the Open item in the file menu in the resource editor. The value will also be
#define
'd in the Resource.h file, so be sure to#include "Resource.h"
-
In your menu in the Resources window you will have specified a value for the menu item File>Open. You can find this value in the properties window (View->Other Windows->Properties Window) and click on the Open item in the file menu in the resource editor. The value will also be
#define
'd in the Resource.h file, so be sure to#include "Resource.h"
Thanks. i understand. now its working.