|
sorry it not working again the same problem. thanks a lot for helping me. ok can you tell me how to close the parent dialog from the tabdialog. close netconfig from landialog
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: how to close the parent dialog
This is the first question u posted...
See my answer...
Do your Duty and Don't expect the Result
|
|
|
|
|
sorry i cant understand that can you please send me the sample code
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
GetParent()->EndDialog(nValue);
or
GetParent()->DestroyWindow();
nValue may be any numeric value... this will be the return value of DoModal
Do your Duty and Don't expect the Result
|
|
|
|
|
EndDialog gets an error "'EndDialog' : is not a member of 'CWnd'" and i cant use the other since this will close all the windows(running in background)
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: EndDialog gets an error "'EndDialog' : is not a member of 'CWnd'"
EndDialog is a method of CDialog and not CWnd, Just use MSDN...
you can find even more ways to do your job...
All these are simple tasks and u cn definetly get a way by browsing MSDN...
Use like this,
((CDialog*)GetParent())->EndDialog(...);
deeps_cute wrote: cant use the other since this will close all the windows(running in background)
EndDialog will also do the same... because u are closing the parent window, so all of its child window will be destroyed...
Do your Duty and Don't expect the Result
|
|
|
|
|
thank you very mech its working well. thanks for ur timely help
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Parthi_Appu wrote: Do your Duty and Don't expect the Result
Nice Quote.
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Hey Thanx..
But the quote was taken from Bahavat Gita (Ctrl+C, Ctrl+V) :->
Do your Duty and Don't expect the Result
|
|
|
|
|
I think property pages is better way for this kind of concept.
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Hi,
I have a small query regarding HANDLE. What exactly it means. what type of data it will stores. Is there an specific structure
ot the HANDLE
Chinna.
|
|
|
|
|
A number assigned to a window that is used by the operating system to keep track of the attributes of the window. In a C or C++ library, a handle is a pointer.
For more information please go through the MSDN.
Regards,
Paresh.
|
|
|
|
|
I could be many things. It could be one thing in one OS version and an entirely different beast in another OS version. Possible implementations are indexes into arrays, keys into hash tables, a pointer to a data structure… The important thing is that all operations go through APIs so the OS is free to change the implementation and the code will still run without needing to be altered; as long as the size of the HANDLE doesn't change.
Steve
|
|
|
|
|
Kotesh.N wrote: Is there an specific structure
you can see it as memeory location!
|
|
|
|
|
when i import a dialog from dll, i can't paste sth to the editbox on the dialog with ctrl+v,how can i make it!!
help me!!!
|
|
|
|
|
how to find a specified string in file and how to delete a line which have a that string.(with ignore case )
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
Hi,
I have a Win32 Console Application. I am using VC 6.0
My program is a TCP based Client Server Aplication. In the Server part, I have a variable defined for SOCKADDR_IN.
SOCKADDR_IN saServer;
LPHOSTENT lpHostEntry = gethostbyname(clientIP);
saServer1.sin_family = AF_INET;
saServer1.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list);
saServer1.sin_port = htons(3500);
Then, when I am running the program, binding error occurs. This is when I am trying with the server and client programs in different machines. But in the localhost, it is working.
But, if I am trying it with address set to INADDR_ANY, it is working(both in the localhost and with different machines).
saServer1.sin_addr.s_addr = INADDR_ANY ;
Why does this happen? Actually I am confused. Is there any problem with binding a socket to a port with a known address or what is the difference between the two scenarios?.
Please can anyone help me?
|
|
|
|
|
Vichitram wrote: Is there any problem with binding a socket to a port with a known address
No, as long as you know the correct address to bind to.
Generally you only need to know the address to connect to. INADDR_ANY is generally fine for the
bind address unless you need to bind to a certain NIC.
Is the code you posted initializing a local address or a remote address?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Thank you very much ,WhiteSky ! But can i set a picture to Desktop by Api function ? Please help me !
Regards and thank !
|
|
|
|
|
|
Hello.
I am trying to get the coordinates of the clicked point inside a picture control on a dialog. For the picture control, I have derived my own class based on CStatic. And I have set the picture control style to Notify. I have created OnLButtonDown method in the Dlg.
The problem is when I clicked on the picture, the coordinates are not passed down but when I clicked on other part of the dialog, the coordinates are passed down.
Can anyone help me in this? I want to get the coordinates of the picture.
|
|
|
|
|
Where do you use of GetCursorPos on your program for get position?
|
|
|
|
|
When I use GetCursorPos in the dlg in the OnPicture method, i can get the coordinates. But it is the coordinates of the dialog, not the coordinates of the picture. And also i want to get the coordinates when the left button is down and when the left button is up. How do i go abt in doing this?
|
|
|
|
|
ReturnRain wrote: When I use GetCursorPos in the dlg in the OnPicture method, i can get the coordinates. But it is the coordinates of the dialog, not the coordinates of the picture
GetCursorPos() will return the x,y points with respect to screen coordinates.
Change those to clinet coordinates. say, m_wndMyStatic is your derived static class variable,then
POINT pt = {0};
GetCursorPos( &pt );
m_wndMyStatic.ScreenToClient( &pt );
ReturnRain wrote: And also i want to get the coordinates when the left button is down and when the left button is up. How do i go abt in doing this
Handle WM_LBUTTONDOWN and WM_LBUTTONUP and do the above. You can get the rect..
Hope this will help
Do your Duty and Don't expect the Result
|
|
|
|