|
Just use the XOR operator.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can if you're a university lecturer who likes posing useless questions.
But as to why you'd want to, I'm stumped - it creates evil looking nonsensical code
|
|
|
|
|
I would need to create icon during program run (independently of resource); it seems to me that the 'inner' format of icon can't be complicated, but I was not able to find description of it.
Or, alternatively, is there some possibility to convert bitmap object into the icon object?
Thanks for help and/or advice!
|
|
|
|
|
Do you have icons in out your program or you want to create them?
|
|
|
|
|
petrkar wrote: ...but I was not able to find description of it.
Try here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear all
how to build a Head file which include three classes? for instance, the Head file is img.h, three classes are tagColorRGB, tagColorRGBA, tagFloatPoint.
thank you.
Li Zhiyuan
20/10/2006
|
|
|
|
|
One at a time.
Seriously, if you need to do this, just lay them out in a row. The only trick is if they refer to each other, but you can forward declare them if need be.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.
kamalesh
|
|
|
|
|
|
EIther you need to think about how you word your questions, or you're typing your homework direct into the site without any thought. My money is on the latter.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
sorry i was at hurry....
I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.
kamalesh
|
|
|
|
|
|
kamalesh82 wrote: In mfc library there is no function for "fgets"...
Did you overlook CStdioFile::ReadString() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Am using 2004 MSDN. there is no such kind of function(CStdioFile::GetString()).
kamalesh
|
|
|
|
|
My bad. I meant CString::ReadString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi guys
I have been trying to copy a process's module(my own proggy). This is the scenario:
There is a process lets call it "Main.exe" which loads plenty of modules and among those modules there are 2 modules called:
1. "Checker"
2. "Copyer"
Now this Checker module checks the Copyer module once in a while but i want to somehow change some stuff in Copyer using Read/WriteProcessMemory but if i do this then Checker will detect that i have changed something and exit the process.
What i want to do now is somehow copy the "Copyer" module and then reinject it in the process so that there are 2 "Copyer" modules. Then i want to fool "Checker" into scanning the fake module that i copyed/injected in the process.
I know that this is possible but i dont know how to do this. Could someone please help me?
Thanks in advance
|
|
|
|
|
Here is a program, in the release version, there is a "Run time Error" appreared some times, I can get the module name and the address of the function, but the address is an Invalid value.
It is not occured either in the debug version or release version with debug information, and it is not occured anytime.
when I press the debug button, it will not show the debug enviorment but just shut down the program.
It is an ActiveX program I wrote and the error occured when it is being created.
How can I find out the reason of this bug and how to debug in this situation?
Thank u!
|
|
|
|
|
See "Debugging in Release Mode section" of this artcile[^].
|
|
|
|
|
Hello Everyone,
I'm a newbie, Please help me!
I'm adopting the code that could redirect a console output into the MFC Edit box.
My problem is, i want to have a live redirection from the console output to the edit box because i have a console application that will run about 5-10 mins and produces lots of information (output) in between those time in the command line.
My recent code will just wait the application to finish up before it could redirect the output from the command line to the Edit box.
Please help!.... thank you very much..
-rupert-
i need to learn more... i want to be like you guys... i'm just a begginer
|
|
|
|
|
Dear all,
i need to apply a set of changes to the project settings such as compiler options, linker options etc programatically. I found an MSDN article about automating MSDEV.
http://support.microsoft.com/kb/q247035/[^]
In the msdev automation interface there is a COM interface IConfiguration for each build configuration. I think by using that, we can update the project settings. But didn't find any useful information. Please help.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
This is rather general question wich entered my mind when i read an answer written by Christian Grauss to a question a little further down. He said that in C++ variables should not be declared until they are used. Why is that ? And why is that different in C ?
|
|
|
|
|
In C, you need to declare your variables at the top of your function (otherwise, you'll get a compilation error), which is quite messy (you have a bunch of declared variables that you don't know their purposes). In C++, you can declare your variables when you want in the function, so, it is better (IMO) to declare them only when you need them.
|
|
|
|
|
To add Cedric;
By declaring it at start, it will be in memory unnecessarily for longer time, when its required somewhere down in the code. So declare it when its necessary. And its always easy to track it in this case.
Mr.Brainley wrote: And why is that different in C ?
Its by standard in C.
|
|
|
|
|
If you create them at the top of a method and then at some point during the method you return without using the variable, then you have created it for no reason. This could be expensive if the creation takes a long time, or uses a lot of memory, or if the object has several base classes for example.
Typically you should only create a variable at the point you are going to use it, this an help the compiler perform its optimisations too.
It also makes the code easier to use and less prone to bugs as you cannot accidentally change the variable before first use if you create it only where you need it.
You can also control the scope of the variable so it only exists for as long as it needs to.
regards,
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
I guess I need to answer.
As has been said, in C, you have to do it at the top.
In C++, you don't, but some do, just because they learned from someone who does it that way, because they are used to it from C. Declaring the variable close to where you use it makes code more readable and less prone to bugs.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|