|
Try pathisdirectory/getfileattributes apis
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
i am using a dialog based mfc win app. how can i retrive the value of the edit box in the cpp of another dialog box.
prashant jain malviya national institute of technology
|
|
|
|
|
You can use GetParent() and from the pointer returned from this function access the edit box contents in another dialog.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thnx for reply but both the dialog box are child dialo box.
prashant jain
|
|
|
|
|
Still you can move on with the same procedure.
Another method is that say you have two classes CFirst and CSecond associated to the two dialogs. Then you can declare a pointer of the CFirst class in the CSecond class and then access the variable in the CSecond class.
Ex: When you are calling the second dialog
CSecond* mySecond=new CSecond();
mySecond->myFirst=this;
mySecond->DoModal(); // ShowWindow with Create if modeless dialog.
In the header file of CSecond dialog declare
CFirst *myFirst;
// DO not forget to include header files for both dialogs respectively.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
mySecond->myFirst=this;
in this line it is showing type conversion error.
prashant jain malviya national institute of technology
|
|
|
|
|
I think that you are creating the pointer in Second.h for the class CSecond itself.Check this out.
// Include Second.h in the file where you are calling this code.
CSecond *mySecond=new CSecond ();
mySecond->myFirst =this;
mySecond->DoModal ();
Open the Second.h file and in the public section declare a pointer as
// Include the header file for First.h
CFirst* myFirst;
// Delete the memory occupied to prevent memory leeks.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
maybe it is some helpful to you
Main Class is CMain and one child dialog CLocal now you declare this code in child dialog CMain* m_Main = (CMain* )GetParent(); and ues m_Main->(variable)(function)...
whitesky
|
|
|
|
|
thnx for reply but both the dialog box are child dialo box.
prashant jain
|
|
|
|
|
you try this and answer to me ,please
whitesky
|
|
|
|
|
CMain* m_Main = (CMain* )GetParent();
its showing error on using get parent function
prashant
|
|
|
|
|
|
Hi Guys
here ihave a problem in SMPPLIBTEST file parameter passing
so plz send me the solution to solve
#sankar#
|
|
|
|
|
What is the problem specifically? What error are you receiving? You have some code that can be shown that outlines the issue?
Have you read this:
http://www.codeproject.com/library/smpplib.asp
|
|
|
|
|
iam alredy read the SMPPLIB in code project,BUt while executing the ClientTest ,I gave the parameters of smpp.Activexperts-lab.com and port numbers but it cant connect to Server .
This is my problem,plz kindely help me how to achieve that problem
#sankar#
|
|
|
|
|
Dear all friends
i would like to get a extension is .mdb file. i am a beginner, how to do this or how to get a sample first, who have this sample, send me here, first let me use it. thank you very much. urgent!!!!!!
Li Zhiyuan
22/06/2006
|
|
|
|
|
|
Hi Guys,
This is an issue from client. They have a server application & client applications connected to it from different PC's. Both applications are developed in mfc's using socket class.
Server application creates a socket connection & listens to the particular port, server & client sends msg in-between on time interval. Application has been running well for the past year & suddenly the client say that they can't have new client connections connected to the server but old connections are alive. This occurs randomly once in a week or so, once they restart the server application, everything works fine again.
There is no error log for this & couldn't replicate the same problem from work place.
Please suggest me the possible reason why this is happening?
Note:
Server has a socket accept() function which is in while loop waiting for new connection event. When connection arrives, it calls accept function When there is an INVALID_SOCKET error, it closes the socket. Can something go wrong suddenly? is this can be due to network, firewall, router, etc?
Thank you
Mohan
|
|
|
|
|
mohanrajh wrote: suddenly the client say that they can't have new client connections connected
Where does this statement come from, more details would be appreciated... e.g. which socket call reports error, is it a client or a server problem, which part of the application reports error?
-- modified at 6:39 Sunday 25th June, 2006
|
|
|
|
|
Hi,
Why hPrevInstance paramter in WinMain is made to NULL in 32-bit windwos ???
Is there any specific reason ??
Thanks
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
This is what the docs say in context to hPrevInstance (MSDN):
The hPrevInstance parameter is always passed NULL in Win32. This causes each instance of an application to act as though it were the only instance running. The application must register the window class, and it cannot access data used by other instances, except through standard interprocess communication techniques such as shared memory or DDE. Calls to GetInstanceData must be replaced with these techniques.
Before registering a window class, source code for Windows 3.x normally tests hPrevInstance to see whether another instance of the application is already running. This code needs no change, because under Win32, it will always register the window class.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: Before registering a window class, source code for Windows 3.x normally tests hPrevInstance to see whether another instance of the application is already running
So , In 16 - bit Windows there is no registration of window class. Which was introduced in Win 32 ,which lets us know about the Previous Instance of an application.. Am I right ??
I have few more doubts ..
When we run an application for the first time the window class gets registered.
suppose if second instance of application is created .will the registration of the class takes place again ??
if so, Is the registered class name same as that of first instance.
_AnShUmAn_ wrote: The hPrevInstance parameter is always passed NULL in Win32. This causes each instance of an application to act as though it were the only instance running
Can u explain this in more detail ???
Any how , Thanks a lot for u r reply.
Thanks again.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
My previous post included this :
(Read about this in MSDN)
Before registering a window class, source code for Windows 3.x normally tests hPrevInstance to see whether another instance of the application is already running. This code needs no change, because under Win32, it will always register the window class.
And regarding your question here :Is the registered class name same as that of first instance?
I haven't thought on this issue. But may be I will do it now and get back to you if somebody else doesn't clarify on this.Guess, it should register itself for the first time.
2nd Answer:
Applications cannot use hPrevInstance to test for previous instances under Win32. An alternative method must be used, such as creating a unique named pipe, creating or testing for a named semaphore, broadcasting a unique message, or calling FindWindow.
I hope that this satisfies your queries.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|