Two problems: multiline and a two controls.

SOLVED: I forgot the break; after the WM_COMMAND switch block.
I'm just getting started with win32 and C++ in code:blocks.
I follow an online video tutorial but the code I replicate doesn't work the same.
Here's my problem area code:

void AddControls(HWND hWnd){
CreateWindowW(L"Static",L"Enter Text:",
WS_VISIBLE | WS_CHILD | SS_RIGHT,
100,200,100,25,
hWnd,NULL,NULL,NULL);
//*
hEdit = CreateWindowW(L"edit",L"Enter here.",
WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
// | ES_MULTILINE
202,175,100,100,
hWnd,NULL,NULL,NULL);
//*/
}
Problem 1: Without the Edit part included,
the menu shows up. With it the menu does not.

Problem 2: In the edit control, I want multiline but with '| ES_MULTILINE '
included I cannot change the text. I can see what I enter when
I select it, but any further action just shows "Enter Here".
I cannot delete or replace the 'Enter here' text.


Last edited on
Topic archived. No new replies allowed.