|
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
|
|
|
|
|
Thanks! I can get the first part right. But Im confused with the WM_LBUTTONDOWN and WM_LBUTTONUP. Since i want the picture coordinates when the button is down, should i put the codes in OnLButtonDown or OnPicture (picture control)? And just to make sure, OnLButtonDown and OnLButtonUp is in the dlg?
|
|
|
|
|
You must get position on the picture class (if you derived a CStatic class)
|
|
|
|
|
Your picture control is a seperate child window to the dialog, so mouse click message is generated and sent to static window, then the static window send WM_NOTIFY message to the parent dialog window, when ur mouse clicks on static control rather than clicking on dialog window. I recommand u to handle this by overwrite CStatic::OnLButtonDown or handle it by CYourDialog::OnNotify. hope this could help u out.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
|
Hello
I have a gradient-like background with an owner drawn button. I use AlphaBlend() to draw button's image. Now, the strange thing is:
Background pixel = RGB(168,168,168)
Source pixel = 0xFFFF0000 (AARRGGBB)
After AlphaBlend() with SourceConstantAlpha=0xff the output is RGB(255,0,0) - that's correct but when I change a bit the source pixel to
Source pixel = 0x00FF0000 (AARRGGBB)
I receive pixel RGB(255,168,168)?!?! I should get RGB(168,168,168) because the source alpha is 0x00?!?!?
After some tests with different RGB values, I noticed that my blending works like it 'thinks' that my background is white (255,255,255)?!? When I make all source pixels to have 0xFF alpha value and just play with SourceConstantAlpha value, it's working fine!?! - my button is drawn with proper transparency?!?
I need to play a bit with the source pixels' alpha value for 'soft' button's border.
Does anyone know what could be wrong?? I'm using winxp/vs2003
Thanks a lot!!
|
|
|
|
|
AlphaBlend() from which class?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|