|
Not possible since the application is only started once, and thus main() is only called once.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Adarapu Harikrishna wrote: Is there a way to can send parameters through command line to the executable that is already active.
Yes. You could have the program prompt the user to supply the new file name.
led mike
|
|
|
|
|
may be a solution:
you run the app #1
in MSG processing define an own message, f.e. WM_OWNMSG
run app #2
handle the command line parameters
find/catch the main window of app #1 (f.e. throu FindWindow(...); )
send the cmdline parameters throu SendMessage(FindWindow(...), WM_OWNMSG, (LPARAM)cmdline, (WPARAM)whatWithIt);
modified on Thursday, July 24, 2008 7:07 PM
|
|
|
|
|
You got the communicate between your 2 apps. If the have Windows (HWND) you can post messages with approbiate values. Or make a network connection, write something in registry (file) were the other app have to read repeatedly.
Greetings from Germany
|
|
|
|
|
Dear All
As I write in subject part, I want to change the size of a static box by programming.
But I didnt know how to do that.
Thus please help me.
Regards
|
|
|
|
|
What about SetWindowPos [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
I have some static text control that I want user to be able to copy the text out. However I could not find an easy way of doing that, can someone shed some light on how this can be done?
Thanks!
|
|
|
|
|
A read-only edit control? That would allow scrollable text as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sure, that is a good way of doing it. But I have a CStatic derived class which can Resize itself to fit the text. If I switch to CEdit I will loose the func.
Any good CEdit with resize functionality.(Not just scrollbar but grow itself if text is too much)
Thanks,
|
|
|
|
|
Well, probably won't be a daunting task porting such functionality to a CEdit derived class.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Troll[^] attack.
Just fixed this[^].
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thank you pal. Balanced.
BTW balanced stupid troll's vote here [^] too.
BTW2: you are almost at 5,000 posts. Congratulations.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
CPallini wrote: BTW2: you are almost at 5,000 posts. Congratulations.
ThankZ frand. Itz all bekaz of THHB.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: ThankZ frand. Itz all bekaz of THHB.
Drugz helpz mine.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
To make an edit control that resizes itself investigating the EN_UPDATE[^] message may be a good starting point.
Steve
|
|
|
|
|
Hi!
I am implementing registration scheme in my application and it is my first time. My problem is where to put serial number after user purchase application and enters serial number. I want to write serial number in .txt file and check it every time user start program to see if it is registered or not. Administrator will need to install application but when restricted user want to purchase my application, my program will not have write access in that folder and not even in registry. Where do I need to put this file then? Or is there better way for doing that?
Please help me!
|
|
|
|
|
I think this sould work
create a setup for your application by say InstallShield ,
access the msi data to check the Serial . I dont remember is we can configure InstallShield to check serial#. Not use the Visual Studio to create a installer but surely it has some good options .
Vikas Amin
My First Article on CP" Virtual Serail Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
This will not work or I did not understand you. I will send my serial number after user purchase my program. When he receive it, I will write it in txt file and every time when user start my program, I will open that file and see if it is valid serial number.
|
|
|
|
|
Hi friends,
I have an array of strings
say,
"test","test1","test2","test1" and so on....
How can i find out the string "test1" has a duplicate.
I have to list out all the strings that have duplicates.
If the array is "test","test1","test2","test1","test2","test2","test3" and so on....
Then my output should be "test1","test2".
Since the array size is not fixed , i cannot use arrays for storing the values.
I have tried several logics with vector<> ,but i could not find a solution yet.
Here i am posting the code that removes the duplicates.But I am not sure how to identify the element that has duplicates.
/*Here list already consists the the elements */
vector<string>::iterator iter = list.begin ();
vector<string>::iterator iter1 = list.end ();
//remove duplicates from the list
if (list.size () > 1)
{
for (; iter + 1 != iter1; ++iter)
{
iter1 = remove (iter + 1, iter1, *iter);
}
list.erase (iter1, list.end ());
}
Any kind of help is really appreciated.
Thanks in advance.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Keep an array of words and occurances, something like:
struct
{
string strWord;
int nCount;
}; For each word that you encounter, look it up in the array. If it's found, increment the associated count. If it's not found, add it.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No. This is not helping me either. Can you give some more explanation on this.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Which part is troubling you?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
suppose
vector string strVector;
strVector.push_back("test");
strVector.push_back("test1");
strVector.push_back("test2");
strVector.push_back("test");
strVector.push_back("test3");
is my code .
I am not sure about how to use the struct which you have already mentioned ?
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
NiceNaidu wrote: am not sure about how to use the struct which you have already mentioned ?
struct s
{
string strWord;
int nCount;
};
vector<s> vec; Before each call to push_back() , check first to see if the word already exists.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|