Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

visual c++的小問題.

0 views
Skip to first unread message

孤獨的先知

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

請問各位先進, 建立狀態列時:

statusbar.Creat(this);

當中this代表什麼?

--
□Origin: eden.ee.nctu.edu.tw □From: ccsun21.cc.nctu.edu.tw

Jinson

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

On 22 May 1997 15:15:20 GMT, moonsh...@eden.EE.NCTU.edu.tw
(孤獨的先知) wrote:

>
> 請問各位先進, 建立狀態列時:
>
> statusbar.Creat(this);
>
> 當中this代表什麼?
>
this 代表 物件 statusbar的指標

混世小妖

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

==> 在 jin...@mail.seeder.net.tw (Jinson) 的文章中提到:

> On 22 May 1997 15:15:20 GMT, moonsh...@eden.EE.NCTU.edu.tw
> (孤獨的先知) wrote:
> > 請問各位先進, 建立狀態列時:
> > statusbar.Creat(this);
> > 當中this代表什麼?
> this 代表 物件 statusbar的指標

好像不是耶! :-)
那個this 應該是叫用到 statusbar.Creat() 這個
函式的物件的"自身指標"才對。
例如:
... CMyView::OnCreate( ... )
{
...
statusbar.Creat( this );
// 這時候的 this 指的就是 CMyView 本身了。
...
}
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>

0 new messages