开发者

Display PNG on Visual Studio form

I'm working on a C++ application in Visual Studio (non-MFC) and was surprised to find that I can't add a PNG image to a dialog in the designer which seems a lit开发者_JS百科tle backward as I can in most other IDEs that I've used. So either a) there is something I'm missing or b) there is a way to do it with code. I'm hoping that it's a but b would be fine.

Any advice suggestions on this?

Thanks, J


Calling the dialog template editor a "designer" would be rather a stretch. It hasn't changed in the past 15 years or so, neither has the underlying API. An API that doesn't support PNGs, only BMPs. Getting PNG support is possible, GDI+ is available on any Windows version since 2000. But you have to code it yourself.

This is a solved problem, there are excellent class libraries available for UI development, along with tooling to do what you want to do. Qt is one of them if you want to stick with C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜