|
I am actually having trouble using GDI+ without getting compiler errors..
i have all my header files including GdiPlus.h in: C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include
i have the GdiPlus.lib in: C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib. i have also added GdiPlus.lib file in the additional dependencies of my project.
i have the .dll file stored in my local app directory..
when i #include GdiPlus.h, i get 107 compiler errors some of which are like the following:
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(28) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(28) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(520) : error C2146: syntax error : missing ';' before identifier 'ObjectTypeIsValid'
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(520) : error C2433: 'BOOL' : 'inline' not permitted on data declarations
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(520) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(523) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(548) : error C2065: 'META_SETBKCOLOR' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(548) : error C2056: illegal expression
1>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\GdiplusEnums.h(549) : error C2065: 'META_SETBKMODE' : undeclared identifier'
.. i am completely lost. any help on fixing this and enabling me to use GDI+ in my app without any trouble will be greatly appreciated.
--
dg
|
|
|
|
|
Sorry, I can't really help you out with setting up the environment for using GDI+ in native C++ as I've never done it myself -- I've only used the managed version.
As for your compiler errors, error C4430 typically indicates that you're missing the definition of a certain struct/class. The line number will tell you which one in particular it does not recognize, that you're trying to use.
|
|
|
|
|
Hello
How can i change the CLSID and progid for already existing projects.Should i generate this for each project using guidgen.exe?I want to be able to load the dlls from a different target path, as a seperate plugin.is it sufficient to change the clsid alone or should progid needs to be modified as well? What will be the efficient way to do this.
Thanks
|
|
|
|
|
I think the only practical way to do this is generate a new CLSID and paste it into the IDL file manually. Followed by a rebuild all. I have done this in the past to seperate different builds of COM objects.
Best Wishes.
-Randor (David Delaune)
|
|
|
|
|
Thanks for the reply David. Can i similarly change in the .rgs file associated with each project and do a rebuild all.The ProgID should not matter for loading dlls with same name from different target path right. Or can i manually change the last field of Project.ClassName.1 to Project.ClassName.2 in the .rgs file.I think the version independent progid can remain the same.
Thanks!
|
|
|
|
|
Yes, I forgot to mention that the .rgs files should also have the CLSID replaced. This is required to register the DLL and its interfaces. Technically the ProgID and the filename does not matter as long as all GUIDs have been changed. In fact; this why COM was invented (The cure for DLL Hell) although it failed miserably.
For the sake of completeness:
WinSxS (Side-by-Side) is Microsofts latest cure for DLL-Hell. http://msdn2.microsoft.com/en-us/library/aa374224.aspx[^]
Best Wishes,
Randor (David Delaune)
|
|
|
|
|
How is proxystubclsid generated?I find that in my application proxystubclsid is same as proxystubclsid32 and a default (same)value is used for all interfaces.
|
|
|
|
|
i am a multimedia student...next year i must develop a multimedia project to get my degree...can you all help me what is the suitable and the best project that i should develop...please give idea...thanks
kayana
|
|
|
|
|
This is a site for those who write actual code and the code does not work. Figure your own ideas on your own time.
______________________
stuff + cats = awesome
|
|
|
|
|
I am new to C++ have done some mainframe programming
I have a C++ question I figure Here is the best place to post it
What is the main advantage of having base and derevied classes instead of 2 seperate declarations
e.g.
Class MyClass : public CSstring
{
.
.
.
}
As opposed to
Class MYclass;
Class CSstring;
Is it that in former I can get at CSstring protected members/Methods ????
Thankx
|
|
|
|
|
There are many uses of inheritance, one of them being that you can develop interfaces. Inheritance is also a fundamental when it comes to using object-oriented design to solve problems. Depending on what kind of problems you are trying to solve and the complexity of the framework that you have to design, you may not use it much, or you may use it quite extensively.
In your example, yes, you can access protected members/methods, but that's not the reason why you'd use inheritance. If you have no need for any class hierarchy, then there might not be any benefits from using it.
|
|
|
|
|
its mainly a design thing The Base Class could be the lowest level interface, Where a user is Using a Object he/She may not need to access that low a level However the Derived Class may have a need for it
I have a project I want to write and I think once I get to coding I'll get a better feel for it
Thankx
|
|
|
|
|
What if you had a Car class and a Truck class? It wouldn't make much sense to have all of the common aspects duplicated between each. Instead, everything that is common to both a car object and a truck object should go in a base class (named Auto or Vehicle). Make sense? You could apply the same logic to:
Shape
/ | \
Ellipse Rectangle Triangle
| |
Circle Square And:
Animal
/ | \
Dog Cat Horse
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thankx I beginig to get the idea
|
|
|
|
|
Hello board, I want to print 10 columns in a list box so that it seems visually they are ordered in columns.
I use this code:
<br />
--- ------ ------ ------<br />
--- ------ ------ ------<br />
--- ------ ------ ------<br />
sInfo.Format(_T("%5d"), i);<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d1),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d2),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d3),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d4),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d5),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d6),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d7),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d8),<br />
sInfo.AppendFormat(_T("%9.3f ")), m_d9),<br />
Now , when I use this code deponding on number of significant digits in the double number, columns shift either to left or right(if number of digits are less than above row the whole row shifts to left and vice versa).
but when I use this code:
<br />
sInfo.Format(_T("%5d"), i);<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d1),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d2),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d3),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d4),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d5),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d6),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d7),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d8),<br />
sInfo.AppendFormat(_T("%09.3f ")), m_d9),<br />
everything becomes as I desire. I explain it in this way that size of blank characters that are placed in the first code is less than size of other digits. I actually do not like to see these zeros here(I wouldn't complain if these zeros were at right side of my bank account but not here ).
Is there anyway that blank characters be printed with the same size of other digits? thanks.
|
|
|
|
|
You could use a fixed-pitch font for the listbox:
LOGFONT logFont;
memset(&logFont, 0, sizeof(logFont));
logFont.lfHeight = -10;
logFont.lfWeight = FW_NORMAL;
logFont.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;
m_fixedfont.CreateFontIndirect(&logFont);
...
m_ListBox.SetFont(&m_fixedfont, FALSE);
m_ListBox.AddString(_T("0.01 123.12"));
m_ListBox.AddString(_T("0.01 23.12"));
m_ListBox.AddString(_T("0.01 3.12"));
m_ListBox.AddString(_T("0.01 123.12"));
m_ListBox.AddString(_T("0.01 123.12"));
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks alot mark, it definately looks good. problem solved!
|
|
|
|
|
Electronic75 wrote: problem solved!
Why not just use a list control (in report mode)?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all.
i am trying to output two windows using GLUT and for some reasons, only one window can be rendered at a time. when i try to output two windows, the application just flashes and closes immediately. i comment out on or the other window creating (glutCreateWindow) line, it works by outputting one window..
so my question is if it is possible to create two windows simultaneously and if yes, how??
--
dg
|
|
|
|
|
How can i get my network card's detailed info with WMI and without WMI ?
Thank you very much.
|
|
|
|
|
|
Thank you very much Mark , once again
Regards
|
|
|
|
|
You're welcome!
Did you ever get the Nero QT decoder to work? I couldn't do it on my machine
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have used cyberlink filter instead of it , and it worked properly
|
|
|
|
|
Cool! Thanks
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|