|
As far as I can tell, GDI+ 1.1 is not out yet. Maybe Microsoft should make it more clear in the MSDN which classes do not exist yet. I wonder when it will be available?
Your image effect code is really helpful! I have looked at your code, and that should be sufficient for the project I'm working on.
Thanks for the help.
-Ben
|
|
|
|
|
I'm glad I helped. Yeah, it's not always totally clear, but I'd say a lot of the docs are for .NET 2.0, and that GDI+ 1.1 probably will come out with Vista.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm now trying to transplant a C++ program written in Linux to make it run in DOS, but there are quite a lot of header files that are not support in VC 6.0( I am now using it ),like<unistd.h>,<sys socket.h="">,etc.What can I do?
Thanks for help.
|
|
|
|
|
Sorry , like "sys/socket.h", "unistd.h", etc.
|
|
|
|
|
I hope by DOS you mean Windows command line, since with VC6 you can't make DOS programs.
Is there an option to install Cygwin on the machines where you want your Linux software to run?
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Yes, I hope to rewrite the code with VC6 and run it in Windows command line.
Thanks!
|
|
|
|
|
1. comment out the offending headers.
2. when you get compiler errors due to unknown symbol, look in the help for that symbol and what header it is in. (click on symbol and press F1)
3. #include that file
4. repeat from step 1 or 2 until all is well.
-- modified at 17:40 Wednesday 19th October, 2005
|
|
|
|
|
Hi fellows
I have a struct like this
struct infoGame
{
time_h theTime;
bool bAcumVariavel;
float fValCred;
};
I would like to know how can I cast these values to a char to put in a message. I'm using dev C++ 4.9.9.2.
Thanks for help
|
|
|
|
|
None of these values can be converted to a char *, at least, not safely. If you were to cast to a char *, and then create a new string there, the value would become invalid for what it's meant to hold.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You have to be a little more specific.
In case what you need to do is to convert the structure to a "seequence of char-type variables" which is called serialization of data-types (there's a ton of documentation about it out there) than your best bet is to simply use the C-style casting such as:
<code>
struct infoGame
{
time_h theTime;
bool bAcumVariavel;
float fValCred;
};
char *serializeStructure(struct infoGame inputStruct)
{
return (char*)inputStruct;
}
void UnSerializeStructure(char* inputBuffer, struct infoGame* outputStruct)
{
outputStruct* = (infoGame)inputBuffer;
}
</code>
Then you could use these functions to save the structure to a file for example and then to retrieve it from a file etc.
In case you were trying to display the members of the strucutre i.e. to a string to then use TextOut or printf than what you're looking for is sprintf. You can use it to print (and format) other data-types into a string which can later be printed on the screen or to a printer.
e.g
<code>
struct infoGame
{
time_h theTime;
bool bAcumVariavel;
float fValCred;
};
struct infoGame sIG;
char* myText;
myText = (char*)malloc(1024);
sprintf(myText, "Long Variable is = %d, Boolean Variable = %d, Float Variable = %f", sIG.theTime, sIG.bAcumVariavel, sIG.fValCred);
free(myText);
</code>
mikk
-- modified at 19:20 Wednesday 12th October, 2005
|
|
|
|
|
Hi friends,
I want to know how to configure windows update. If you know please give me reply.
Regards
kedar
|
|
|
|
|
Right Click on "My Commputer" and chose properties. Chose "Windows Update" there you have it
|
|
|
|
|
Hello boss
I know this things but still it is not working and that's why i have posted it.
I have configured automatic updates on a specified time but still it fails to start downloads, on that i want help
With Rgds
VC++
|
|
|
|
|
IF you have Windows xp Pro then try:
start->run and enter gpedit.msc
Under Computer or User managent find "Administrive Template", then find "Windows Component". there you will find "Windows Update" Inside you will find a lot of options. Thease options are difrent in "Computer managent" and "User managent"
I don't know for home edition.
ps: I hope this works
|
|
|
|
|
Actually i have checked out gpedit setting also but still it fails to work on specified schedule is there any else settings.
Very much urgents
With Rgds
VC++
|
|
|
|
|
Did you try to use windows update, to update this updater. Without it you can't use windows updater to updato your windows
|
|
|
|
|
I have been having a long debate with the developers in my company about porting our MFC software to C++.Net. The main concern is performance really. The software's primary goal is to track the flight of a ball in three dimensions using vision processing techniques. The software is, however, notoriously unreliable, with pointer errors and other software problems causing crashes quite frequently. Many of you may find this laughable but we are still using the VC6 compiler in Visual Studio 6. Aside from that, having had brief interludes with the .Net framework *and* MFC, I feel the .Net framework is far easier to use than MFC and seems to be a lot more stable too. From what I've seen and heard, .Net seems to be the answer in terms of development and productivity.
The other developers argue that the main issue is real-time performance. They feel that trying to get as low-level as we are would be difficult in .Net (but it's not like we're coding in assembly or even C for that matter; just standard C++). I believe they simply have a misguided understanding of how it all works. They seem to believe that the CLR is functionally the same as the Java Virtual Machine and that the intermediate language requires an extra layer of processing. My understanding is that the main purpose of the MSIL is for cross-platform compatibility and that it is possible to compile to the native machine language thus resulting in performance comparable to a Win32 compiled version.
Firsty, is this the correct analysis, and secondly can anyone give me URL where I could find information on benchtests comparing MFC v .Net compiled C++ programs?
|
|
|
|
|
Klempie wrote:
MFC software to C++.Net
Sounds like hell.
Klempie wrote:
The software is, however, notoriously unreliable, with pointer errors and other software problems causing crashes quite frequently.
Not wanting to be rude, but .NET won't compensate for bad code.
Klempie wrote:
Many of you may find this laughable but we are still using the VC6 compiler in Visual Studio 6.
I wrote a lot of code in VC6, no crashes or memory leaks. The problem is not the compiler.
\
Klempie wrote:
I feel the .Net framework is far easier to use than MFC and seems to be a lot more stable too. From what I've seen and heard, .Net seems to be the answer in terms of development and productivity.
Managed C++ is a PITA, IMO. If your dev team is not smart enough to use pointers, they will find other ways to write bad code in MC++ or C# ( I'd recommend C# ), and the end code will be slower. But, it's not going to give the sort of errors you have now, that much is true. Or, it can be.
Klempie wrote:
The other developers argue that the main issue is real-time performance.
They are sort of right. Managed code is compiled the first time it is run, the difference could be less than you think.
Klempie wrote:
I believe they simply have a misguided understanding of how it all works.
No, they are right. But, you may be right in terms of the difference not being insurmountable.
Klempie wrote:
They seem to believe that the CLR is functionally the same as the Java Virtual Machine and that the intermediate language requires an extra layer of processing. My understanding is that the main purpose of the MSIL is for cross-platform compatibility and that it is possible to compile to the native machine language thus resulting in performance comparable to a Win32 compiled version.
They are right. You cannot compile a native machine language version. The .NET frame work does that for you, just like the Java VM does.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am afraid you are stuck here. You obviously don't have expertise to write solid C++ code (MFC is not unstable, your code is), and .NET is not suitable for the kind of processing you do.
I would try to re-write the software in a simpler but performant language, like C or (seriously) Fortran, even at the cost of lost productivity. Or, if you like living on the edge, you can try something like D which claims to have high performance but is easier than C++.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Hi folks!
I'm struggling to find a reliable way to build an interface between an unmanaged C++ application and a managed C# remoting application.
I've got to build an interface dll that's capable of signalling events by calling callback methods in given feedback objects.
This callback has to be called from the same thread the interface dll is being loaded in.
Something like this:
class MyObj
{
public:
virtual void OnXChanged(int arg) = 0;
} as declaration for the callback function.
The C# server is signalling the corresponding event by calling an asynchronous event handler in a managed class in my mixed mode interface dll.
Something similar to this:
void InitManagedServerComm()
{
ManagedCallbackObj* managedCallbackHandler = new ManagedCallbackObj();
pRemotingServer->RegisterEventClient(managedCallbackHandler);
} where ManagedCallbackObj is implementing an interface consisting of callback functions the remoting server is able to signal events with:
__gc class ManagedCallbackObj : public IEventClient
{
public:
void OnEventX(System::Object *pObj, MyEventArgs* pArgs);
...
} So far, so good, the remoting server successfully calls my managed callbacks (i.e. runs through OnEventX()), but this managed event handler function gets called from a different thread, not the one the dll was loaded in, of course.
So I need a way to transfer the event from the managed event handler to an unmanaged method in a different threat that's calling the given callback.
If I was in a pure C# world I'd simply create a Control and call Invoke() , but how to do this between managed and unmanaged?
Any ideas how to accomplish this?
Really stumped,
mav
|
|
|
|
|
I am really havin trouble understanding your problem but I believe that I have an ideea for you. Can you please try to explain a little more in depth what you are trying to do?
Is it an unmanaged class that you need to be called into when an event occurs? or the other way around.. please be a bit more specific.
Mik
|
|
|
|
|
Thanks for your reply!
It's a bit complicated.
I have to handle objects implementing an unmanaged interface, let's call it IUnmanaged .
Part of this interface is a notification function, something like void OnPropertyChanged(PropertyType type) , that has to be called when a property of the object changes.
The other methods of IUnmanaged have to communicate with a C# remoting server (let's call its interface IManagedServer ) to perform their tasks.
In order to be able to access the managed server, I'll have to use managed code, so the result is a mixed mode dll.
This server defines an event (ManagedPropChanged ) which in turn has to trigger OnPropertyChanged() for a certain IUnmanaged object.
Usually I'd just hook up the events and in the event handler OnManagedPropChanged() I'd call pMyUnmanagedObject->OnPropertyChanged(PropertyA) .
The problem is that OnManagedPropChanged() is called by the .NET remoting infrastructure from a different thread than the one my IUnmanaged object was created in.
I have to call OnPropertyChanged() from the same thread the object was created in, that's part of the IUnmanaged specification.
One way I've come up with is to create an invisible window from the original thread and to PostMessage messages to this window from the OnManagedPropChanged handler, but I was wondering if there is a
better way.
Regards,
mav
-- modified at 13:51 Monday 10th October, 2005
P.S.: You'll see that I've modified the code structure a bit so that the problem gets clearer, but the basic problem is the same as the one in my first post...
|
|
|
|
|
Hi friends,
I want to know how to perform windows update. how windows update configure.
give me a reply.
Regards
kedar
|
|
|
|
|
I presume you are using windows xp with default setting. Click Start and then klik "Help And Support"
Find windows update. It shoud be lower right side.
ps: this question shoud be under SysAdmin dorum not in MC++ forum
|
|
|
|
|
Hello,
I am trying to build an dll in .Net, using managed C++. But i need to use
another dll in my project. I have the xxx.dll file and xxx.lib file.
But i do not know how to set my project to link it to my project.
I know how to do that in Visual Studio 6.0 C++, in Project Settings--->Link,
add "/libpath:../../lib" under "Project Options" and add xxx.lib under
"Object/library modeules". But i do not know how to do this in .Net. I am a
newcomer in .Net
Thanks for your help!
vic
|
|
|
|