如何通过拖动框架的边缘使主框架(SDI MFC)可调整大小 [英] How to make the main frame (SDI MFC) as resizable by dragging the edges of the frame

查看:105
本文介绍了如何通过拖动框架的边缘使主框架(SDI MFC)可调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名UI开发人员我的一名高级开发人员为当前项目开发了UI,现在他无法澄清我的疑问

任何人都可以帮我解决我的问题,

目前我们可以使用最小化最大化选项重新调整应用程序的大小,但现在需要更改,以便通过拖动主框架的边缘来重新调整应用程序的大小。

在这里我们也为主框架绘画...... ..

解决方案

请在你的FrameWnd窗口样式中添加WS_THICKFRAME。



 BOOL CMainFrame :: PreCreateWindow(CREATESTRUCT& cs)
{
int style = cs.style;

// 添加WS_THICKFRAME以创建可调整大小的边框。
style - = WS_THICKFRAME;
cs.style = style;

if (!CFrameWnd :: PreCreateWindow(cs))
....
}


I am working as a UI developer one of my senior was developed the UI for current project now he is not available for me to clarify my doubt
Can anybody help me in solving my problem please,
Currently we can re size the application using minimize maximize options but now requirement is changed such that the application has to be re sizable by dragging the edges of the main frame.
Here we did painting for Main Frame too……..

解决方案

Please add WS_THICKFRAME in your window style of the FrameWnd.

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    int style = cs.style;

    // Add WS_THICKFRAME to create re sizable border.
    style -= WS_THICKFRAME;
    cs.style = style;

    if( !CFrameWnd::PreCreateWindow(cs) )
....
}


这篇关于如何通过拖动框架的边缘使主框架(SDI MFC)可调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆