Solved

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

Posted on 2004-10-09
8
519 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 155
Add content to output file 4 63
maven archtype selection in eclipse 1 57
Problem to open Excel file 15 128
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now