天气与日历 切换到窄版

 找回密码
 立即注册
中国膜结构网
十大进口膜材评选 十大国产膜材评选 十大膜结构设计评选 十大膜结构公司评选
查看: 58|回复: 0

arx函数收集集合

[复制链接]

该用户从未签到

主题

0

回帖

2912

积分

管理员

积分
2912
发表于 2024-6-22 09:46:18 | 显示全部楼层 |阅读模式
static void zoomExtents()
{
        AcDbViewTableRecord view;
        AcGePoint3d max = acdbHostApplicationServices()->workingDatabase()->extmax(),
        min = acdbHostApplicationServices()->workingDatabase()->extmin();
        AcGePoint2d max_2d (max[X], max[Y]);
        AcGePoint2d min_2d (min[X], min[Y]);
        view.setCenterPoint (min_2d + (max_2d - min_2d) / 2.0);
        view.setHeight(max_2d[Y] - min_2d[Y]);
        view.setWidth (max_2d[X] - min_2d[X]);
        acedSetCurrentView (&view, NULL);
        acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE);
}

static void SetDwgWindow_SetWindow(void) {
        //
        // Set Variables
        //
        // Client Borders,Sliders,Ect.
        int Width = 0; // ViewAreaWidth(802) + 28 = Width = 830
        int Height = 0; // ViewAreaHeight(493) + 71 = Height = 564
        acedGetInt (_T("\nEnter a new width in pixels for the drawing window: "), &Width);
        acedGetInt (_T("\nEnter a new height in pixels for the drawing window: "), &Height);
        CRect rect (0, 0, 2 * Width, 2 * Height);
        CRect ChildRect (0, 0, Width, Height);
        AcGePoint3d Min (0, 0, 0);
        AcGePoint3d Max (830, 564, 0);
        //
        // Resize Document Frame
        //
        CWnd* DocFrame = acedGetAcadDwgView()->GetParent();
        DocFrame->MoveWindow (ChildRect);
        DocFrame->UpdateWindow ();

        zoomExtents();

        DocFrame->SendMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0L);
        DocFrame->SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0L);
        DocFrame->SendMessage(WM_SYSCOMMAND, SC_RESTORE, 0L);

}//SetDwgWindow

 

 

 

 

arx函数收集集合
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|中国膜结构网|中国膜结构协会|进口膜材|国产膜材|ETFE|PVDF|PTFE|设计|施工|安装|车棚|看台|污水池|中国膜结构网_中国空间膜结构协会

GMT+8, 2024-11-1 15:25 , Processed in 0.182297 second(s), 28 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表