Could some post some code please.I want to press a button and display a character in an edit window.Example press a button labeled '1' and a '1' is displayed in the window .I'm using WIN32 and programming in C.Any help much appreciated
Could some post some code please.I want to press a button and display a character in an edit window.Example press a button labeled '1' and a '1' is displayed in the window .I'm using WIN32 and programming in C.Any help much appreciated
Moved to windows forum
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I'm a C++ type of guy, but this is how I do what your asking.
In the WM_CREATE case of the switch statement, do something like...
Then in the WM_COMMAND case, do something like...Code:CreateWindowEx(0, TEXT("BUTTON"), TEXT("1"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, 7, 5, 480, 40, hwnd, (HMENU)1, g_hinst, NULL);
Hope this is what you were looking forCode:if(LOWORD(wParam) == 1){ if(HIWORD(wParam) == BN_CLICKED){ \\ Make it do what ever you want here } }