需要有关在Win32中实现高质量图形的建议和建议 [英] Need recommendations and advices for acheiving high quality graphics in Win32

查看:62
本文介绍了需要有关在Win32中实现高质量图形的建议和建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我想首先感谢所有花时间观看此主题并尝试提供帮助的人。



我有一个任务是创建应用程序的主窗口,看起来非常类似于这个:



https://iseb.beograd.gov.rs/Admin/AdminHome.aspx [ ^ ]。



我需要使用不同的文本制作相同的横幅,并且按钮与页面上的按钮非常相似。



我尝试使用位图并将其加载到静态控件中具有样式SS_BITMAP,并尝试使用BitBlt(),但由于按钮的尺寸很大(我在CreateWindow()中传递150作为按钮宽度和150作为按钮高度)图像的质量很差。



所以我的问题如下:



如何使用C ++和Win32创建相同的按钮和横幅?



我猜GDI无济于事,或者如果有,请告诉我我是做什么的缺少?



我应该用GDI +还是DirectX来做...



你的建议是什么? ?我应该用什么来绘制具有相同图形质量的按钮和横幅?



如果您决定提供建议,我将非常感谢您推荐一些链接/书籍/代码示例...



非常感谢。



我在MS Visual Studio Express 2008,Windows XP,C ++中使用纯WIN32 API。



如果需要任何其他信息(源代码或类似的东西),请提出要求,我将非常乐意提供它。

Hi everyone!

I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.

I have a task to create application''s main window to look very similar to this one:

https://iseb.beograd.gov.rs/Admin/AdminHome.aspx[^].

I need to make the same banner with different text, and buttons very similar as those at the page.

I have tried this using bitmaps and loading them into static controls that had style SS_BITMAP, and have tried with BitBlt(), but since the dimensions of the button are big ( i pass 150 as buttons width and 150 as buttons height in CreateWindow() ) the quality of the picture is awful.

So my question is following:

How would I create those same buttons and banner, using C++ and Win32 ?

I guess GDI will not help, or if it will, please tell me what am I missing?

Should I do it with GDI+, or DirectX ...

What is your advice? What should I use to draw those buttons and banner with same quality of graphic?

If you do decide to offer advice, I would highly appreciate if you would recommend some links / books / code examples ...

Thank you very much.

I work in MS Visual Studio Express 2008, on Windows XP, in C++, using pure WIN32 API.

If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.

推荐答案

质量图形将更多地与它们的创建方式,位图与矢量,它们如何根据输出进行缩放,它们如何存储有损或无损图像格式以及艺术作品最初的效果如何哪个API用于呈现它们。

没有理由不能使用GDI,GDI +,Direct Draw或任何数量的第三方库来渲染您链接到的网页。

选择使用哪种API的最大因素可能是对实现所需外观所需的输出的控制水平,而不是产生它的工作量。



例如,如果您使用嵌入在MFC中的对话窗口中的Web浏览器控件,您可以使用HTML和Javascript轻松实现与您链接的页面几乎相同的桌面UI。它会很慢,占用大量内存并且很难集成,但速度快且相对容易创建。

如果您使用DirectX并从头开始创建自己的一组交互式控件,包括双向Unicode文本支持您可以查看多年的工作。好处是你将拥有完全控制,相比之下,你得到的将是快速,反应灵敏,占地面积小。

正如我的计算老师曾经说过的那样,它是摆动和环形交叉,或者在美国你付钱给你,你可以选择。
The quality of the graphics will have more to do with how they''re created, bitmap vs vector, how they''re scaled realtive to the output, how they''re stored lossy or lossless images formats and how good the art work is originally than which API is used to render them.
There''s no reason something like the web page you linked to can''t be rendered using GDI, GDI+, Direct Draw or any number of 3rd party libraries on top of these.
The biggest factor in choosing which API to use will probably be the level of control over the output you need to achieve your desired appearance vs the ammount of work to produce it.

For example if you use a Web Browser control embedded in a Dialog Window in MFC you could achieve a desktop UI almost identical to the page you linked very easily using HTML and Javascript. It would be slow, use lots of memory and be a pain in the neck to integrate with but fast and relatively easy to create.
If you use DirectX and create your own set of interactive controls from scratch including bidirectional Unicode text support you could be looking at a years work. The upside is you will have totol control and what you get will be lighting fast, responsive and small footprint in comparison.
As my computing teacher used to say, "It''s swings and roundabouts", or in American "You pays your money and you takes your choice."


这篇关于需要有关在Win32中实现高质量图形的建议和建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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