lili0812 发表于 2006-9-18 10:47:00

[求助]Dialog中添加CScrolview的问题??

<P><FONT face=宋体>我想在对话框中显示一张图,因为图比较大,需用到CScrollview,可是用下列语句实现后,滚动条不能动,为什么呢???<BR><BR>CScrollView *pView = (CScrollView* )RUNTIME_CLASS(bmp272)-&gt;CreateObject();<BR>pView-&gt;Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,<BR>CRect(5,5,590,620), this, IDB_BITMAP17);<BR>pView-&gt;ShowWindow(SW_SHOW);<BR>pView-&gt;OnInitialUpdate();<BR>CSize sizeTotal;<BR>CBitmap bmp;<BR>bmp.LoadBitmap(IDB_BITMAP17);<BR>BITMAP bmpstr;<BR>bmp.GetBitmap(&amp;bmpstr);<BR>sizeTotal.cx = bmpstr.bmWidth;<BR>sizeTotal.cy = bmpstr.bmHeight;<BR>pView-&gt;SetScrollSizes(MM_TEXT, sizeTotal);</FONT></P>
页: [1]
查看完整版本: [求助]Dialog中添加CScrolview的问题??