|
toxcct wrote: ShellExecute(NULL, "open", "test.exe", NULL, NULL, SW_SHOW);
you giving Answer of Managed C++ Here ..... .. all goes when end well
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: you giving Answer of Managed C++ Here
are you OK alok ?
since when ShellExecute() is Managed C++ ?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: are you OK alok ?
Offcourse i am OK, just in mood for kiddin with you, you are oldest friend of mine here
toxcct wrote: since when ShellExecute() is Managed C++ ?
offcourse i Know the Same, but if you look at question Title, let me quote that for you :-
Somebody wrote: Running an external executable through C++.Net code
itself state that he/she is looking for MC+++ answer ...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: Offcourse i am OK, just in mood for kiddin with you, you are oldest friend of mine here
ThatsAlok wrote: itself state that he/she is looking for MC+++ answer ...
actually, i told him in my answer that he was in the wrong forum, but i answered anyway, because we often see people asking for something.net refering to the product version instead of the framework, so i thought it could be asking a solution that compiles under VC++2003
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
See here.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
|
Both ShellExecute() and CreateProcess() can be used with managed code. For example:
[DllImport("shell32.dll")]
extern "C" int _cdecl ShellExecute(int hwnd, String *strVerb, String *strFileName, String *strParameters, String *strDirectory, int nShowCmd);
...
ShellExecute(0, S"Open", S"c:\\test.exe", String::Empty, String::Empty, 1);
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
|
Thanks, have not seen that article before...
Although, that code is in Win32Api, not C++.Net right?
|
|
|
|
|
the article is targetted for VC6, so, no .NET framework at that time.
but yes, these are Win32/MFC samples.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Hi Folks.
I Have a program that is imlepmented as a Windows NT service.
It is a generic service that has multiple instances under different names.
The internal logic is based on the name of the service as installed:
NAME1 will work with files in folder $\NAME1, NAME2 will work with $\NAME2 etc..
As the service starts - how can I find out the name of the service
currently being started.
Thanks
Hillel
|
|
|
|
|
The name of the service, or the name of the EXE?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Actually - may have interset in both
Hillel.
|
|
|
|
|
For the name of the service, it is passed as an argument to ServiceMain() . For the name of the EXE, it has already been answered.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hillel wrote: As the service starts - how can I find out the name of the service
GetModuleFileName
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
When i apply font to my listcontrol view the font of the text doesnt change, however only the height of the row changes,
how can i change the font of the text in a listcontrol view
i use following command
LOGFONT lf;
CFont ListControlViewFont;
CFont *pFont = m_LogList->GetFont() ;// GetFont();
pFont->GetLogFont(&lf);
CFontDialog dlg(&lf);
if (dlg.DoModal() == IDOK)
{
dlg.GetCurrentFont(&lf);
ListControlViewFont.DeleteObject();
ListControlViewFont.CreateFontIndirect(&lf);
m_LogList->SetFont(&ListControlViewFont,TRUE);
}
i have tried all ups and down, by not using font dlg, and creating font manual, but nothing works, only row height changes, am i missing something,
Thanks in advance
|
|
|
|
|
faroo28 wrote: CFont ListControlViewFont;
If that is a local scope variable that is destructed after you call m_LogList->SetFont() that will not work. The font needs to stay in scope since you are passing a pointer to it.
|
|
|
|
|
Thanks a lot, That was the problem, because of the local scope the pointer becomes invalid once the function exits.
Once again many Thanks
take care
|
|
|
|
|
how can i fetch only single row from mysql table from vc++
when i write
mysql_query(myDB,"SELECT * FROM empinfo4 e,proinfo4 p");
(" WHERE empid = \'" + f + "\' and e.gid = p.gid ");
this will give the first row in the mysql table only
it will not give other rows
how can i fetch row using
GetDlgItemText(IDC_EMPID,id);
here id is value which i enter in the edit control
and i want that whenever i enter id value it display only that row matched row
hi
|
|
|
|
|
If you are using MFC:
CString strQuery;
strQuery.Format("SELECT * FROM empinfo4 e, proinfo4 p WHERE empid = '%s' AND e.gid = p.gid", id);
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
|
Can we create Our Own Window in Dialog Based Application.
i.e create our own class using WNDCLASSEX structure
Register it using RegisterclassEx
And create window using CreatewindowEx ...
Thanking you
Manjunath S
|
|
|
|
|
|
Hi,
Iam new to VC++ .Please Help me regarding this..
Can we create Our Own Window in Dialog Based Application.
i.e create our own class using WNDCLASSEX structure
Register it using RegisterclassEx
And create window using CreatewindowEx ...
Manjunath S
GESL
Bangalore
|
|
|
|
|
Manjunath S wrote: Iam new to VC++ .Please Help me regarding this..
it doesn't excuse your behavior. i already answered your question on your previous thread, so if you want to ask something in relation to what i said, ask directly on my post... other, give time to other people to see, understand and answer (if they know the answer).
there's no need to spam the forum. the only you can get by this is been bad seen and so, get flamed
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|