b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

movewindow_mfc movewindow_setwindowpos

电脑杂谈  发布时间:2017-01-09 16:00:46  来源:网络整理

setwindowpos_mfc movewindow_movewindow

movewindow

MoveWindow()这个函数的作用:Changes the window's size and position.

参数有两种:BOOL MoveWindow(int x,int y,int nWidth,int nHeight,BOOL bRepaint = TRUE ) x,y为左上角顶点坐标

BOOL MoveWindow(LPCRECT lpRect,BOOL bRepaint = TRUE )

强调:哪个对象(窗体)或指向该对象的指针调用了MoveWindow(),那么就改变该对象(窗体)的大小、位置

举例如下:CMSGOPT *temp=new CMSGOPT;

movewindow_mfc movewindow_setwindowpos

temp->Create(IDD_DLG_MAIN,this);

temp->ShowWindow(SW_SHOW);

CRect rc;

temp->GetWindowRect(&rc);//注意与this->GetWindowRect(&rc);区别。movewindow

//temp->MoveWindow((1024-rc.Width())/2,0,rc.Width(),rc.Height(),1);//居中显示,改变了位置

setwindowpos_movewindow_mfc movewindow

rc.left=(1024-rc.Width())/2;

rc.right=rc.left+500;

rc.top=0;

rc.bottom=rc.top+500;

temp->MoveWindow(&rc,true);//改变了大小与位置

temp->UpdateWindow();


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-25211-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 闫帅帅
        闫帅帅

        美冷战思维坑了别人也害了自己

      • 吴叔虎
        吴叔虎

        试探他们的底线

      热点图片
      拼命载入中...