|
there are 2 classes
class MyClass1: public CDialog & class MyClass2: public CDialog
CObArray m_obArray is protected member of MyClass1
The task is to initialize CListCtrl m_list of MyClass2 with elements of m_obArray
|
|
|
|
|
And you couldn't even rephrase the task of your homework before posting it?
|
|
|
|
|
|
I couldn't//maybe course it's not homework
|
|
|
|
|
MyClass1 will need a 'getter' method that returns a reference/pointer to its m_obArray member.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
How we can convert (color-depth) of HBITMAP bitmap image.
|
|
|
|
|
See Here[^]
maybe it is some helpful to you
whitesky
|
|
|
|
|
I have a requirement to create an application which will accept the command line parameter. Depening on the parameter passed to the application, it will start and stop.
For Ex. on command prompt
C:\>MyExe start
This command will start the application for a given task.
C:\>MyExe stop
If MyExe is already running then the above command will stop it.
Appreciate your help.
|
|
|
|
|
What is the type of application ? Console, Win32, MFC, ...
Your question is not very clear.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
It would be Win32 or MFC application
|
|
|
|
|
|
Ravi Jadhav wrote:
C:\>MyExe stop
That will run a second instance of MyExe. You'll need to use IPC to look for a running instance and tell it to stop its work.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I dont want the second instance. Can you please help me how to use IPC?
|
|
|
|
|
|
Ravi Jadhav wrote: If MyExe is already running then the above command will stop it.
do you want to create service!
"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
|
|
|
|
|
It would be Win32 or MFC application
|
|
|
|
|
|
Thanks I think this will suffice my requirement
|
|
|
|
|
Create some gloabl object like NamedPipe, Mutux etc to manage single instance
Use PostQuitMessage to exit
|
|
|
|
|
Could you find a simpler way to solve your problem?
Example
C:\>MyExe start
write on a registry or on a fixed file
RUN = TRUE
and then the program will start
C:\>MyExe stop
write on a registry or on a fixed file
RUN = FALSE
and this instance ends
The first instance, thatsometimes (like into the OnIdle function) are checking the key , understands that he needs to be closed and .... close itself .
hope that helps
|
|
|
|
|
So what exactly is the question? You've given us a high-level overview, but nothing specific.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
This is a poor solution as it involves polling and persistent storage.
Steve
|
|
|
|
|
Hi
Stephen Hewitt wrote: poor solution as it involves polling and persistent storage
I know that,... I according to you .
But the bettest (if exist ) solution depends on how complex is his program and how much time he coud spend on this problem.
My suggestion is only an example, he probally can adapt it to his program, or it can be a way to find a more simple way.
If not,...well he has many other ways, according to others resp.
Bye
|
|
|
|
|
Can anyone please point out why the AfxParseURL function is not working 4 me..
i've used it as:
CString URL=("http://www.yahoo.com");
BOOL bParse;
CString csSvrName;
CString csObjName;
INTERNET_PORT nPort;
DWORD dwServiceType = AFX_INET_SERVICE_HTTP;
bParse=AfxParseURL( URL, dwServiceType , csSvrName, csObjName, nPort );
|
|
|
|
|
shuchigo_jane wrote: why the AfxParseURL function is not working 4 me
What is the problem ?
Cédric Moonen
Software developer
Charting control
|
|
|
|