方法:在VB.NET中打开一个新的hdc hwnd相关屏幕? [英] How-To: Open a new hdc hwnd related screen in VB.NET?

查看:52
本文介绍了方法:在VB.NET中打开一个新的hdc hwnd相关屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi, I'm trying to get a tutorial together that will initialize a HDC to open a new screen.

到目前为止,MSDN已经给了我这个代码。

So far, MSDN has given me this code.

hdc = CreateDC(TEXT(" DISPLAY"),NULL,NULL,NULL);

hdc=CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL);

hBmp = CreateCompatibleBitmap(hdc,400,400);

hBmp = CreateCompatibleBitmap(hdc, 400,400);

在Windows桌面上打开新屏幕是否需要更多(例如屏幕分辨率)?

Is there anything more required (such as screen resolution) to open a new screen in Windows Desktop?

顺便说一句,我*意味着*全屏绘制位图数据,而不是全屏模式下的无边框窗口。

By the way, I *mean* a full screen to draw bitmap data to, not a borderless window in full screen mode.

推荐答案

http://msdn.microsoft.com/en-gb/library/windows/desktop/dd183490%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-gb/library/windows/desktop/dd183490%28v=vs.85%29.aspx

这是上面的createDC()链接。

This is the createDC() link above.

http://msdn.microsoft.com/en-gb/library/windows/desktop/dd162920%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-gb/library/windows/desktop/dd162920%28v=vs.85%29.aspx

这是上面的releaseDC()链接。

This is releaseDC() Link above.

如果这些链接发生变化,请分别在Bing上搜索"releaseDC"和"createDC"。

If these links change, search Bing for 'releaseDC' and 'createDC' respectively.

*******************编辑:周五:07:43上午********* **

******************* Fri: 07:43am***********

主要用于在打印机(或打印假脱机程序)上创建设备上下文。然后,您可以使用StartDoc,StartPage,(GDI命令),EndPage和EndDoc在打印机上绘制页面。



如果您传递了正确的魔术词,它将创建覆盖整个屏幕的DC,您可以使用GDI命令绘制。
The main use is to create a Device Context onto a printer (or the print spooler). You can then use StartDoc, StartPage, (GDI commands), EndPage and EndDoc to draw pages on the printer.

If you pass the correct magic words, it will create a DC covering the whole of the screen, which you can draw on using GDI commands.


这篇关于方法:在VB.NET中打开一个新的hdc hwnd相关屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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