Solved

Error while running with GDI+ in VC++6 application

Posted on 2004-10-09
8
523 Views
Last Modified: 2013-11-20
Dear experts,
I've decided to enable my VC++6 with GDI+ graphics. By adding the following code:

typedef unsigned __int64 ULONG_PTR
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib, "Gdiplus.lib")

to stdafx.h, I get the following error:

gdiplus.h(18) : error C2144: syntax error : missing ';' before type 'IDirectDrawSurface7'

I've tried to add the additional code needed to get VC++6 application running with GDI+, but still get the same error.
I'd be greatly appreciated for any suggestion.
0
Comment
Question by:German_N
8 Comments
 
LVL 6

Accepted Solution

by:
nabehs earned 75 total points
ID: 12270296
// write the following in stdafx.h
// delete the typedef
//typedef unsigned __int64 ULONG_PTR
#include <ddraw.h>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib, "Gdiplus.lib")

0
 

Author Comment

by:German_N
ID: 12274828
Followig your comments:
if I don't define "typedef unsigned __int64 ULONG_PTR" I get the following error: diplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier. If I do, I get the following error: ddraw.h(38) : error C2144: syntax error : missing ';' before type 'int'.
It would be nice you could take a look at the project, sure if you have vc++6 installed. Probably I miss something basic.
0
 
LVL 6

Expert Comment

by:nabehs
ID: 12274856
ok, try to send it to me to: emadns@yahoo.com
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 6

Expert Comment

by:nabehs
ID: 12275127
i received  a notification message saying: This notification has been sent to inform you that a message has been deleted .The message subject is GDI+ problem project. Why is this happening? The message you are sending is infected with a virus.

0
 

Author Comment

by:German_N
ID: 12275169
I'll be trying to send it again later... thanks for taking a care :)
0
 
LVL 12

Assisted Solution

by:OnegaZhang
OnegaZhang earned 25 total points
ID: 12293784
THe following is a small VC6 program demonstrating usage of GDI+
www.fruitfruit.com/vc/graphics/img2gif.cpp
0
 
LVL 2

Assisted Solution

by:Ruskialt
Ruskialt earned 25 total points
ID: 12324314
Check the order of your include paths in tools->options->directories, make sure that the new sdk paths are listed before anythin else, this goes for includes and for libs. You may hit some wrong (old) files, if the order is incorrect.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 51
Pressing cancel button with C# UI Automation 3 82
Problem to App source 6 75
How do I get Window Title of all opened process? 4 15
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question