|
Jerry Burns wrote: I'm having trouble figuring out the code statement to accomplish this.
Do you mean the code to launch the app, or the code to handle the menu click?
|
|
|
|
|
The line of code needed to launch the other app.
Thanking you in advance for your help and time.
|
|
|
|
|
You can use ShellExecute() or the older & simpler WinExec() .
|
|
|
|
|
Do you want to have name of other program that you want to lanuch on your menu?
|
|
|
|
|
hello
There are two things here.
WinExec : with this you can launch another process (Myapp.exe) . But you have no programatic control over the exe after you launch it .
CreateProcess : with this you can have the process handle of Myapp.exe so that later you can kill it .
Sample is here
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
if( !CreateProcess( NULL, // No module name (use command line).
"myapp.exe" // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi) ) // Pointer to PROCESS_INFORMATION structure.
{
AfxMessageBox("can not start process");
}
redindian
|
|
|
|
|
Of course if you see MSDN it says:
This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function.
Now whats your problem?
|
|
|
|
|
Hi all.
I write program and in my program I must sonvert texo from one font to enoder and
I dont know how to do this.
can help?
|
|
|
|
|
david bagaturia wrote: I write program and in my program I must sonvert texo from one font to enoder
|
|
|
|
|
david bagaturia wrote: from one font to enoder
You mean you want to support multiple languages in your program?
|
|
|
|
|
david bagaturia wrote: I write program and in my program I must sonvert texo from one font to enoder and
I dont know how to do this.
Well whats meaning of that?
|
|
|
|
|
Ok.
I have MyFile_1 and text in it and I must copy that text into File_2, but font in File_1 is MyFont_1 and font in MyFile_2 is MyFont_2.
Sow I must sonvert text from MyFont_1 to MyFont_2. But I dont know how to do this .
|
|
|
|
|
You can copy text to file2 and when you want to show content of file2 change font on the view.
|
|
|
|
|
Ok it is good idea, but I cant do this.
thare is other program thet use this File_2 and it use Font_2.
Sow I need to convert text from Font-1 to Font_2
|
|
|
|
|
Do you need to multiple languages?.Does other program a foreign program or its your program that you wrote
|
|
|
|
|
Yes I need multiple languages.
Abut other program: it is some program that reads text from File_2 and set it to SQl. Sow I cant change it.
|
|
|
|
|
For one part see multilingual support for applications [^] is helpfuls
and for two section on the text file you have only characters on the a program you can change font but (Im not sure its possible or no )maybe you insert a sql statement in the first line of file for font and then run this statment on the sql
|
|
|
|
|
|
You're welcome.I hope you write your program early;)
|
|
|
|
|
Hi,
I am using GetJob function with JOB_INFO_2 & wants to retrieve dmCopies, a member of DEVMODE structure, but it always returns 1 to me. I am using XP & printing through MS-Word 2003. Also I have placed a registry entry
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options
ForceSetCopyCount 1
which is a hotfix given by Microsoft for this. Can anybody help.
Smile.
Is it not clear.
-- modified at 3:03 Wednesday 16th May, 2007
|
|
|
|
|
Mmm, let me see if I understand you.
You change the number of copies to be printed and still get 1 in dmCopies, although you have changed it? Or where is the problem?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
HI everyone,
I was trying to make a tool using visual C++ which
uses my self made MATLAB codes and I am supposed to access them in
my C++ project and derive the corresponding results.
Alternatively, I can say that I read the inputs in my C++ and have to
compute the results using the MATLAB codes.
For all these I am supposed to make shared libraries. But when I used
mcc command (thx to code project only), my machine's MATLAB said no
such command exists and even the DOS prompt failed to recognise.
Can anyone help me out in this or suggest me an alternative.
Looking forward to guidance from someone.
1vick
|
|
|
|
|
That question is asked a couple times a month. Search the forum, 'Search Comments', for MATLAB and read some of the past discussions.
led mike
|
|
|
|
|
This article[^] should give you an introduction how to make a DLL from a MatLab code and how to use it from C/C++.
However, to build the DLL (or an EXE) you will need the MatLab Compiler (mcc). If the mcc comand fails on your machine, you most propably don't have the MatLab Compiler installed. If I remember correctly, it is not part of the basic installation but must be bought separately (as many other MatLab toolboxes, too).
Regards,
Tim
|
|
|
|
|
Right now I run the code with a administrator user and works just fine, but when I do it with a limited account user the first time works just fine but the second time gives me this error: ERROR_ALREADY_EXISTS = Cannot Create a file when that file already exists.
This is what I'm doing:
1.- LogonUser; with the administrator account.
2.- ImpersonateLoggedOnUser
3.- RegOpenKeyEx
Does anyone knows how to work this around?
Any help is greatly apreciated.
Thanks...
JH
|
|
|
|
|
A normal user does not have authority to modify/add existing values in HKLM so if you are specifying KEY_READ | KEY_WRITE as 'samDesired' the RegOpenKeyEx will fail. If you are only going to read leave off the KEY_WRITE, but if you need to modify the value, put it somewhere other than HKLM.
This is why most software has to be installed by someone with admin authority; most software installs write to HKLM.
|
|
|
|