当前位置: 代码迷 >> Windows Mobile >> 为什么小弟我每次创建菜单后都出现fatal error RC1015: cannot open include file 'afxres.h'
  详细解决方案

为什么小弟我每次创建菜单后都出现fatal error RC1015: cannot open include file 'afxres.h'

热度:93   发布时间:2016-04-25 07:47:05.0
为什么我每次创建菜单后都出现fatal error RC1015: cannot open include file 'afxres.h'.
为什么我每次创建菜单后都出现fatal   error   RC1015:   cannot   open   include   file   'afxres.h '.。。
我创建菜单后,就inclue   "resource.h "
然后编译   每次都是这个错误   为此   我实验过   重装evc   \sdk\但是还是   这样   所以求救。。还有   一个问题我写的创建按钮的菜单为什么没有效果。
case   WM_CREATE:
buttonhwnd=CreateWindow(TEXT( "button "),TEXT( "button "),WS_CHILD   |   WS_BORDER,20,20,40,40,hwnd,NULL,hIn,NULL);
        ShowWindow(buttonhwnd,SW_SHOWNORMAL);

ZeroMemory(&mbi,   sizeof(mbi));
mbi.cbSize   =   sizeof(SHMENUBARINFO);
mbi.hwndParent   =   hwnd;
mbi.nToolBarId   =   IDR_MENUBAR1;//IDC_MENU
mbi.hInstRes   =   hIn;

if   (FALSE   ==   SHCreateMenuBar(&mbi))
{
return   FALSE;
}  
return   0;


上面那个createwindow中的hwnd   是窗口的句柄   hIn也是主窗口的hinstance..为什么啊   ?谢谢     鞠躬


------解决方案--------------------
我用的是vc,打开别人程序时出现fatal error RC1015: cannot open include file 'afxres.h ',照一楼说的在:安装路径里查查 'afxres.h '的具体位置。找到后然后在vc工具栏tools->options->directories,inculdes里添加了这个目录就好了。
  相关解决方案