|
google is your friend dude!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
I would like to know HOW I can delete all Cookie from Internet Explorer 7.
Is there a function in the API?? I could not find anything.
Thank you in advance!!
|
|
|
|
|
shareholder771 wrote: I would like to know HOW I can delete all Cookie from Internet Explorer 7.
i don't able to find the specific function, but yes you can delete it from Internet History folder situated!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
You're talking about your intelligence coefficient?
Apart from spam and abuse, we need a "Report crap" link!
|
|
|
|
|
|
It was something like this:
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
so it wasnt a simple question.
|
|
|
|
|
Actually it was two smileys!
I'll let you decide if that's simple or not
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
MarkSalsbery wrote: I'll let you decide if that's simple or not
well said,but it needs to a powerful compiler for decide about it
|
|
|
|
|
brahmma wrote: Apart from spam and abuse, we need a "Report crap" link!
i second you on that!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
BOOL bValue;<br />
<br />
if (bValue)<br />
{<br />
bValue = FALSE;<br />
}<br />
else<br />
{<br />
bValue = TRUE;<br />
}
If write this code to InterLocked functions, how to write?
if (InterlockedExchange(&bValue, TRUE) = TRUE))<br />
{<br />
InterlockedExchange(&bValue, FALSE);<br />
}
Right?
Thanks.
|
|
|
|
|
Currently, i am translating my VC++ 6.0 program into C++ program.
in my old VC++ program, i wrote an struct array into a file using
<br />
for(i = 0; i < struct_array_size; i++)<br />
{<br />
CFile::Write(&struct_address, sizeof(struct))<br />
}<br />
the struct is defined as
<br />
struct S{<br />
string Str;<br />
int Value;<br />
}<br />
Now, i wonder if there is an equivelent in standard C++ for CFile::Write().
Thanks,
|
|
|
|
|
All the same file I/O methods are still there. Are you trying to not use MFC?
The stdio functions (fopen, fread, fwrite, etc.)
The fstream classes
CAtlFile
CFile and derived
Windows APIs
etc.
Also, writing a string object like that - I don't think that will work (it may write but reading
it back in, I don't think so). It will write the object bytes but not the string contents.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery,
thanks,
Yes, I am avoiding to use MFC classes.
Would you please be more detialed on how to use fstream class to implement my purpose.
Yes, i actually had problem with string item in the struct. Actually, I used char Name[20]. However, the length of the contents is varying. 20 is the max. length of the Name attribute of objects. Hence, memory was wasted by objects with a Name less than 20 characters. How to solve this problem.
Actually, I need a function in pure C++ framework to write/read the struct as a whole just as with CFile::Write() in VC.
|
|
|
|
|
cy163@hotmail.com wrote: Would you please be more detialed on how to use fstream class to implement my purpose.
#include <string>
#include <iostream>
using namespace std;
...
class S
{
string Str;
int Value;
public:
friend ostream& operator<< (ostream& os, S& s);
friend istream& operator>> (istream& is, S& s);
};
ostream& operator<< (ostream& os, S& s)
{
os << s.Str;
os.put('\n');
os.write((char *)&s.Value, sizeof(int));
return os;
}
istream& operator>> (istream& is, S& s)
{
is >> s.Str;
is.get();
is.read((char *)&s.Value, sizeof(int));
return is;
}
...
S s;
ofstream myfile("c:\\testmyfile.ext" , ios::binary : ios::trunc);
myfile << s;
...
S s;
ifstream myfile("c:\\testmyfile.ext" , ios::binary);
myfile >> s;
cy163@hotmail.com wrote: Yes, i actually had problem with string item in the struct. Actually, I used char Name[20]. However,
the length of the contents is varying. 20 is the max. length of the Name attribute of objects.
Hence, memory was wasted by objects with a Name less than 20 characters. How to solve this
problem.
I think there's some answers in your other post
cy163@hotmail.com wrote: Actually, I need a function in pure C++ framework to write/read the struct as a whole
Using the fstream classes will give you a OO, C++ way. You can make your class able to serialize
itself, as shown above.
Mark
-- modified at 1:44 Sunday 6th May, 2007
Fixed bonehead code
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Is it possible to have a custom icon size in the system tray?
I would like to be able to overlay a timer (hours:minutes) on top of my system tray icon, but due to the default size (16x16), there simply isn't enough room to display the timer in a visually appealing manner.
Thanks,
Adam
|
|
|
|
|
that would be a cool feature and i've often wanted to do the same.
but i haven’t found a method of doing so
i maybe wrong but i don’t think it is possible to have a icon greater than 16x16 in the sys tray.
|
|
|
|
|
TragicComic wrote: would like to be able to overlay a timer (hours:minutes) on top of my system tray icon, but due to the default size (16x16), there simply isn't enough room to display the timer in a visually appealing manner.
ythats typical .. you haev to redraw the system bar urself
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How can I determine what is the version of the operation system for a program and the Service Pack? In vc6++.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
GetVersionEx()
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks!
I'll try monday
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Look at the following functions:
GetVersion()<br />
GetVersionEx()<br />
VerifyVersionInfo()
|
|
|
|
|
Thanks!
I'll try monday
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
brahmma
Covered the main ones
I had to do a similar class awhile back,
the function GetSystemMetrics(int); has two values which are useful
SM_MEDIACENTER and SM_TABLETPC
if you want anymore info about the system such as model
IWbemClassObject
good old WMI has a lot to offer.
p.s if your going to use GetVersionEx();
make sure your application fails safe if the wrong (unexpected) number returns
i know vista is new but wont be new forever
|
|
|
|