|
Can you explain why you dont want?
|
|
|
|
|
The question is that 2 programs are really time consuming exigents.
The point is don't let the user execute both at the same time.
Then , if one is running don't let run the other and viceversa.
Dr.Pi
|
|
|
|
|
hi all,
i m using spamassassin to filter my mails as spam or not, but i m unable to execute spamassassin.exe,it works fine when i call that exe from DOS(command prompt)with same commandline argument, here is the code i m using,
C++
HINSTANCE hins =::ShellExecute(NULL,"open","F:/sa/spamassassin.exe","<F:/spam.txt> F:/spamT.txt",NULL,SW_HIDE); in this situation exe invoke and then disappear without executing as i seen tha through task manager, when i call above line of code behind a button then process increases in task manager and then it decreases, without full execution.
here is the command which i paste on DOS and works fine,
any idea.
C:\Documents and Settings\tasleemarif>F:/sa/spamassassin.exe <F:/spam.txt> F:/spamT.txt"
i have also tried that using C++ spawn functions as well but did not work too. any idea r any person can guide me how had worked on spamassisn.
Regards.
Tasleem Arif
|
|
|
|
|
The code you've shown seems fine. Temporarily change SW_HIDE to SW_SHOW . Does that produce any windows?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i tried that as well but did no show any window,it did worked with this code,but cannot hide console this time,it pops up
char* cmd = const_cast<char*>("F:/sa/spamassassin.exe <F:/spam.txt> F:/spamT.txt");<br />
system(cmd);<br />
Regards.
Tasleem Arif
|
|
|
|
|
What does this do:
ShellExecute(NULL, _T("open"), _T("c:\\windows\\system32\\notepad.exe"), _T("c:\\boot.ini"), NULL, SW_SHOW);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
it shows notepad.
Regards.
Tasleem Arif
|
|
|
|
|
Ok, so what happens if you change the third and fourth arguments?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I'm facing an annoying problem while using a list control.
In my project,I have a list control which I need to update every 250msec(the list of items is
a dynamic list).
In order to update the list control, I delete all of the items in the list control and insert the new items to the list.
As a result,the list control is blinking.
I'm using the following peace of code
m_list.SetRedraw(FALSE);
m_list.deleteAllItems();
for(int nIndex = 0 ; nIndex < ItemsList.GetSize() ; nIndex++)
{
m_list.InsertItem(nIndex , _T(""));
m_list.SetItem(nIndex , 0 , ItemsList.RemoveHead().GetName());
m_list.SetItem(nIndex , 0 , ItemsList.RemoveHead().GetIP());
}
m_list.SetRedraw(TRUE);
I tried to pdause LockWindowUpdate() and UnlockWindowUpdate() instead of SetRedraw()
but the items continue to blink.
Is there a better way to update the list without blinking???
HELP!!!!!
With bes regards,
Eli
|
|
|
|
|
Hello,
Maybe you need to create a method that compares and changes only what needs to change.
This soluction will gibe you problems if the number of items incrise.
populating ListCtrls and ListBoxes are expensive, and will be very slow if the number of item incrise.
|
|
|
|
|
As Max mentioned, populating list view controls is expensive.
Even more so the way you are adding items - 3 updates for each item.
If you use a "virtual list-view" (one that has the LVS_OWNERDATA style) then you can store each
item's info in a collection of some kind and do all your processing in the background.
The only time the list view has to change is when items are added or removed (so the total number
of items in the control is always the same as the number of items in the collection).
After each update of the contents, just a repaint of the control would be necessary.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Mark,
Mark Salsbery wrote: If you use a "virtual list-view" (one that has the LVS_OWNERDATA style) then you can store each
item's info in a collection of some kind and do all your processing in the background.
In order to do so,I need to search if the current items in the collection exists in the list ctrl,and this is not something that we want to do(we don't
want that the list control will have to know what kind of items it "holds"...).
Anyway,Thanks for your reply,
With best regards,
Eli
|
|
|
|
|
eli15021979 wrote: (we don't
want that the list control will have to know what kind of items it "holds"...).
I'm not sure you understood what I meant.
In a virtual list control, you store everything about the items somewhere else. The control
keeps index and state information only. When the control needs to draw it sends a notification
requesting the text for each item and subitem. From the looks of your sample code, you already
have that information in a list container, so there's no reason to store it in the control as well
(like you are doing now).
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all,
I'm using the "CIniFile Class for C++ - A robust cross platform INI file class" wrote by Todd Davis and it's working and all but for some or other reason I keep getting garbage in the ini file. For example:
ç[TEST]
ÿMyKey=MyValue
Can anyone help ??
Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: Can anyone help ??
Doubtful, since you've not provided anything useful.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Right ... So write the following lines of code:
CIniFile IniFile;
IniFile.Create("test.ini");
IniFile.SetValue("MyKey","MyValue","MySection",FileName);
And when I open the ini file I have garbage in the file. I haven't edited the .cpp and .h files provided by the article.
Useful enough ??
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Have you made any other changes (besides here) to the CIniFile class?
Have you stepped into the SetValue() method?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No I haven't made any changes, the only 'thing' that differs is my IDE. I'm trying to use it in C++ Builder 2006. But I can't see anything wrong with that (besides that Builder suck). Yes I have stepped into SetValues , but I'm struggling to debug ... not use to Borland debugging environment.
Oh well, I'm sure I'll figure it out ...
Thanks David
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
have you tried compiling in both UNICODE and non-UNICODE to see if that matters ?
|
|
|
|
|
I would like to create an application which is basically a transparent window, or something similar, which has "objects" on it, which are images which can be dragged around the screen, and clicked on, and double clicked on etc... However, I am not sure how to implement this..
I usually work in pure C/C++ however if there are some C++ classes which allow for this i would be willing to try them out..
Thanks for your help!
--PerspX
|
|
|
|
|
hi everyone
i m using microsoft textbox 2.0 on visual c++.
i m trying to add lines to my text but i don't want to write all over again, i just want to add more text to the existing ones.
i know i can rewrite everything by using "textbox.settext("bla bla")" method
but i want to add them.i know in visual basic there's this option by using the "&" sign. does anyone know?
thanks in advance
|
|
|
|
|
I've got the complete row selection extended style working now, but would just like to know the correct method to programmatically set a row to be selected as though a user had clicked it so that it can be turned all blue.
cheers
|
|
|
|
|
ldsdbomber wrote: ...but would just like to know the correct method to programmatically set a row to be selected...
Use the LVM_SETITEM message.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is that via a SendMessage David? I've not used that before very much
|
|
|
|
|
ldsdbomber wrote: Is that via a SendMessage David?
Yes, if you are not using MFC.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|