使用MFC(C ++)创建我自己的GUI设计

问题描述:

你好,

最近,我从WinAPI切换到MFC,并且我已经在考虑自己的应用程序GUI设计.我希望有人可以给我一些线索,让我从哪里开始学习.链接以更好地理解我的问题: TuneUP实用程序 [ 如何以这种方式重做默认GUI?淡入淡出效果,用户制作的背景,不同的鼠标图形事件等.

我在一些使用WinAPI的测试应用程序中进行了一些实验,但是我从未尝试过重新设计整个GUI.

谢谢您的回答.

Hello,

Recently I switched from WinAPI to MFC and I''m already thinking about my own GUI design for my applications. I was hoping, that somebody could give me some clues, where should I start to learn. Link for better undestanding my question: TuneUP Utilities[^].

The Minimize and Close buttons are bitmap-buttons with changed region?
How to rework default GUI in such manner? The Fade effects, usermade backgrounds, different onmouse graphic events, etc.

I experimented a little in some test applications with WinAPI, but I never tried to rework the whole GUI.

Thank you for your answers

首先,我个人并不喜欢更改标准Windows界面组件.发明Windows的原因是为所有应用程序提供通用的用户界面,并且外观/感觉都相同.这使用户下意识地熟悉了Windows上运行的所有应用程序,因为smame基本内容包含在每个程序中,并且始终看起来相同.

话虽如此,您需要重写CWindow类并在OnPaint事件中自行处理所有绘画.自从我编写任何MFC代码以来已有三年多了,所以我不确定我能为您提供更多帮助.但是,我可以*保证,如果您通过犯错误而学习,就会变得非常擅长.如果您只是进行正确的Google搜索,就有很多资产可以使用.
First, I''m not personally a fan of changing the standard Windows interface components. The reason Windows was invented was to provide a common user interface for all applications, with all the same look/feel. This makes the user subconsciously familiar will all applications that run on Windows, because the smame basic stuff is in every program, and always looks the same.

That being said, you need to override the CWindow class and handle all of the painting yourself in the OnPaint event. It''s been over three years since I wrote any MFC code, so I''m not sure I can help you much beyond that. However, I *can* guarantee that you''ll become very good at it if you learn by making mistakes. There''s a lot of assets you can use if you just do the right google search.