为什么GDIplus无法在Windows 8上运行? [英] Why GDIplus does not work on windows 8?

查看:226
本文介绍了为什么GDIplus无法在Windows 8上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的王。



我是亚当。我在win32和c lang编程。 。我将您的代码转换为'

另一个支持自定义皮肤的透明时钟'文章,从MFC到WIN32。

Windows XP和7中的一切都很好,在32和64位。但是当我将它移植到Windows 8时,屏幕上显示的是没有任何错误。我认为GDIplus在Windows 8上不起作用。

我的问题是,你对这个问题有什么看法吗?

谢谢。

adam。

解决方案

您可能需要先初始化GDIPlus。

 #include< windows.h> 
#include< gdiplus.h>
#include< stdio.h>
使用命名空间Gdiplus;

INT main()
{
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(& gdiplusToken,& gdiplusStartupInput,NULL);

//你在这里编码
GdiplusShutdown(gdiplusToken);
返回0;
}


Dear Wang.

I'am adam. I program in win32 and c lang. . I converted your code about '
Yet Another Transparent Clock which Supports Custom Skin' article, from MFC to WIN32.
Everything was ok in windows XP and 7, in 32 and 64bits. But when I port it to windows 8, nothings was displayed on screen, without any error. I think GDIplus does not work on windows 8.
My question is, do you have any idea about this problem?
thank you.
adam.

解决方案

You probably need to initialize GDIPlus first.

#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;

INT main()
{
   GdiplusStartupInput gdiplusStartupInput;
   ULONG_PTR gdiplusToken;
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

// you code here
   GdiplusShutdown(gdiplusToken);
   return 0;
}


这篇关于为什么GDIplus无法在Windows 8上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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