|
Hi,
I want to invoke the virus scanner for some files programmatically. Do some of the leading anti-virus(like McAfee or Norton) scanners provide any APIs for performing such task? How do I invoke virus scanners to scan for a particular file based on a application's need.
Thanks.
Learning is a never ending process of Life.
|
|
|
|
|
I have used 3 different help authoring tools and after doing my help file development my resultant help file displays all of the topics for Internet Explorer!
Does anyone know what is going on?!?!
|
|
|
|
|
Hi,
I have a web browser control, I have added the WS_CLIPCHILDREN style to my CFormView and the "normal" flickering isnt there.
Now the problem is I am trying to resize the web browser control OnSize of CFormView and it flickers during that, I have tried all possible combinations to no avail (The WS_CLIPCHILDREN style is set, this is when the web browser control is resized *WITH* the CFormView class)
quote:
--------------------------------------------------------------------------------
void CMyFormView::OnSize(UINT nType, int cx, int cy)
{
ModifyStyle(0, WS_CLIPCHILDREN);
CFormView::OnSize(nType, cx, cy);
if (IsWindow(m_webbrowser.GetSafeHwnd())) {
m_webbrowser.MoveWindow(0,0,cx,cy, FALSE);
}
// TODO: Add your message handler code here
}
--------------------------------------------------------------------------------
Any idea how to stop this behaviour?
Thanks in advance!
|
|
|
|
|
Hi Everyone,
I have generated a MDI program and have been running it overnight to test its robustness. But I have a problem here. It seems that the whole program would sometimes disappear. I wonder if there is any memory problem or thread gone missing. Hope that anyone can enlighten me. Thanks.
|
|
|
|
|
Run it in the debugger and see where it crashes.
John
|
|
|
|
|
Erm I had tried that but it only disappears when it is doing a continuous run and just like a time bomb yoo don't know when it will happens.
|
|
|
|
|
Hello,
I've been playing around with MSVC++ 6.0 for a while off and on and I'm dumbstruck. I have my Login all setup heh it's not encrypted or anything but ow well... I have the login setup so that then login dialog does a standard close and destry when you press ok. Then I thought I could have the application varify the User Name and Password then launch the main dialog.
I'm not exactly sure whats happening but, I think in a Dialog Application the application closes when the main dialogs is destroyed.
I'm not sure how to or how I should have the application open up the main dialog after the [Main or login dialog is destryoed]
Ty for the help guys and TY For the CodeProject! W00T!
|
|
|
|
|
One solution is to create the l/p dialog window in OnInitDialog() or OnInitUpdate().
Kuphryn
|
|
|
|
|
I don't quite under stand what your gettin at, Sorry.
|
|
|
|
|
One solution is SetWindowPos().
Kuphryn
|
|
|
|
|
Hi there.
I'm trying to make program that can read a tabulated text file and show that in a grid. I got it to work but I'm not satisfied with the speed of it.
CString Text;
string buf;
ifstream file(FilePath);
BOOL bLineEnd = true;
int i = 0, nRowCount = 1, nColCount = 0;
m_pGrid->SetColumnCount(0);
m_pGrid->SetRowCount(0);
m_pGrid->SetRedraw(FALSE);
getline(file, buf, '\n');
while(!file.eof())
{
m_pGrid->SetRowCount(nRowCount+1);
while(bLineEnd)
{
bLineEnd = AfxExtractSubString(Text, buf.begin(), i, '\t');
if(bLineEnd)
{
if(nColCount <= i+1) m_pGrid->SetColumnCount((nColCount = i+1)+1);
m_pGrid->SetItemText(nRowCount, i+1, Text);
}
i++;
}
i=0;
bLineEnd = true;
nRowCount++;
getline(file, buf, '\n');
}
m_pGrid->SetRedraw(TRUE);
I'm using Chris Maunder's MFC Grid Control to do this.
I hope that someone have a faster way to do this.
|
|
|
|
|
One speed up would be not to use AfxExtractSubString, since it will have to do multiple scans of the string to get the one you want. Where the number of columns is small it's probably not noticeable, but as this climbs...
Steve S
|
|
|
|
|
Hi all,
Can someone help me fix and understand why this doesn't work. I keep getting an error saying:
error C2079: 'Node::data' uses undefined class 'T' with[ T=T]
Here is my code;
template <class T>
class Node
{
public:
Node * link;
Node(T x=0, Node* A = NULL): data(x), link(A) {}
T data;
};
typedef Node<class T> nodePtr;
HELP PLEASE...this is driving me crazy?
|
|
|
|
|
You need to check the box that says 'do not treat '<'s as HTML tags, then you need to post your question once only, and finally, you might consider using some sort of moniker, rather than posting anonymously. If you fulfill the first of these, so I can read your code, I'd be happy to look at it for you.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Sorry about that, I forgot to log in before. Sorry also about the double post. Here is the code....
template <class T>
class Node
{
public:
T data;
Node * link;
Node(T x=0, Node* A = NULL): data(x), link(A) {}
};
typedef Node<class T>* nodePtr;
Many thanks in advance
|
|
|
|
|
Like Mike said....
typedef's generally suck anyhow, they mean relying on the IDE or a search all to figure out what something actually *is*.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Actually, maybe I'm wrong, and you've simply not defined your template at all. In that case, you'd get this error, as the class T does not exist. You need to do this:
template<class T> Node
{ // etc
But what is the typedef for ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
The offending line is:
typedef Node<class T> nodePtr;
This is not legal because you aren't defining T here. You can't make a typedef without specifying the template parameters (at least not in VC 6, maybe with PTS you can, but that's off-topic) because a template is just something that generates code, it is not a type. You could do this:
typedef Node<int>* nodePtr;
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
typedef templates are not part of C++ standard, but they are planned for the next version. At least Herb Sutter seems to be very enthusiastic about them.
|
|
|
|
|
The following code compiled correctly:
template <typename T>
class Node { public: T data; };
typedef template<typename T> Node<T>* pTnode;
pTnode<int> p;
Hosam Aly Mahmoud
|
|
|
|
|
|
Microsoft Visual C++ 6.0 with SP5. I said it compiled, but I did not run it.
Hosam Aly Mahmoud
|
|
|
|
|
Hi all,
Can someone help me fix and understand why this doesn't work. I keep getting an error saying:
error C2079: 'Node<T>::data' uses undefined class 'T' with[ T=T]
HELP PLEASE...this is driving me crazy?
|
|
|
|
|
well.....since you don't give me that much information to work with, i'm thinking that you defined a template class like so:
template <class t=""> (or <typename t="">)
class CTempl
{
CTempl<t>();
};
and implemented your methods like this:
CTempl<t>::CTempl<t>(){}
This result in a similair error as you described and it means you haven't included the following statement, above the method impl.:
template <class t="">
CTempl<t>::CTempl<t>(){}
Is this what you mean, or did i type all this for sh*t?
|
|
|
|
|
The file I added, was actually present in the project workspace before, under a different name. Following some changes I made to the file, I gave it a new name, and then deleted the old version from the workspace, followed by adding the newly named one to the same workspace (using Project->Add To Project->Files). Other changes made, were to the "#include" statement in the program, and the directory where the program and its files are located.
Did a "Rebuild All" and the compiler came back saying it couldn't open the newly named file.
Any idea why the compiler is not seeing the newly added file in "Dev Studio"??
Thanks!
William
Fortes in fide et opere!
|
|
|
|