I'm currently working on an DOS App but i don't know how to use colors. For e.g. I want to set the BK color on BLUE and the Text color on WHITE. And i don't know to how to draw borders. I didn't found any Articels about this.
I want to write a virtual printer driver.
The driver should be used from any print-dialog like any other printer which is installed on the system.
It should get the pages to print, change them and give them to the "real" printer.
Probably someone knows how to write such a driver an how to give the data further to the "real" printer.
Is this possible with Visual C++ and MFC? And how to make it?
I hope someone can answer me because there are very few things on this topic on the internet.
I want to develop a application which will connect me directly to yahoo messenger window(or any desktop application). i.e entering username and password in Login window will be handled by my application.
I need to get all users information from my windows system.
not only the users from local domain
I want to be able to see users from other domains who have rigths on my machine to indentify the privileges.
I used NetEnumUsers API but this function return only users from local domain
Anyone can help?
This is very urgent. The problem which we are facing in our project is related to the floating point optimizations performed in VC++. The following code snippet elaborates this:
a = 1.D0
b = 0.1
x = a/b
end program main
The above program construct in Fortran stores b as 0.100000001490116 & computes x as 9.99999985098839.
The same equivalent construct in C++ with double variables stores b as 0.10000000000 & computes x as 10.00000000000.However if we declare b as float we get similar results(but our project can’t use floats).
The difference in the results is attributed to the fact that C++ perhaps performs some optimizations to store values of type 1/10 1/100 etc.Hence gives expected results.
Our project requires similarity in results across Fortran & C++.Also we are only free to make changes in the C++ code.We have tried few things in this regard like /Op switch, _control87 & _controlfp.routines with different arguments but couldn’t resolve the problem.
What is required precisely is that the following code segment should assign x the value 9.99999985098839 & that too there should be some global setting sort of thing in VC environment as the code spans around 3 lakh lines which makes it difficult to make changes everywhere.
a = 1.0;
b = 0.1
x = a/b;
Any help in this regard will be highly appreciated.
In C/C++ a float data type uses 4 bytes to store the number, and IIRC has an accuracy of 6 decimal points, so any digits after that are subject to inaccuracy. A double data type uses 8 bytes to store the number, and has an accuracy of 15 decimal points.
I would assume that the fortran code you are using is generating 4 byte floating point numbers, which is why you are getting the same inaccurate numbers as the float type is giving you.
In FORTRAN, that brings back memories!!! All I could suggest is look for a freeware maths library that defines it's own double "variable". I know there are lot's out there hopefully there will be one that will work for both FORTRAN and C and will give identical results.
But someone may come up with a compiler switch, but I doubt it. The other alternative is to work in long integers and convert to double at the end, but beware of overflows.
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
It's been about 20 years since I did FORTRAN, but I think that floating point literals (like 0.1) are single precision by default in FORTRAN but double precision in C/C++. This causes the difference in value of "b" and "x". There may be a compiler switch to change that.
i am makigna mfc app Doc/View style..
i ahve two views...
now normally the two views are white in color...
what if i want them to be permanently black??
what do i change in my app to make bothe the views black forever...so that whatever i draw on it will be like drawing on a black background...
can someon pls help...
tks a lot...
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18