|
change the form view class at run time
ahmed
|
|
|
|
|
is that a question ?
is that an order ?
is that a suggestion ?
|
|
|
|
|
anmllll wrote: change the form view class at run time
which form view class
|
|
|
|
|
|
I am trying to create a "Wife is coming" button. The present process of deleting the brower history, temporary internet files, cookies, etc has too many clicks and is too time comsuming (considering the wife is coming and will go straight to the history to find evidence of my porn surfing -- yeah, i'll say it; i'm whipped).
Anyway, I need a 1-click solution. I already know how to create an icon in the internet explorer task bar that will run a .exe or .vbs file using regedit.exe. Now I need a file to run that will do what Internet Explorer does when it deletes the cache, history, etc that I can link to the icon in the registry.
I know that when I click the "Delete All" button in IE7, the rundll.exe process turns on for a few seconds until the cache is clear, then ends when it is finished. What I need to know is what .dll is being run to delete the cache and can I create a .vbs file that can do the same thing?
Any help I can get is greatly appreciated.
Matt
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
That's almost what I am looking for, however, what I really need is a .vbs or .bat file that will use rundll.exe to do everything. Is this possible? How does IE7 delete it's history/cache? I am almost certain it uses rundll.exe. I just don't know which .dll it uses. (possibly wininet.dll or occache.dll???) Even if I knew which .dll is used, I need the correct code to make the .dll delete everything I want it to delete.
|
|
|
|
|
Honestly, I would look for a program called CCleaner
It basically is a secure "wife is coming" button. You can just have it erase once instead of the DoD 15 times or w/e it is, that'll make it faster.
If you were looking to make your own for the challenge tho, I really don't know; I'm just suggesting something that's already out there.
|
|
|
|
|
How can i get the system time and display it?
|
|
|
|
|
shamsteady wrote: How can i get the system time...
Use GetSystemTime(), or time() .
shamsteady wrote: ...and display it?
Use printf() , or cout .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It said GetSystemTime() is undeclared. Am i missing something?
|
|
|
|
|
shamsteady wrote: Am i missing something?
Yes, the inclusion of a header file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
shamsteady wrote: Yes, the inclusion of a header file.
shamsteady wrote: t said GetSystaremTime() is undeclared. Am i missing something?
which compiler are you using@!
|
|
|
|
|
Also, you can use the time_t structure.
time_t t;
time(&t);
cout<<ctime(&t);
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
See
SYSTEMTIME m_SysTime;
char DisplayTime[255];
::GetSystemTime(&m_SysTime);
sprintf(DisplayTime,"%d/%d/%d...%d::%d::%d::%d",
m_SysTime.wMonth,m_SysTime.wDay,
m_SysTime.wYear,m_SysTime.wHour,
m_SysTime.wMinute,m_SysTime.wSecond,m_SysTime.wMilliseconds);
|
|
|
|
|
Hi All,
I'm trying to overload the assignment (=) operator so that I can achieve the following:
int x = myclass;
instead of:
int x = myclass.Value();
I am implementing it as follows:
class CMyClass
{
private:
int m_nValue;
public:
int& operator=(CMyClass& class);
int Value() { return m_nValue; };
};
int& CMyClass::operator=(CMyClass& class)
{
return class.Value();
}
But I keep on getting a compiler errors either saying that there is no suitable conversion, or that it cannot convert from CMyClass to int.
Clearly my syntax (or something) is screwed, so how can I fix it ?
Thanks
OD
|
|
|
|
|
Write a casting operator instead:
operator int() const { return m_nValue; }
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Damn, you were faster
|
|
|
|
|
Nemanja Trifunovic wrote: Damn, you were faster
Hehe, sometimes I get lucky.
Haven't refreshed in about two hours.
It was a good thing that we suggested the same thing though...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks, worked like a charm !
|
|
|
|
|
od@ananzi.co.za wrote: I'm trying to overload the assignment (=) operator so that I can achieve the following:
int x = myclass;
instead of:
int x = myclass.Value();
If I got your intention correctly, you need operator int , not operator =
|
|
|
|
|
I'm porting a legacy app. This code was fine in VC6, but VS2005 doesn't
like it:
struct CColumnBool
{
std::vector<bool> m_vBoolData;
CColumnBool()
{
m_vBoolData.clear();
};
bool& operator[](UINT uiRow)
{
return m_vBoolData[uiRow]; // <--- error on this line...
};
const bool& operator[](UINT uiRow) const
{
return m_vBoolData[uiRow];
};
};
The error is this:
error C2440: 'return' : cannot convert from 'std::_Vb_reference<_MycontTy>' to 'bool &'
with
[
_MycontTy=std::vector>
]
The weird thing is that this code does NOT generate the same error:
struct CColumnInt
{
std::vector<int> m_vIntData;
CColumnInt()
{
m_vIntData.clear();
};
int& operator[](UINT uiRow)
{
return m_vIntData[uiRow];
};
const int& operator[](UINT uiRow) const
{
return m_vIntData[uiRow];
};
};
C2440 is a type conversion error, of course. MSDN lists several
causes for this, but I don't see where they apply. Any ideas
how to fix this?
|
|
|
|
|
|
Adis H. wrote: This may help perhaps:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1354391&SiteID=1[^]
Yes, that's it exactly. Thanks!
|
|
|
|
|
std::vector<bool> is not based on an array of bool . Instead the bits are packed, and as such it is impossible to take the address of any given bit, or create a reference to it. Instead operator[] has to return a proxy class.
This is a specialization of the vector template required by the C++ standard. This is widely considered to be a massive error in the standard. Unfortunately it is required, in order to claim conformance to the standard.
|
|
|
|