Giter Site home page Giter Site logo

2个小问题 about nim_duilib_framework HOT 1 CLOSED

netease-im avatar netease-im commented on August 15, 2024
2个小问题

from nim_duilib_framework.

Comments (1)

nmgwddj avatar nmgwddj commented on August 15, 2024

第一个问题,在应用中,窗口的最大化最小化按钮功能已经属于业务层面,在展示的示例中并没有做特别详细的示例,是希望使用者能快速理解代码执行效果。无论点击还原按钮还是拖动窗口非客户区都会得到 OnSize 变化,使用者可通过重写基类 OnSize 方法判断当前是否全屏(IsZoomed)从而显示不同的按钮状态。如下示例代码:

LRESULT BasicForm::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	if (m_pRoot)
	{
		FindControl(L"maxbtn")->SetVisible(!::IsZoomed(m_hWnd));
		FindControl(L"restorebtn")->SetVisible(::IsZoomed(m_hWnd));
	}

	return __super::OnSize(uMsg, wParam, lParam, bHandled);
}

第二个问题这个应该是 Windows 的默认行为,比如在 WIN+R 运行的输入框中输入文字,鼠标指针会自动隐藏,如果您觉得这种行为并不可靠,欢迎提交 PR 来完善该功能。

from nim_duilib_framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.