Hi i am trying to make a notepad like program.
The problem is that when i try to display some text nothing happens.
If someone could help me i would really appreciate it.
The function call:
...
SetWindowText(edit, "TEST");
...
Creation of edit:
...
HMENU Menu, SubMenu;
Menu = CreateMenu();
SubMenu = CreatePopupMenu();
AppendMenu(SubMenu, MF_STRING, 9001, "&Open");
AppendMenu(SubMenu, MF_STRING, 9002, "&Save");
AppendMenu(SubMenu, MF_STRING, 9003, "Save &As...");
AppendMenu(Menu, MF_STRING | MF_POPUP,(UINT)SubMenu,"&File");
SetMenu(hWnd, Menu);
edit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_MULTILINE, 0, 0, 100, 100, hWnd, (HMENU)112, GetModuleHandle(0), 0);
if(!edit)
{
int DEBUG = GetLastError();
MessageBoxA(0, "Failed to create edit", "ERROR", MB_OK | MB_ICONERROR);
ExitProcess(1);
}
SetFocus(edit);
...
The edit is being created in the message loop when a WM_CREATE message. is send
Thanks in advance