The problem is the below code.. I created my controls.. The thing is that when I press the button, the edit control shows up on top of all controls except for the button that was pressed.. then if I move the mouse, all the other buttons under it, show up ontop.. All the other controls should have been hidden when the button was pressed.. I tried making the edit control as topmost but it didn't work.. In .Net I would usually rightclick the edit control and press bring to front.
case WM_CREATE:
Button1 = CreateWindowEx(NULL, "Button","Install", WS_CHILD | WS_VISIBLE | BS_PUSHLIKE, 6, 54, 100, 23, hwnd, (HMENU)Button1_ID, ghInst, NULL);
Button2 = CreateWindowEx(NULL, "Button","Help", WS_CHILD | WS_VISIBLE | BS_PUSHLIKE, 225, 54, 100, 23, hwnd, (HMENU)Button2_ID, ghInst, NULL);
//RICHEDIT_CLASS NOT WORKING!
HelpMenu = CreateWindowEx(WS_EX_TOPMOST, "EDIT", NULL, WS_BORDER | ES_READONLY | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | WS_DISABLED, 0, 0, 331, 119, hwnd, (HMENU)HelpMenu_ID, ghInst, NULL);
SendMessage(HelpMenu, WM_SETFONT, (unsigned int)GetStockObject(ANSI_VAR_FONT), 0);
//SendMessage(HelpMenu, EM_SETMARGINS, EC_USEFONTINFO, 0);
TitleLabel = CreateWindowEx(NULL, "Static", "Welcome to Bleh\'s Program", WS_CHILD | WS_VISIBLE, 18, 9, 315, 17, hwnd, (HMENU)TitleLabel_ID, ghInst, NULL);
CheckBox = CreateWindowEx(NULL, "Button", "Safe-Mode", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 14, 84, 99, 21, hwnd, (HMENU)CheckBox_ID, ghInst, NULL);
CheckBox2 = CreateWindowEx(NULL, "Button", "Update", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 242, 84, 70, 21, hwnd, (HMENU)CheckBox2_ID, ghInst, NULL);
//SetWindowText();
break;
case WM_COMMAND:
switch (HIWORD(wParam))
{
case BN_CLICKED:
if(LOWORD(wParam) == Button1_ID)
{
SetWindowText(HelpMenu, "Starting The Program.");
ShowWindow(HelpMenu, SW_SHOW);
//BN_GETCHECK
break;
}
break;
}
break;
Oh can can someone show me how to make a RichEdit Control in Code::Blocks.. I tried. I had:
#include <RichEdit.h>
HelpMenu = CreateWindowEx(WS_EX_TOPMOST, RICHEDIT_CLASS, NULL, WS_BORDER | ES_READONLY | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | WS_VISIBLE | WS_DISABLED, 0, 0, 331, 119, hwnd, (HMENU)HelpMenu_ID, ghInst, NULL);
But the box never showed up..