vs2005安装gdi+

本文详细介绍如何在Visual C++.NET环境下成功构建使用GDI+的项目,包括配置环境、创建项目、设置预编译头文件及源代码注意事项等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

To   successfully   build   a   Visual   C++   .NET   project   that   uses   GDI+,   follow   these   steps:    
    
  1   Make   sure   that   the   current   Platform   SDK   is   installed.   The   current   Platform   SDK   is   the   version   of   the   Platform   SDK   from   which   your   GDI+   headers   and   libraries   are   taken.     
    
    
  2   Make   sure   that   your   installation   of   Microsoft   Visual   Studio   .NET   is   configured   to   read   from   the   Platform   SDK   include   directories   and   library   directories   before   it   reads   from   its   own   directories.     
    
    
  3   Follow   these   steps   to   create   a   new   Visual   C++   Win32   project:     
    
    
  Start   Visual   Studio   .NET.     
    
    
  On   the   File   menu,   point   to   New,   and   then   click   Project.     
    
    
  Click   Visual   C++   Projects   under   Project   Types,   and   then   click   Win32   Project   under   Templates.     
    
    
  4   In   the   StdAfx.h   file,   verify   the   following:     
    
    
  Make   sure   that   WIN32_LEAN_AND_MEAN   is   not   defined.     
    
    
  Make   sure   that   the   Windows.h   file   is   included   (even   for   console   applications).     
    
    
  Make   sure   that   the   Gdiplus.h   file   is   included   after   Windows.h.     
    
    
  5   In   your   .cpp   file,   add   the   follow   code   after   the   include   directives:     
    
    
  using   namespace   Gdiplus;     
  6   In   WinMain,   make   sure   that   the   following   code   is   one   of   the   first   items   to   be   executed:     
    
    
  GdiplusStartupInput   gdiplusStartupInput;   
  ULONG_PTR                       gdiplusToken;   
  GdiplusStartup(   &gdiplusToken,   &gdiplusStartupInput,   NULL   );     
    
  7   In   WinMain,   add   the   following   code   to   each   exit   path:     
    
    
  GdiplusShutdown(gdiplusToken);     
    
  8   In   the   project   settings,   add   the   Gdiplus.lib   file   to   the   input   library   list.     
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值