VOID
SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
-
+VOID
+CreateSysMenu(HWND hWnd);
static LRESULT CALLBACK
GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
GuiConsoleMoveWindow(GuiData); // FIXME: This MUST be done via the CreateWindowExW call.
SendMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0);
+ // FIXME: HACK: Potential HACK for CORE-8129; see revision 63595.
+ CreateSysMenu(GuiData->hWindow);
+
/* Switch to full-screen mode if necessary */
// FIXME: Move elsewhere, it cause misdrawings of the window.
if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE);
* Set up GUI data
*/
+ // Font data
Length = min(wcslen(TermInfo.FaceName) + 1, LF_FACESIZE); // wcsnlen
wcsncpy(GuiData->GuiInfo.FaceName, TermInfo.FaceName, LF_FACESIZE);
GuiData->GuiInfo.FaceName[Length] = L'\0';
GuiData->GuiInfo.FontFamily = TermInfo.FontFamily;
GuiData->GuiInfo.FontSize = TermInfo.FontSize;
GuiData->GuiInfo.FontWeight = TermInfo.FontWeight;
- GuiData->GuiInfo.UseRasterFonts = TermInfo.UseRasterFonts;
+
+ // Display
GuiData->GuiInfo.FullScreen = TermInfo.FullScreen;
GuiData->GuiInfo.ShowWindow = TermInfo.ShowWindow;
GuiData->GuiInfo.AutoPosition = TermInfo.AutoPosition;
GuiData->CmdIdLow = GuiData->CmdIdHigh = 0;
/* Initialize the selection */
- RtlZeroMemory(&GuiData->Selection, sizeof(CONSOLE_SELECTION_INFO));
+ RtlZeroMemory(&GuiData->Selection, sizeof(GuiData->Selection));
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
+ RtlZeroMemory(&GuiData->dwSelectionCursor, sizeof(GuiData->dwSelectionCursor));
+ GuiData->LineSelection = FALSE; // Default to block selection
+ // TODO: Retrieve the selection mode via the registry.
/*
* We need to wait until the GUI has been fully initialized
}
}
-static BOOL NTAPI
-GuiProcessKeyCallback(IN OUT PFRONTEND This,
- MSG* msg,
- BYTE KeyStateMenu,
- DWORD ShiftState,
- UINT VirtualKeyCode,
- BOOL Down)
-{
- if ((ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED) || KeyStateMenu & 0x80) &&
- (VirtualKeyCode == VK_ESCAPE || VirtualKeyCode == VK_TAB || VirtualKeyCode == VK_SPACE))
- {
- DefWindowProcW(msg->hwnd, msg->message, msg->wParam, msg->lParam);
- return TRUE;
- }
-
- return FALSE;
-}
-
static BOOL NTAPI
GuiSetMouseCursor(IN OUT PFRONTEND This,
HCURSOR CursorHandle);
GuiResizeTerminal,
GuiSetActiveScreenBuffer,
GuiReleaseScreenBuffer,
- GuiProcessKeyCallback,
GuiRefreshInternalInfo,
GuiChangeTitle,
GuiChangeIcon,