I am currently developping a GUI interface game for windows XP. I am currently having difficulty changing the background of a EDIT box created with CreateWindowEx(). It's default background is white (which is the color I want). But the user is not supposed to be able to adjust the text within that EDIT box so I added a WS_DISABLED, but then the background color changes into gray and the text color into dark gray. How do I change that?
This is a part of the switch(Message) in the the WndProc() function, the case WM_CREATE:
/* Creating box that contains amount of errors */ HFONT hfReg = CreateFont(16, 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, "Arial"); HWND hWrong; hWrong = CreateWindowEx( WS_EX_WINDOWEDGE, "EDIT", "Amount of errors: 0", WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_CENTER | WS_DISABLED, 0, 70, 190, 20, hwnd, (HMENU)IDC_MAIN_WRONG, GetModuleHandle(NULL), NULL); if(hWrong == NULL) MessageBox(hwnd, "Could not create edit box.", "Error", MB_OK | MB_ICONERROR); SendMessage(hWrong, WM_SETFONT, (WPARAM)hfReg, MAKELPARAM(FALSE, 0));
Does anyone have a suggestion?
Edited 6 Years Ago by Graphix: n/a