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
Printable View
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
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 for :DCode:if(LOWORD(wParam) == 1){
if(HIWORD(wParam) == BN_CLICKED){
\\ Make it do what ever you want here
}
}