⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_34541.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:34541 发表者:foolish 发表日期:2003-03-31 11:07:53
<br>主题:建立新的文档和视后如何给文档中的一个公共变量赋值
<br>内容:POSITION posTemplate = AfxGetApp()-&gt;GetFirstDocTemplatePosition();<BR>CDocTemplate* pDocTemplate = AfxGetApp()-&gt;GetNextDocTemplate(posTemplate);<BR>//就是要在这对doc中的一公共变量赋值如何操作<BR>CImagViewerDoc* pDocument = (CImagViewerDoc*) pDocTemplate-&gt;OpenDocumentFile()<BR>pDocument-&gt;UpdateAllViews(NULL);
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-03-31 11:23:21
<br>内容:POSITION pos=pDocTemplate -&gt;GetFirstDocPosition();<BR>CImagViewerDoc* pDocument=(CImagViewerDoc*)GetNextDoc(&amp;pos);
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-03-31 19:38:28
<br>内容:&nbsp;&nbsp; 那个变量是i,若要i=0;要写在什么地方。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-04-01 09:28:58
<br>内容:pDocument-&gt;i=0;
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-04-01 16:17:13
<br>内容:CImagViewerDoc* pDocument=(CImagViewerDoc*)GetNextDoc(&amp;pos); <BR>会报错说没有GetNextDoc()这个函数。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-04-01 16:43:01
<br>内容:CImagViewerDoc* pDocument=(CImagViewerDoc*)pDocTemplate -&gt;GetNextDoc(&amp;pos); 
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-04-01 17:11:49
<br>内容:&nbsp;&nbsp; 麻烦再看一下,这一段是要加在我的那一段中的,//所在的那一部分。直接写可以吗?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-04-01 17:16:34
<br>内容:还是有错<BR><BR>error C2664: 'GetNextDoc' : cannot convert parameter 1 from 'struct __POSITION ** ' to 'struct __POSITION *&amp; '<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-04-02 09:01:20
<br>内容:POSITION posTemplate = AfxGetApp()-&gt;GetFirstDocTemplatePosition();<BR>CDocTemplate* pDocTemplate = AfxGetApp()-&gt;GetNextDocTemplate(posTemplate);<BR>POSITION pos=pDocTemplate -&gt;GetFirstDocPosition();<BR>CImagViewerDoc* pDocument=(CImagViewerDoc*)GetNextDoc(pos); <BR>pDocument-&gt;i=0; 
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-04-02 16:31:49
<br>内容:为什么亚<BR><BR>CImagViewerDoc* pDocument=(CImagViewerDoc*)GetNextDoc(pos); 报错<BR>error C2065: 'GetNextDoc' : undeclared identifier<BR><BR>CImagViewerDoc* pDocument = (CImagViewerDoc*) pDocTemplate-&gt;OpenDocumentFile()<BR>这句怎么加<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-04-03 08:42:17
<br>内容:CImagViewerDoc* pDocument=(CImagViewerDoc*)pDocTemplate -&gt;GetNextDoc(pos);
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:foolish 回复日期:2003-04-03 10:36:00
<br>内容:这几行代码是在CMainFram类中写的<BR>当执行了OpenDocumentFile()之后在doc中i的值并没有变<BR>这是为什么亚<BR>帮帮忙了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:dongfanghong 回复日期:2003-04-03 11:16:44
<br>内容:执行OpenDocumentFile()之后,等于新建了一个DOCUMENT,需要重新修改才起作用。<BR>建议你先从面向对象学起,然后找一本比较简单的VC的书,照着上面做,慢慢找到感觉后,在找一些例子看,然后再自己做一些东西。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -