|
You wrote: Or maybe you were talking about the actual class declarations before the definitions
Yes, indeed. If you like to keep this design, move the class CGradient; declaration to the public section of CGraphicsSystem .
However, I'd suggest NOT to embed image/gradient classes in CGraphicsSystem , to avoid complex constructions later. You'd better create a namespace, so you can write using namespace GraphicsSystem; in your .cpp files and make everything more readable.
You're welcome.
-- modified at 17:47 Sunday 13th August, 2006
|
|
|
|
|
Hey, it worked to move the declarations into CGraphicsSystem! (guess you're not surprised.)
So far the architecure has worked fine. I'm just adding more features. But I'm curious, what are the "complex construction" situations you were talking about? Doesn't CGraphicsSystem simple contain CImage's and CGradients? (since it doesn't have to do with, for example, the CSoundSystem) Maybe my architecture has OO design problems?
Thanks again. Later.
Joel
|
|
|
|
|
<big>Nevermind, I got it...</big>
-- modified at 8:00 Sunday 13th August, 2006
|
|
|
|
|
Great!
Would be nice if you can share it with us.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I tried pEdit->SetWindowText("/n"); but a junk character is displayed instead of going to new line .
Plz help.
|
|
|
|
|
Put "\r\n" instead of "\n"
Also be sure the edit control is multiline (has ES_MULTILINE style).
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
At some time in the past, Life was simple, we had telex machines, printing on rolls of paper! In those days, when at the end of a line, the next step was sinple, you send a signal to make the paper advance one line, a \NL symbol, and you followed it by a Carriage Return Symbol, a \CR Symbol! Then the CRT Screen was invented, and everyone took a step back. What shall we bo when we are at the end of a line: Send a NL, Send a CR, or send a totally new magic incantation. There was never any agreement on this issue, and it still seeps through into the WIN32 in unexpected ways. for instance, in opening files. By reason of history, if you open or save a Textfile, e.g. by using FILE f = fopen(!MyFile.txt","a+"), any New Line Char (\n) will actuallly be translated on the fly to a '\r\n' pair. When reading back, every '\r\n' pair will be converted on the fly to be read into memory as a '\n'. You may avoid this translation on the fly by opening your files as "a+b" (b for Binary). The purpose of the above is to explain that Microsoft maintains two text formats, The one used in a Program, and the One stored on File! This is all without good reason, but that's the way it is, anyways. The problem is, that Microsoft is not consistent in how the rule is applied! For some reason, best known to both God and Bill Gates, certain controls expect the '\r\n' pair, or in others the '\n\r' pair to work propperly. Try to replace each '\n' with an '\r\n' or an '\xa','\xd' pair. You may have to copy your strings into a buffer to do so, I've been doing so for a long time, Unfortunately, that's the only way it seems to work! By the way, Your resource NEEDS to be flagged as MULTILINE for any of the above to work!
LateNightsInNewry
|
|
|
|
|
Hi..
I'm using Visual C++ 6.0.
I have Downloaded and installed the Platform SDK Redistributable: GDI+ (File Name: gdiplus_dnld.exe Version: 3102.1360 ) to the computer.But I cannot compile GDI+ included project .It says that no such directory or file.The error code is given below.
Compiling resources...
Compiling...
StdAfx.cpp
d:\_thisara\gdi_c++\gdi++\stdafx.h(22) : fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory
Error executing cl.exe.
Please tell me what else I have to do inorder to proceed with GDI+ with VC++ 6.0
Thanks
ENTC
UoM
|
|
|
|
|
The redistributable is the package a user installs to use GDI+. You need the GDI+ SDK.
|
|
|
|
|
i want a com (vc++) project. please help me.
|
|
|
|
|
How much you pay for that?
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
|
First, read the tutorials on this site.
Kevin
|
|
|
|
|
Hi,
If I select 'System menu' in the properties of Dialog box so that I can have Maximize and Minimise buttons on the top, an icon appears on the left corner of the window of the dialog box. Is there anyway I can remove or change this icon?
Thanks.
Tara
Fortitudine Vincimus!
|
|
|
|
|
|
Thank you.
This is what I did:
HICON m_hIcon;
m_hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
SetIcon(m_hIcon,FALSE);
Fortitudine Vincimus!
|
|
|
|
|
Hai
if u want to change system icon.
u load a icon . in ICON resource view.
and give that icon IDI_NAME.
HICON m_hIcon;
m_hIcon = AfxGetApp()->LoadIcon(IDI_NAME);
SetIcon(m_hIcon,FALSE);
Hi,
Thanks, if u think it's good.
otherwise sorry.
|
|
|
|
|
U can do it as follow:
SetClassLong(hWnd,
GCL_HICON,
(LONG)LoadIcon(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDI_ICON__MAIN)));
==========================
Who: DollfaceYY (杨洋)
QQ: 55780839
MSN: DollfaceYY@hotmail.com
EMail: DollfaceYY@163.com
URL: DollfaceYY.china-pub.com
--- Inside Wintel! ---
-- modified at 22:00 Sunday 13th August, 2006
|
|
|
|
|
Hello everyone!
OK, I have:
vector<Vehicle> vehicles;
Class Vehicle doesn't have a constructor. However, when I add a constructor, I get this error on the line in which vehicles is declared (see above):
1>c:\incoming\war game\Game.h(11) : error C2065: 'Vehicle' : undeclared identifier
The declaration of the constructor is as follows:
Vehicle(int x, int y, int id);
What is wrong with this code? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
If you don't add a constructor, the compiler automatically adds an emtpty one for you. Add an empty constructor to your class, and it should work.
|
|
|
|
|
That's the problem - if I add an (empty) constructor, it gives me the error...
It's error-free when I don't add one.
Windows Calculator told me I will die at 28.
|
|
|
|
|
You must add a default constructor that doesn't need any parameters: Vehicle::Vehicle()
|
|
|
|
|
Hi..
Someone please help me to insert/add a GIF image in VC++ 6.0. And also I want to change the image's position (In XY Coordinates) and to rotate the Image in specified angles.(rotate only the image not the whole panel in the frame)
It is better if you can provide me some sample codes to do that.
I need someones help in the above matter...
Thanks
Dhananjaya
ENTC
UoM
|
|
|
|
|
Look into GDI+.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Use CImage . CImage can do some of you want .
|
|
|
|