|
I can't see the CGridPoint class in ATL or MFC; is this a Microsoft or home produced class?
|
|
|
|
|
He has found the cause. A call to DirectX was changing the floating point (double) precision ..
|
|
|
|
|
I think we need to see CGridPoint. I suspect that it is explicitly rounding things to 2dp (or could even be quarter-points from the particular example you gave).
|
|
|
|
|
A quick look at the rounded result (7xxx.25) shows it to have about the precision we'd expect from float . I'd wager that there's an explicit or implicit conversion to float and back again hidden in there somewhere. Looks like you'll have to pick through it line by line.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Implementing a Custom Download Manager?
Asynchronous pluggable protocols enable developers to create pluggable protocol handlers, MIME filters, and namespace handlers?
|
|
|
|
|
A easy method is using UrlDownloadToFile()
|
|
|
|
|
How to add Common Controls 6.0 to DLL / ATL ?
I don't have the source code of the EXE, I'm writing only the DLL linked to it.
If I put this line in the stdafx.h of the DLL it doesn't work:
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
InitCommonControls(); / InitCommonControlsEx();
is not working neither,
I need Common Controls 6.0 to show my tooltips controls and they work only with the manifestdependency line at the exe file / or manifest file to exe
Thanks for anyone who can help,
Mithrill
|
|
|
|
|
If you are allowed, then try modifying the manifest inside the executable, -as far as i know- it is stored as resource inside the executable and you can modify resources in the binary. Try using UpdateResource[^] or google for applications that can do this.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Maybe there is a way to do that with
LoadLibrary(comctl32.dll)
GetProcAddress ???
In some kind of dynamic way ?
There must be a way
|
|
|
|
|
I wonder, does the exe load comctl32.dll but calls InitCommonControls[^] and not InitCommonControlsEx[^] and would it help if it were to call the Ex version? You could try hooking the InitCommonControls API method and call the Ex version instead, i wonder if that would work.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
I've found it easier to create a .manifest or .xml file in the res folder, and then add the apropriate entry to the .rc file.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
You cannot do this in a DLL, only in the original executable. The #pragma is meaningless in a DLL because it only gets loaded on demand and is not allowed to conflict with the settings of the main executable. You will either need to get hold of the source or object code of your executable and rebuild it or live with the problem.
|
|
|
|
|
But there is no way of loading Common Controls from DLL ??
Maybe forcing the InitcommonControlsEx to load the 6.0 version like the pragma/manifest does ?
Mithrill
|
|
|
|
|
Not unless the EXE program calls a function in the DLL immediately on startup. You are trying to alter the conditions and environment of an application without the application itself being involved, and I don't think that is viable. As I said before, you need to get the source code of the application and change that.
|
|
|
|
|
It sounds to me like you should be looking into "XP Style Hacker"
I've used this program dozens of times to make old programs look more modern. It creates a manifest file in the same folder as the executable. No need to modify the original, as windows loads the manifest file, PROVIDED it has a name in the correct format. I seem to remember this as being "exeFilename.exe.manifest".
The tool's free to download and use, I reckon it's just what you're looking for.
|
|
|
|
|
I can't change the exe cause of company restrictions, I have only the DLL programming and I don't
Distribute the EXE, I Just write a DLL and deliver it to the other guys abroad.
I work in a big firm, I can't change the EXE
Mithrill
|
|
|
|
|
I had no idea of the size of the company you work for (& no more interest, to be honest)
I'm not advocating the changing of any exe file.. If you take the time to actually look at the tool "XP Style Hacker", you'll come to understand that so long as you have a copy of the EXE, it will create the manifest file for you. You can then distribute the manifest file with the rest of your code. Provided the manifest file is put into the same folder as the EXE file, it'll just work.
So please, do yourself a favour and actually try the tool...
EDIT: And please re-read my last post. It seems your reading and comprehension skills are a little depleted today. I said in my last post that there was no need to change the exe....
|
|
|
|
|
mithrill wrote: I work in a big firm, I can't change the EXE
Then you need to explain to your boss that what you are being asked to do is not technically feasible, and he needs to go back to the people responsible for the EXE and tell them they will have to change their application.
|
|
|
|
|
Hi!
Is it possible to code classes, polymorphism and every other
Object oriented concepts in C also?
|
|
|
|
|
There's an app article for that: Polymorphism in C[^]
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Thank you Sir! for the quick reply. Can you tell me what is the difference between C & C++ then?
Why C++ if C could do all things that C++ can do? Please give me some explanation.
|
|
|
|
|
C is NOT an objected oriented programming language. It was never meant to be. Since you asked if it's possible to achieve polymorphism with C, I linked you to an article. C++ on the other hand, was meant to be an object oriented programming language.
pix_programmer wrote: Why C++ if C could do all things that C++ can do?
Why write C code if x86 assembly code can do all the things that C can do? The same logic applies here.
C++ was designed to be a object oriented programming language (like I already said), and that's why you would use it to write object oriented code. I won't write C code, unless may be if I'm writing a device driver or a program that would run in an embedded device with very minimal resources to spare.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Rajesh R Subramanian wrote: I won't write C code, unless may be if I'm writing a device driver or a program that would run in an embedded device with very minimal resources to spare
Sir! Please don't take it in the other way. I attended one Embedded interview. The interviewer asked the above question. I don't know what is the answer. That's why I asked the genius. What would be the perfect answer to the following question of the interviewer?
What is the difference between C & C++?
|
|
|
|
|
What is the difference between C & C++?
C++ natively supports more programming paradigms than C.
C was made for procedural programming, and C++ supports this just as well, but also supports object-oriented and generic programming.
|
|
|
|
|
Cool Cow Orjan wrote: C++ natively supports more programming paradigms than C.
nice answer.
Watched code never compiles.
|
|
|
|