• 大小: 940KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-05
  • 语言: C/C++
  • 标签: VC6  GDI+  

资源简介

VC6使用GDI+,其中包含GDI源码、VC例子和使用说明

资源截图

代码片段和文件信息

#include “stdafx.h“ 
#include  
#include  
#include  
using namespace Gdiplus; 
#pragma comment (lib“Gdiplus.lib“) 

VOID OnPaint(HDC hdc) 

Graphics graphics(hdc); 
Pen blue (Color(255 0 0 255));
Pen red  (Color(255 255 0 0));

int y = 256;
for (int x = 0; x < 256; x += 5)
{
graphics.DrawLine(&blue 0 y x 0);
graphics.DrawLine(&red 256 x y 256);  
y -= 5;
}


LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM); 

INT WINAPI WinMain(HINSTANCE hInstance HINSTANCE PSTR INT iCmdShow) 

HWND                hWnd; 
MSG                 msg; 
WNDCLASS            wndClass; 
GdiplusStartupInput gdiplusStartupInput; 
ULONG_PTR           gdiplusToken; 

// Initialize GDI+. 
GdiplusStartup(&gdiplusToken &gdiplusStartupInput NULL); 

wndClass.style          = CS_HREDRAW | CS_VREDRAW; 
wndClass.lpfnWndProc    = WndProc; 
wndClass.cbClsExtra     = 0; 
wndClass.cbWndExtra     = 0; 
wndClass.hInstance      = hInstance; 
wndClass.hIcon          = LoadIcon(NULL IDI_APPLICATION); 
wndClass.hCursor        = LoadCursor(NULL IDC_ARROW); 
wndClass.hbrBackground  = (HBRUSH)GetStockobject(WHITE_BRUSH); 
wndClass.lpszMenuName   = NULL; 
wndClass.lpszClassName  = TEXT(“GettingStarted“); 

RegisterClass(&wndClass); 

hWnd = CreateWindow( 
TEXT(“GettingStarted“)   // window class name 
TEXT(“Getting Started“)  // window caption 
WS_OVERLAPPEDWINDOW      // window style 
CW_USEDEFAULT            // initial x position 
CW_USEDEFAULT            // initial y position 
CW_USEDEFAULT            // initial x size 
CW_USEDEFAULT            // initial y size 
NULL                     // parent window handle 
NULL                     // window menu handle 
hInstance                // program instance handle 
NULL);                    // creation parameters 

ShowWindow(hWnd iCmdShow); 
UpdateWindow(hWnd); 

while(GetMessage(&msg NULL 0 0)) 

TranslateMessage(&msg); 
DispatchMessage(&msg); 


GdiplusShutdown(gdiplusToken); 
return msg.wParam; 
}  // WinMain 

LRESULT CALLBACK WndProc(HWND hWnd UINT message  
WPARAM wParam LPARAM lParam) 

HDC          hdc; 
PAINTSTRUCT  ps; 

switch(message) 

case WM_PAINT: 
hdc = BeginPaint(hWnd &ps); 
OnPaint(hdc); 
EndPaint(hWnd &ps); 
return 0; 
case WM_DESTROY: 
PostQuitMessage(0); 
return 0; 
default: 
return DefWindowProc(hWnd message wParam lParam); 

} // WndProc 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    1503232  2000-10-24 23:12  gdi+\GDIPlus\GDIPlus\gdiplus.dll

     文件       3434  2000-12-15 16:58  gdi+\GDIPlus\GDIPlus\Includes\GdiPlus.h

     文件        857  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusbase.h

     文件      22329  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusBitmap.h

     文件      30802  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusBrush.h

     文件       1773  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusCachedBitmap.h

     文件       4328  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusColor.h

     文件       1750  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusColorMatrix.h

     文件      55921  2001-01-12 15:16  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusEnums.h

     文件      87463  2001-01-12 15:16  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusFlat.h

     文件       5981  2000-12-15 16:58  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusFont.h

     文件       3401  2000-12-04 15:00  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusFontCollection.h

     文件       6071  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusFontFamily.h

     文件       2725  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusGpStubs.h

     文件      93877  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusGraphics.h

     文件      22175  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusHeaders.h

     文件      13780  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusimageAttributes.h

     文件       1593  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusImageCodec.h

     文件      24268  2000-12-04 15:00  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusImaging.h

     文件       3171  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusInit.h

     文件       6295  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusLineCaps.h

     文件       8465  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusMatrix.h

     文件       1083  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusMem.h

     文件      11805  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusmetaFile.h

     文件       8151  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusmetaHeader.h

     文件      50470  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusPath.h

     文件      13635  2001-01-17 16:41  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusPen.h

     文件       6796  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusPixelFormats.h

     文件      13288  2000-11-12 23:18  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusRegion.h

     文件       9352  2000-12-04 15:00  gdi+\GDIPlus\GDIPlus\Includes\GdiPlusStringFormat.h

............此处省略48个文件信息

评论

共有 条评论