Last active
August 29, 2015 14:10
-
-
Save Seth-Johnson/1eb0f701c2ebaa57141c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "commctrl.h" | |
#define SUBMIT_ANSWER 0x01 | |
#define EDIT_ANSWER 0x02 | |
#pragma comment(linker,"\"/manifestdependency:type='win32' \ | |
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ | |
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") | |
// ... | |
switch (message) | |
{ | |
case WM_ACTIVATE: | |
g_hSubmit_Answer = CreateWindow(L"button", | |
L"submit", | |
(WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON), | |
285, | |
200, | |
75, | |
25, | |
hWnd, | |
(HMENU)SUBMIT_ANSWER, | |
hInst, | |
NULL | |
); | |
g_hEdit_Answer = CreateWindowEx(WS_EX_CLIENTEDGE, | |
L"edit", | |
L"", | |
(WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL), | |
100, | |
200, | |
175, | |
25, | |
hWnd, | |
(HMENU)EDIT_ANSWER, | |
hInst, | |
NULL | |
); | |
// ... | |
case WM_COMMAND: | |
wmId = LOWORD(wParam); | |
wmEvent = HIWORD(wParam); | |
// Parse the menu selections: | |
switch (wmId) | |
{ | |
case SUBMIT_ANSWER: | |
// submit pressed | |
SendMessage(g_hSubmit_Answer, WM_SETTEXT, 0, (LPARAM)L"pressed"); | |
//SendMessage(g_hEdit_Answer, WM_SETTEXT, NULL, (LPARAM)L"Enter guess.."); | |
SendMessage(g_hEdit_Answer, EM_SETCUEBANNER, FALSE, (LPARAM)L"Enter guess.."); | |
break; | |
// ... |
Author
Seth-Johnson
commented
Dec 1, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment