vs小白问题,未声明标示符怎么改

图片说明
不会改啊 有没有大神给个大腿抱抱啊~

2个回答

fout不认识,缺头文件吧

u011261430
仅仅学会简单 回复萝莉君啊: 你这个回复图片看不清楚,可以加上 #include <fstream>试试,要不你可以加我QQ793762586
2 年多之前 回复
lxw923
萝莉君啊 回复仅仅学会简单: 怎么改呢![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/2.gif)
2 年多之前 回复

程序中的fout变量未声明,多看看c++中fstream中关于文件流的问题吧

lxw923
萝莉君啊 回复hpu刘: 好专业的感觉 没怎么懂![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/4.gif)
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
未声明的标示符?
d:\项目\hstkfb09050401\shygcconnection\SHYGCConnectionDlg.h(16): error C2065: “IDD_SHYGCCONNECTION_DIALOG” : 未声明的标识符rn错误定位在:rnenum IDD = IDD_SHYGCCONNECTION_DIALOG ;rn请问是什么原因,怎么解决?rn
未声明的标示符
我是初学者,在VS里用ADO连接sql2005时,用户名uid=test,总是显示是未声明的标示符,求解,高手指点。rn以下是我的代码:rnrnvoid ADOConn::OnInitADOConn(void)rnrnrn ::CoInitialize(NULL); //初始化OLE/COM库环境rn tryrn rn m_pConnection.CreateInstance("ADODB.Connection"); //创建Connection对象rn rn //设置连接字符串,必须是BSTR型或者_bstr_t类型rn _bstr_t strConnect="Data Source=LEN-SA13520045\SQLSERVER2005;Initial Catalog=data_base1;User ID=test;pwd=123456";rnrn m_pConnection->Open(strConnect,test,123456,adModeUnknown);rn
mfc 未声明的标示符
在class CVideoInputClientDlg : public CDialogEx中 enum IDD = IDD_VIDEOINPUTCLIENT_DIALOG ; 编译显示IDD_VIDEOINPUTCLIENT_DIALOG 未声明? 移到上面显示 #define IDD_VIDEOINPUTCLIENT_DIALOG 102 怎么回事
enum IDD = IDD_DIALOG1 ;未声明的标示符
我用的是VS2008,正在做MFC开发rn在一个头文件里面,编译之后出现一下结果rnenum IDD = IDD_DIALOG1 ;未声明的标示符rnrn系统是这样提示我的,但是我又在resource.h文件里可以找到rn#define IDD_DIALOG1 130rn是哪里出现问题了,在线求指教
为什么编译时报“HttpConnector 未声明的标示符”?
从网上拷贝的代码如下:rn#include rn#import "msxml4.dll" rnusing namespace MSXML2;rn#import "C:\Program Files\Common Files\MSSoap\Binaries\mssoap30.dll" \rn exclude("IStream", "IErrorInfo", "ISequentialStream", "_LARGE_INTEGER", \rn "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")rnusing namespace MSSOAPLib30;rnrnint test2()rnrnrn ISoapSerializerPtr Serializer;rn ISoapReaderPtr Reader;rn ISoapConnectorPtr Connector;rn rn // Connect to the servicern Connector.CreateInstance(__uuidof([color=#FF0000]HttpConnector[/color]));rn
LVNI_SELECTED未声明标示符//这个错误是什么原因?
如题!!!!!!
怎么改这个,小白请教
[img=http://img.my.csdn.net/uploads/201212/24/1356319575_3850.png][/img]rnpackage news;rnimport java.io.*;rnimport java.io.IOException;rnimport javax.servlet.http.HttpSession;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnpublic class AdminAction extends HttpServletrn PrintWriter out;rnpublic void doPost(HttpServletRequest request,rn HttpServletResponse response)rn throws IOExceptionrnrn response.setContentType("text/html;charset=gb2312");rn out=response.getWriter();rn HttpSession session=request.getSession(false);rn int adminid=(Integer)session.getAttribute("adminid");rn int power=(Integer)session.getAttribute("power");rn StrEncode SE=new StrEncode();rn String nid=request.getParameter("nid");rn int nnid = Integer.parseInt(nid);rn String cid=request.getParameter("cid");rn String action=request.getParameter("action");rn DBConn conn=new DBConn();rn tryrn NewsAdmin NA=new NewsAdmin();rn if(action.equals("1"))rn if (NA.canAdmin(adminid, nnid) || power > 10) rn NA.DeleNews(nnid);rn response.sendRedirect("index.jsp");rn rn elsern out.print("你无权操作!");rn rn rn if(action.equals("2"))rn int ccid=Integer.parseInt(cid);rn if (power > 10) rn NA.DeleComm(ccid);rn response.sendRedirect("shownews.jsp?nid="+nid);rn rn elsern out.print("你无权操作!");rn rn rnrn rn catch(Exception e)rn out.print("发表评论写入数据库失败!"+e.toString());rn rnrn public void doGet(HttpServletRequest request,rn HttpServletResponse response)rn throws IOExceptionrn rn doPost(request, response);rn rnrnrn
VS问题请教,小白不会用VS
![![![图片说明](https://img-ask.csdn.net/upload/201601/04/1451898196_154286.jpg)图片说明](https://img-ask.csdn.net/upload/201601/04/1451898185_659493.jpg)图片说明](https://img-ask.csdn.net/upload/201601/04/1451898174_328128.jpg)rnrnVS中在main函数所在的文件里包含了c.cpp,为什么图片中所示的错误,是自己包含的不正确吗rn![图片说明](https://img-ask.csdn.net/upload/201601/04/1451898400_98840.jpg)rn错误这样rn![图片说明](https://img-ask.csdn.net/upload/201601/04/1451898432_628336.jpg)
标示符
1:标示符  identifier     1.1跟名字有关    类名  文件名   变量名   方法名     1.2关键字public class     1.3命名规则         工程名MySecondPro         包名com.zhiyou.xxx反域名         文件名SecondClass         类名(同文件名)SecondClass  ...
VS怎么改内编码
RT,我用的中文版VS2005,如今在用IP控件时得到地址然后转换,再赋到那个地址结构,出现错误,转换后的赋给地址结构出问题了[code=C/C++]void CTestClientDlg::ConvertIpAddr()rnrn if( IpAddr.IsEmpty() || PortNum ==0)rn rn BYTE IP0,IP1,IP2,IP3;rn m_CIpAddr.GetAddress( IP0, IP1, IP2, IP3);rn //m_CIpAddr.GetAddress( &dwAddr);rnrn //CString str;rn //IpAddr.Format(_T("%d.%d.%d.%d"),(int)IP0,(int)IP1,(int)IP2,(int)IP3);rnrn m_CE_PortNum.GetWindowText( str);rn PortNum = _ttoi((LPTSTR)(LPCTSTR)str);rnrn if( IpAddr.IsEmpty() || PortNum ==0)rn rn MessageBox( _T("请输入IP地址和端口"),_T("警告"),MB_OK);rn return ;rn rn rn[/code][code=C/C++]CTestClient::CTestClient( )rnrn s = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP);rn if( s == INVALID_SOCKET)rn rn// MessageBox( NULL,"create socket failed","warning",MB_OK);rn rn ServAddr.sin_family = AF_INET;rn ServAddr.sin_port = htons( PortNum);rn //wchar_t szIpAdr[100]=0x00;rn //CString str;rn //str ="127.0.0.1";rn //ServAddr.sin_addr.S_un.S_addr = inet_addr( (LPSTR)(LPTSXX这里也是个宏,刚才被人删掉忘记了)IpAddr);rn ServAddr.sin_addr.S_un.S_addr = inet_addr( "127.0.0.1");rn //ServAddr.sin_addr.S_un.S_addr = inet_addr( &dwAddr);rnrnrn[/code]rn调试看时发现ipaddr没问题,赋给结构的时候少了第1字节,比如127.0.0.1就变成了0.0.0.1了。初步怀疑是编码问题,有些转换都要加_T,小弟接触WINDOW不久,希望各位帮帮忙
未声明的问题
初学delphi问个问题,这是我写的程序rnunit Unit1;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls;rnrntypern TForm1 = class(TForm)rn Label1: TLabel;rn Button1: TButton;rn Button2: TButton;rn procedure Button1Click(Sender: TObject);rn procedure Button2Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form1: TForm1;rnimplementationrnrn$R *.dfmrnrnprocedure TForm1.Button1Click(Sender: TObject);rnbeginrn Lable1.Caption:='这是我第一个delphi程序';rnend;rnrnprocedure TForm1.Button2Click(Sender: TObject);rnbeginrn close;rnend;rnrnend.rn运行结果是:unit1.pas(30):undeclared identifier:'lable1'rn project1.dpr(5): could not compile used unit 'Unit1.pas'rn怎么改呀。。未声明lable1么?
小白求救(vs)
本人小白一个刚刚接触C语言按照书上的例子写了一个程序不料出现了一下的情况还希望大神指教
VS使用小白
1.TAB键可以用来自动补全。 2.报错提示全部为中文,很方便。 3.新建控制台程序!! 4.安装时可以安装桌面开发。
vs code小白求教
vscode中写的图片不显示啊,求大佬们看看[face]monkey:50.gif[/face][face]monkey:50.gif[/face][face]monkey:50.gif[/face]
VS c2065 未声明的标识符 另外一种解决方案
有时候声明了变量,但是编译时通不过 就像这样 检查头文件也没错,怎么办? 改下编码~~  如果有中文注释的话,就要把文档格式改为 936(简体中文) 点击: “文件”->“高级保存选项” 然后修改编码即可
GetDriveType 标示符未定义的问题
刚学WIN API 。在使用GetDriveType的时候遇到提示说此标示符未定义。但是已经引用了windows.h 了 百度搜也没搜出个结果来。不解。。。rnrnBOOL GetDirverInfo(LPSTR szDrive)rnrn UINT uDriveType;rn DWORD dwVolumeSerialNumber;rn DWORD dwMaximumComponentLength;rn DWORD dwFileSystemFlags;rn CHAR szFileSystemNameBuffer[BUFSIZE];rn CHAR szDriveName[MAX_PATH];rn printf("\n%s\n", szDrive);rn uDriveType = [u]GetDirveType[/u](szDrive);rn
js标示符
js标示符命名规则:            1、包含字母、数字、下划线或者$            2、可以以字母、下划线或者$开头,不可以数字开头
标示符和关键字
标示符 什么是标示符? 开发人员在程序中自定义的一些符号和名称 标示符是自己定义的,如变量名 、函数名等 标示符的规则 标示符由字母、下划线和数字组成,且数字不能开头 思考:下面的标示符哪些是正确的,哪些不正确为什么 fromNo12 from#12 my_Boolean my-Boolean Obj2 2nd
小白进阶之贪心算法VS动态规划
贪心算法和动态规划 相同点:要求一个问题具有最优子结构的性质。 不同点:动态规划每一步都要进行一次选择,但是选择依赖于子问题的解;                贪心算法进行选择时,直接作出在当前问题中看来最优的选择,而不考虑子问题的解。 例如0-1背包问题就可以用动态规划解决而不能用贪心算法,但是分数背包问题就是用贪心算法解决而不是动态规划。 关于0-1背包问题,有一个很好的博文可以分
广告标示符(adId)  adfv标示符的那些问题
1.如何识别一个应用安装在同一个设备上呢? 2.如何识别一个企业的应用安装在同一个设备上呢? 苹果给我们提供了advertisingIdentifier 来解决问题1; 只要是同一台设备,那么advertisingIdentifier就是一样的 苹果给我们提供了identifierForVendor 来作为一个企业的app标示符 比
Python标示符
Python标示符: 以单下划线开头(_foo)的代表不能直接访问的类属性,需通过类提供的接口进行访问,不能用"from xxx import *"而导入; 以双下划线开头的(__foo)代表类的私有成员;以双下划线开头和结尾的(__foo__)代表python里特殊方法专用的标识,如__init__()代表类的构造函数。
未声明的标识符问题
本人现在刚开始学C++,下面是我写的一个程序,编译结果是year未声明标识符,我怎么都解决不了,拜托帮帮忙~~~~~rn#includernint run(int year)rn rn return (year%4==0 && year%100==0 || year%400==0);rnrnint count(int ys,int ms,int ds)rn rn int days=0;rn int m,d; rn for(m=1;m
未声明requirePermission属性问题!
我的这个网站以前就是普通的,今天我修改了webconfig(从建立的Ajax网站里面复制的),机器已经装了asp.net 2.0 Ajax Extensions 1.0,rn但是运行的时候显示:rnrnrnrn rnrn rn rn rnrnrnrnrnrn未声明requirePermission属性rn谁知道为什么 !
游标未声明的问题/急急!!
各为老大,我用的vb6+sql2000以前开发的系统,我重新装了sql2000后,并且重新建一个数据库(但内容不变),我用的是RDO/ADO 来连接的,当我在次配置ODBC 以后,装载应用程序时出现如下错误:rn 实时错误‘4002’rn 3700[misrosoft][ODBC SQL SERVER DRIVER][SQL SERVER]游标未声明rn rn请多多帮忙!!!rn
未声明的标识符的问题
我在doc.cpp里定义了一些变量,在view.cpp里添加了extern定义,这些一直都可以当作全局变量用。今天vs2008窗口布局出了点问题,我就在那调整,鼠标不太好用,结果呢,调整好后,程序就出问题了,那些原来都可以用的全局变量全出现“未声明的标识符”。解决方案和项目全都重新生成也没用。请问这是怎么回事啊,我可不想重新再建。谢谢!rnrn
变量未声明问题
我在模块里声明了如下枚举类型:rnPublic Enum CheckTypern AutoCheck '自动巡检rn HandCheck '手动巡检rn nocall '不巡检rn OneCall '单井操作rn GroupCall '井群操作rn End Enumrn然后在类模块里声明下面俩个变量:rnPrivate Flag As CheckType rnPrivate CallType As CheckType rn在类模块的事件中有如下代码:rn CallType = Flag '恢复以前的状态rn Select Case CallTypern Case AutoCheckrn timerfrmCall.Enabled = Truern lblfrmAutoHand.Text = "正在自动巡呼...."rn Case HandCheckrn timerfrmCall.Enabled = Truern lblfrmAutoHand.Text = "正在手动巡呼...."rn Case nocallrn lblfrmAutoHand.Text = ""rn cmdfrmHand.Enabled = True '释放手动巡检按钮rn End Selectrn结果它提示说AutoCheck、HandCheck、nocall未声明,是怎么回事?
参数未声明的问题
我写了个简单的打印程序,程序如下rn rnrnrnrn 无标题页rnrnrn rn rn rn rn moneyrn 100rn rn rn rn heightrn 123rn rn rn rn rn 打印 rn rn rn rnrnrn出现了下面几个错误rn1 错误 8 语法错误 E:\print\Default.aspx 4rn2 错误 9 未声明变量“document” E:\print\Default.aspx 9rn3 错误 10 未声明变量“aPrint” E:\print\Default.aspx 14rn能指导下吗,谢谢
关于变量未声明的问题
我在TCPServerDlg.h头文件中定义了如下内容:rnrn/////////////////////////////////////////////////////////////////////////////rn// CTCPServerDlg dialogrn#define WM_SOCKET WM_USER+10rnrnvoid SockProcess(LPVOID pParam);rnrnclass CTCPServerDlg : public CDialogrnrn// Constructionrnrn friend void SockProcess(LPVOID pParam);rnrnrnpublic:rn CTCPServerDlg(CWnd* pParent = NULL); // standard constructorrn SOCKET sockServer,sockClient;rn sockaddr_in addrClient,addrServer;rn //struct sockaddr_in addr,add1;rn CString str,str1;rn CWinThread* SockThread; //报文接收子线程rn rn int n;rnrnrn我在TCPServerDlg.cpp文件中写了如下内容:rnrnvoid SockProcess(LPVOID pParam)rnrn CTCPServerDlg* pDlg = (CTCPServerDlg*)pParam;rn rn int nlen = sizeof(addrClient);rn sockClient = accept(sockServer,(sockaddr*)&addrClient,&nlen);rn str1+=(LPTSTR)inet_ntoa(addrClient.sin_addr);rnrn if (sockClient < 0)rn rn str+="client socket error!\n\r";rn GetDlgItem(IDC_TEXT)->SetWindowText(str);rn rnrnrn编译过程中出现如下错误:rnerror C2065: 'addrClient' : undeclared identifierrnerror C2065: 'sockClient' : undeclared identifierrnerror C2065: 'sockServer' : undeclared identifierrnerror C2065: 'str1' : undeclared identifierrnerror C2228: left of '.sin_addr' must have class/struct/union typernerror C2065: 'str' : undeclared identifierrnerror C2297: '+=' : illegal, right operand has type 'char [23]'rnrn请问是什么原因造成的呢?
未声明的标识符 的问题.
这是个DLL 挂钩rnrn// KeybdHook.cpp : 定义 DLL 的初始化例程。rn//rn#pragma data_seg(".SHARDAT")rnstatic HWND ghWndMain = 0;rnstatic HHOK ghKeyHook = NULL;rn#pragma data_seg()rn HINSTANCE ghInstance = 0;rn HOOKPROC glpfnHookProc = 0;rnrn#include "stdafx.h"rn#include "KeybdHook.h"rn#include ".\keybdhook.h"rnrn#ifdef _DEBUGrn#define new DEBUG_NEWrn#endifrnrnLRESULT EXPORTED_DLL_FUNCTION KbdHookProc (int nCode, WPARAM wParam, LPARAM lParam)rnrn BOOL bHandledKeystroke = FALSE;rnrn if(((DWORD)lParam & 0x40000000) && (HC_ACTION == nCode))rn rn switch (wParam)rn rn case VK_F10:rn AfxMessageBox("捕获F10");rn bHandledKeystroke = TRUE;rn break;rnrn default:rn break;rn rn rnrn return (bHandledKeystroke?TRUE:CallNextHookEx (ghKeyHook, nCode, wParam ,lParam));rnrnrnBOOL EXPORTED_DLL_FUNCTION InstallKeyboardHook (HWND hWnd)rnrn BOOL bSuccess = FALSE;rn if(!ghKeyHook)rn rn ghWndMain = hWnd;rn glpfnHookProc = (HOOKPROC)KbdHookProc;rnrn bSuccess = (NULL != (ghKeyHook = SetWindowsHookEx (WH_KEYBOARD, glpfnHookProc, ghInstance, NULL)));rn rnrn return bSuccess;rnrnrnBOOL EXPORTED_DLL_FUNCTION DeInstallKeyboardHook (HWND hWnd)rnrn if(ghKeyHook)rn rn if(TRUE == (0 != UnhookWindowsHookEx(ghKeyHook)))rn rn ghKeyHook = NULL;rn rn rnrn return ( NULL == ghKeyHook);rnrnrnc:\Documents and Settings\dyt\My Documents\Visual Studio Projects\KeybdHook\KeybdHook.cpp(36) : error C2065: “ghKeyHook” : 未声明的标识符rnc:\Documents and Settings\dyt\My Documents\Visual Studio Projects\KeybdHook\KeybdHook.cpp(42) : error C3861: “ghKeyHook”: 即使使用参数相关的查找,也未找到标识符rnc:\Documents and Settings\dyt\My Documents\Visual Studio Projects\KeybdHook\KeybdHook.cpp(44) : error C2065: “ghWndMain” : 未声明的标识符rnc:\Documents and Settings\dyt\My Documents\Visual Studio Projects\KeybdHook\KeybdHook.cpp(45) : error C2065: “glpfnHookProc” : 未声明的标识符rnc:\Documents and Settings\dyt\My Documents\Visual Studio Projects\KeybdHook\KeybdHook.cpp(47) : error C2065: “ghInstance” : 未声明的标识符rnrn我在顶头定义了,为什么说未声名
vs2010未声明标识符的问题
using namespace std;void CS2_2View::OnRButtonDown(UINT nFlags, CPoint point){ // TODO: 在此添加消息处理程序代码和/或调用默认值                                                CAddDialog add;(1) add.DoModal(); CEditView::...
msflexGrid表格控件,未声明问题
BEGIN_EVENTSINK_MAP(CMYModalView, CFormView)rn//AFX_EVENTSINK_MAP(CJiSuanDlg)rnON_EVENT(CMYModalView, IDC_MM_DUOYUAN, -601 /* DblClick */, OnDblClickduoyuan, VTS_NONE)rnON_EVENT(CMYModalView, IDC_MM_DUOYUAN, 69 /* SelChange */, OnSelChangeGrid, VTS_NONE)rnON_EVENT(CMYModalView, IDC_MM_DUOYUAN, -603 /* KeyPress */, OnKeyPressGrid, VTS_PI2)rnON_EVENT(CMYModalView, IDC_MM_DUOYUAN, -605 /* MouseDown */, OnMouseDownGrid, VTS_I2 VTS_I2 VTS_I4 VTS_I4)rnON_EVENT(CMYModalView, IDC_MM_DUOYUAN, -607 /* MouseUp */, OnMouseUpGrid, VTS_I2 VTS_I2 VTS_I4 VTS_I4)rnrn//AFX_EVENTSINK_MAPrnEND_EVENTSINK_MAP()rnrn这个位置报错:rnerror C2509: “GetEventSinkMap” : 成员函数没有在“CMYModalView”中声明rnrn但是程序中并没有GetEventSinkMap函数,怀疑是没加入库,不知道怎么添加库,麻烦大家帮帮忙
自定义函数未声明问题
rnrn小弟刚学.net不久,这个是我包含文件fun.inc 中的内容 为什么老是在rnif not(fi_true(subno)) then GetImg=subno2rn这一行出错,错误信息rn编译器错误信息: BC30451: 名称“fi_true”未声明rnrn还有本来 if IsReference(fso) then exit sub 这里的isreference原来是isobject的rn但是提示isobject未声明,在网上找了换成这个不知道对不对rnrn请各位高手帮忙啊
标示符报错
这是VB的代码` rn [code=VB]public const ERROR_IC_SUCCESS= 0;rn public const ERROR_IC_FAIL = -1; //失败rn public const ERROR_IC_LENGTH = 1; //长度不符rn public const ERROR_IC_INCCODE = 2; //公司代码不符rn public const ERROR_IC_LOCALCODE = 3; //地区代码不符rn public const ERROR_IC_INIT = 4; //设备未初始化rn[/code]rn我怎么样转换为C#的`~rn我用转换工具转换的结果和上面一样rn比如: rn[code=C#]public const ERROR_IC_FAIL = -1; //失败[/code]rnrn它报错提示~应输入标识符~啥意思啊?
java标示符
标示符 由字母、数字、下划线和美元符号组成的一个字符组合,用来作为一个别名 标示符规则 1.数字不能开头 2.java关键字(保留关键字)不能作为标示符 3.区分大小写
vs 2010 怎么改单个按扭字体大小
RT
小白问个小白问题
我给按钮设置位图rnrn用rnCButton *ptn;rnCBitmap m_bitmap;rnm_bitmap.LoadBitmap(IDB_BITMAP);rn(CButton*)pbtn->SetBitmap(m_bitmap);rn为什么执行时会错
未声明的标识符??
error C2065: “AfxLoadLibrary” : 未声明的标识符rnrn这个不是全局函数吗?rn该怎么弄呢?rnrn
GL_BGR_EXT未声明
头文件什么的都带了,但就是GL_BGR_EXT was not declared不知道是哪里出问题了
IDC_HAND未声明??
我在程序中要改变Cursor的形状,调用下面的函数后,编译说未声明,但将IDC_HAND换为IDC_SIZEALL,IDC_HELP,IDC_CROSS却都没问题,不知为什么?谢谢!rnrn ::SetCursor(::LoadCursor(NULL, IDC_HAND));rn
未声明的标识符
[code=c]rnBOOL BCMenu::RemoveMenu(UINT uiId,UINT nFlags)rnrn if(MF_BYPOSITION&nFlags)rn UINT uint = GetMenuState(uiId,MF_BYPOSITION);rn if(uint&MF_SEPARATOR && !(uint&MF_POPUP))rn delete m_MenuList.GetAt(uiId);rn m_MenuList.RemoveAt(uiId);rn rn elsern BCMenu* pSubMenu = (BCMenu*) GetSubMenu(uiId);rn if(NULL==pSubMenu)rn UINT uiCommandId = GetMenuItemID(uiId);rn for(int i=0;inID==uiCommandId)rn delete m_MenuList.GetAt(i);rn m_MenuList.RemoveAt(i);rn break;rn rn rn rn elsern int numSubMenus = m_SubMenus.GetUpperBound();rn for(int m = numSubMenus; m >= 0; m--)rn if(m_SubMenus[m]==pSubMenu->m_hMenu)rn int numAllSubMenus = m_AllSubMenus.GetUpperBound();rn for(int n = numAllSubMenus; n>= 0; n--)rn if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);rn rn m_SubMenus.RemoveAt(m);rn rn rn int num = pSubMenu->GetMenuItemCount();rn for(int i=num-1;i>=0;--i)pSubMenu->RemoveMenu(i,MF_BYPOSITION);rn for(i=m_MenuList.GetUpperBound();i>=0;i--)rn if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu)rn delete m_MenuList.GetAt(i);rn m_MenuList.RemoveAt(i);rn break;rn rn rn delete pSubMenu; rn rn rn rn elsern int iPosition =0;rn BCMenu* pMenu = FindMenuOption(uiId,iPosition);rn // bug fix RIA 14th September 2000 rn // failed to return correct value on call to remove menu as the item was rn // removed twice. The second time its not found rn // so a value of 0 was being returned rn if(pMenu) return pMenu->RemoveMenu(iPosition,MF_BYPOSITION); // added return rn rn return CMenu::RemoveMenu(uiId,nFlags);rnrnrnBOOL BCMenu::DeleteMenu(UINT uiId,UINT nFlags)rnrn if(MF_BYPOSITION&nFlags)rn UINT uint = GetMenuState(uiId,MF_BYPOSITION);rn if(uint&MF_SEPARATOR && !(uint&MF_POPUP))rn // make sure it's a separatorrn int menulistsize=m_MenuList.GetSize(); rn if(uiId<(UINT)menulistsize)rn CString str=m_MenuList[uiId]->GetString();rn if(str=="")rn delete m_MenuList.GetAt(uiId);rn m_MenuList.RemoveAt(uiId);rn rn rn rn elsern BCMenu* pSubMenu = (BCMenu*) GetSubMenu(uiId);rn if(NULL==pSubMenu)rn UINT uiCommandId = GetMenuItemID(uiId);rn for(int i=0;inID==uiCommandId)rn delete m_MenuList.GetAt(i);rn m_MenuList.RemoveAt(i);rn break;rn rn rn rn elsern int numSubMenus = m_SubMenus.GetUpperBound();rn for(int m = numSubMenus; m >= 0; m--)rn if(m_SubMenus[m]==pSubMenu->m_hMenu)rn int numAllSubMenus = m_AllSubMenus.GetUpperBound();rn for(int n = numAllSubMenus; n>= 0; n--)rn if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);rn rn m_SubMenus.RemoveAt(m);rn rn rn int num = pSubMenu->GetMenuItemCount();rn for(int i=num-1;i>=0;--i)pSubMenu->DeleteMenu(i,MF_BYPOSITION);rn for(i=m_MenuList.GetUpperBound();i>=0;i--)rn if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu)rn delete m_MenuList.GetAt(i);rn m_MenuList.RemoveAt(i);rn break;rn rn rn delete pSubMenu;rn rn rn rn elsern int iPosition =0;rn BCMenu* pMenu = FindMenuOption(uiId,iPosition);rn if(pMenu)return pMenu->DeleteMenu(iPosition,MF_BYPOSITION);rn rnrn return(CMenu::DeleteMenu(uiId,nFlags));rnrn[/code]rn
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表