|
Try CreateProcess()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
yes, I'm sure CreateProcess() is the right solution.
Zxczc
|
|
|
|
|
Why not simple ::SellExecute()? Try this...
::ShellExecute(NULL, _T("open"), _T("c:\\windows\\notepad.exe"), _T(""), _T(""), SW_SHOW);
Hope this helps.
- tareq
|
|
|
|
|
Thanks tareq, worked perfectly.
|
|
|
|
|
Looking for a C++ programmer to code an Import/Export class from an Access Database to and existing Access Database (data merging code if data already exists in the other database) as well as the ability to Export data from an Access Db to an MSSQL server. Should have knowledge of creating a wizard tool to allow either option (Export/Import, To Access or To MSSQL).
|
|
|
|
|
Why are you looking for a programmer to do it? Why dont you do it? You make this sound like ur looking to hire someone... You have your Help wanted, what you need done, and your requirements... yet again, why dont you do it?
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
Hello there
I am new to MFC, and to learn it, I am following a tutorial which can be found at:
http://www.functionx.com/visualc/Lesson01.htm
(amongst other places)
When I compile the file, I get the following error:
LNK1561: entry point must be defined.
I am using Windows XP Professional, and programming with Visual Studio .NET 2003. I created an empty C/C++ project ("Empty Project(.NET)"), and added the single file specified below.
I have set the following properties for my project (accessed via. Project -> [ProjectName] Properties):
General:
- Use of MFC: Use MFC in a shared DLL
C/C++ -> Precompiled headers:
- Create/use precompiled headers: Not Using precompiled headers
I did this due to some other errors which occurred when I did not make these other alternations. I google-d the error-messages to know what to change in my project properties.
However, this problem completely eludes me. I read somewhere that it could be because there is no main() method (makes sense - the app won't know where to start), but when I added it, the program compiled, and ran, but all it did was to pop up a console window for about 5 seconds, and then program exited with no errors. The main I added looks like this:
int main() {<br />
return 1;<br />
}
(since there is a global variable theApp which represents the Frame/application (see below), it gets initialized before "return 1" occurs).
I am using the below code for my application (and nothing else):
CExerciseApp.cpp
#include <afxwin.h><br />
<br />
class CExerciseApp : public CWinApp<br />
{<br />
public:<br />
virtual BOOL InitInstance();<br />
};<br />
<br />
class CMainFrame : public CFrameWnd<br />
{<br />
public:<br />
CMainFrame();<br />
};<br />
<br />
CMainFrame::CMainFrame()<br />
{<br />
Create(NULL, "MFC Fundamentals");<br />
}<br />
<br />
BOOL CExerciseApp::InitInstance()<br />
{<br />
m_pMainWnd = new CMainFrame;<br />
m_pMainWnd->ShowWindow(SW_NORMAL);<br />
<br />
return TRUE;<br />
}<br />
<br />
CExerciseApp theApp;
I need this to work to continue on with the example, and really start learning MFC - help
|
|
|
|
|
Always start an MFC application with a wizard. Hand coding it is a disaster waiting to happen.
MFC apps tend to use precompiled headers. Learn to use them for now, decide later if you don't want them.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hello friends
i m using vc++, so plz tell me function to get size of a file(text file)
bye
|
|
|
|
|
You can try the static CFile::GetStatus method and one of the status members is the file size.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Looking into my crystal ball I see...GetFileSize() and GetFileSizeEx() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
And also GetFileAttributesEx , in case you need to know more about the file all in a single function call.
|
|
|
|
|
Blake Miller wrote:
And also GetFileAttributesEx, in case you need to know...
Yes, I'm aware of it. Thanks.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
After many years away from MFC, I need to develop a simple ActiveX control whose primary purpose is to act as a container for other ActiveX controls.
In the days of VC++ 6, the Class Wizard, bad as it was, provided an automated way to add properties, methods and events to a control by automatically generating the needed .odl and other changes. I find no such capability in the VC++ 7.0 IDE. I dimly remember enough Ole to manually edit the files, but this seems like an incredible hardship for what should be a simple task.
What am I missing? An ActiveX tutorial for VC++ 7.0 would be fantastic. The old favorite "Circ" has not been updated to be of much value in Visual Studio .Net.
A pointer to a usable reference on the standard messages and maps would also be extremely helpful.
I am in desperate straights because I bid this job stupidly assuming that MFC had kept pace with C#. Any help would be greatly appreciated.
Regards,
David Hamilton
|
|
|
|
|
|
Nemanja,
Thank you. It almost had to be simple. I have found that almost everything in software development is easy once you know the "secret." Finding Microsoft "secrets" is often nearly impossible.
I have had the good fortune of helping others over the course of my career, and it gives me a lasting good feeling. I hope you enjoy that feeling now.
Regards,
David Hamilton
|
|
|
|
|
I know its possible with VB but is it possible with C++?
Have a part in the program where it allows the user to write what he wants in a text and itll implement it into the program?
Not like a configuration where you allow the user to write name/password so forth... But a full blown C++ code written in a text file that the program reads and uses it at the certain point of the program...
Say; Having a Client/Server program (a bot), and having the user write all the commands in C++ he wants in a text, allowing him to delete some, and add some commands... How would this be allowed?
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
NewbieStats wrote:
Have a part in the program where it allows the user to write what he wants in a text and itll implement it into the program?
you'd either have to include a C++ compiler and linker or use a C++ interpreter like CINT[^].
then you'll have to set up an interface so that your program and the external code can communicate. that could be difficult (or easy), depending on what you want these external code chunks to do. if it's compiled code, you're probably looking at a very tough bit of work. interpreted code is probably easier, since it'll be 'running' inside your EXE.
but, if you're asking your users to write C++ in order to use your program, you might as well ask them to go all the way and simply build DLLs which implement certain interfaces that your program can use via LoadLibrary - plugins, in other words.
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
C++ is compiled, not interpreted...
I don't think this is possible to do, unless (as it has been said) you add a compiler
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi everyone:->. I need to pass some arguments to a worker thread function (VC++), but i don't know how to do that ... the MSDN says : UINT MyControllingFunction( LPVOID pParam ), but I need to pass to MyControllingFunction other parameters too. If anyone can help, please do it.
|
|
|
|
|
The LPVOID pParam should be set to point to a structure that contains all of the parameters that you wish to pass. Is this what you need?
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
I demonstrate by passing your Class pointer to your Worker thread .
Let your class be CMyClass and Worker thread function something like this
[vccode]
UINT <code>MyControllingFunction</code>( LPVOID pParam );
void CMyClass::StartThread();
{
AfxBeginThread(&<code>MyControllingFunction</code>,(LPVOID)<code>this</code>);
}
UINT MyControllingFunction( LPVOID pParam )
{
CMyClass *<code>pMainClass</code>=(CMyClass*)<code>pParam</code>;
return 0;
}
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Hello all. I have a button that loads a file dialog, CFileDialog. I'm trying that the user enters a PATH name rather than a FILE name. However, the CFileDialog only allows me to enter file names. ¿What do I have to do?
Here's what I'm doing, rather simple.
<br />
CFileDialog wndDialog(<br />
TRUE,<br />
NULL,<br />
NULL,<br />
OFN_PATHMUSTEXIST | OFN_HIDEREADONLY,<br />
NULL,<br />
this<br />
);<br />
wndDialog.DoModal();<br />
<br />
m_strDestPath = wndDialog.GetPathName();<br />
SetDlgItemText(IDC_NEWTRAN_DESTPATH, m_strDestPath);<br />
<br />
Regards,
K.K.
Only the good dies young...
|
|
|
|
|
|