In the attached code I have created an edit box so that I can enter an IP address. Whenever I click in it to start typing, the program terminates. I must be forgeting something or doing something wrong but I'm to new to see it.
In the attached code I have created an edit box so that I can enter an IP address. Whenever I click in it to start typing, the program terminates. I must be forgeting something or doing something wrong but I'm to new to see it.
Haven't looked through all the code but there is no break statement at the end of case WM_COMMAND: so the program will run on to the next case, which is WM_DESTROY:
HTH
That didn't work. The program still terminates.
You have the (HMENU) of your edit set to the same as your connect button so the second you click in the edit it exicutes the WM_COMMAND 1 case and that case doesn't have a break on it so its falling strait through to the WM_DESTROY. All you need to do is set the (HMENU) field of your edit box to NULL, also place a break at the end of each case so it can't fall through to the WM_DESTROY.
thanks, that did the trick.