现在从网上下了一个GDIplus的文件夹,里面有Include和lib 还有一个gdiplus.dll文件 
在VC6.0的Win32 Application中怎么用?
高手赐教下 谢谢!

解决方案 »

  1.   

    包含h,link lib文件,然后dll放到工程目录,就可以调用h中的函数了
      

  2.   

    能说详细点吗?
    怎么包含H?怎么link lib  DLL放到哪里?
    谢谢~
      

  3.   

    下面是一个基于Win32 SDK的窗口程序。使用要包含GDIplus.h头文件,连接设置要包含GdiPlus.lib库文件。 
    #define UNICODE 
    #include 
    #include 
    using namespace Gdiplus; void OnPaint(HWND hWnd) 

    HDC hdc; 
    PAINTSTRUCT ps; hdc = BeginPaint(hWnd, &ps); Graphics graphics(hdc); 
    Pen pen(Color(255, 0, 0, 255)); graphics.DrawLine(&pen, 0, 0, 200, 100); EndPaint(hWnd, &ps); } // OnPaint LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, 
    PSTR szCmdLine, int iCmdShow) 

    HWND hWnd; 
    MSG msg; 
    WNDCLASS wndClass; 
    GdiplusStartupInput gdiplusStartupInput; 
    ULONG_PTR gdiplusToken; // 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); 关闭GDI+ return msg.wParam; } // WinMain LRESULT CALLBACK WndProc(HWND hWnd, UINT message, 
    WPARAM wParam, LPARAM lParam) 

    switch(message) 

    case WM_PAINT: 
    OnPaint(hWnd); 
    return 0; case WM_DESTROY: 
    PostQuitMessage(0); 
    return 0; default: 
    return DefWindowProc(hWnd, message, wParam, lParam); 

    } // WndProc 
      

  4.   

    原来我的SDK 中没有ULONG_PTR的定义  晕  谢谢佳宁  朋友  接分