|
what is IWshRuntimeLibrary? when can it be used.
|
|
|
|
|
May I politely google that for you [^]?
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 created an SDI application andi want to add two buttons to it for zoom in and zoom out.how can i do that?
|
|
|
|
|
You want the buttons to be added to the toolbar. Right?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Open the toolbar in the toolbar editor (double-click on the toolbar in the Resource View) and click on the blank button on the right side of the toolbar to create a new button. Type a suitable ID into the toolbar button's Properties view (something like ID_VIEW_ZOOMIN?). Now draw something on that to represent 'zoom-in' (a magnifying glass with a + usually works). Now repeat (but changing the details as appropriate) for the zoom-out button.
Now you can handle the zoom-in and zoom-out events, probably in your View class.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
How to read command line args in vc++.
Is there any predefined function/class available?
|
|
|
|
|
What type of application are you working on?
If it's a simple console based application you can read the information in the main function (usually named as argc and argv).
Also you can see here:Reading Command line arguments[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
...and if you're using MFC, see m_lpCmdLine , which is a member of CWinApp .
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Command line arguments are available in the main function of your program (that is WinMain for a GUI application). If you're using MFC , your-CWinApp -derived class provides the m_lpCmdLine [^] member.
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]
|
|
|
|
|
Thanks for the information.
|
|
|
|
|
|
the code below create a folder in drive E:\ called autorun.inf and other line to create inside autorun.inf folder a text file called protection.txt
now what i want is instead of creating these things in drive E:\ i want the user to enter the drive letter that he wants then these files will be created in the entered drive
#include <direct.h>
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
_mkdir("e:/autorun.inf");
ofstream output("e:\\autorun.inf\\protection.txt",ios::out);
output.close();
return 0;
}
Thanks in advance
|
|
|
|
|
whats the problem in achieving it?
accept the drive letter from user,
form a string that has to be passed to _mkdir, and pass it.
first try it, and then post here if you have any problem. we will definitely help you.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Hi .
Is this what you want?
#include <direct.h>
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
char root;
char path[64];
cin >> root;
sprintf_s(path, "%c:/autorun.inf", root);
_mkdir(path);
sprintf_s(path, "%s/protection.txt", path);
ofstream output(path,ios::out);
output.close();
return 0;
}
|
|
|
|
|
thank you very much this exactly what i want
but if u do not mind i want to ask u some questions about the code that u wrote
#include <direct.h>
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
char root;
char path[64];
cin >> root;
sprintf_s(path, "%c:/autorun.inf", root);
_mkdir(path);
sprintf_s(path, "%s/protection.txt", path);
ofstream output(path,ios::out);
output.close();
return 0;
}
again thank u very much
|
|
|
|
|
I'm a chinese, my English may be hard to read, I'm sorry for that. But i will try to explain it.
jon ray wrote: char path[64]; //why did u declare path as char and set it to 64
64 isn't a regular number, I got it by counting the length of your longest full path "e:\\autorun.inf\\protection.txt", and just pick a number more than it.
jon ray wrote: sprintf_s(path, "%c:/autorun.inf", root); //what does this thing mean (%c)
%c is mean that it's a character but not others(string), and it's value is determined by 'root'
jon ray wrote: sprintf_s(path, "%s/protection.txt", path); //why did u put two (path) and why did u put here %s instead of %c
%s is mean that it's a string, and it's value is determined by 'path'.
the second 'path' is use to replace the '%s', and then put the result "%s/protection.txt" to the first 'path', now 'path' has become the full path what you want.
|
|
|
|
|
Since you are using C++, try:
string path = root + ":/autorun.inf";
_mkdir(path);
path = path + "/protection.txt";
ofstream output(path, ios::out);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
how to add command buttons to SDI application?
|
|
|
|
|
where do u want them to be added?
you mean on the View area?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
|
create the button dynamically.
like
CButton b;
b.Create(...);
try to browse for CButton::Create(...)function.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
|
|
If you use CFormView as the view class of the SDI application, you can add any controls to its dialog template just like a dialog based application.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|