LRESULT VirtualDimension::OnLeftButtonDblClk(HWND /*hWnd*/, UINT /*message*/, WPARAM /*wParam*/, LPARAM lParam)
{
	POINT pt;
	Window * window;
	Desktop * desk;

	if (m_shrinked)
		return 0;

	pt.x = GET_X_LPARAM(lParam);
	pt.y = GET_Y_LPARAM(lParam);

	desk = deskMan->GetDesktopFromPoint(pt.x, pt.y);
	if ( (desk) &&
		 ((window = desk->GetWindowFromPoint(pt.x, pt.y)) != NULL) )
		window->Activate();
	return 0;
}
Beispiel #2
0
    void OnLaunched(LaunchActivatedEventArgs const &)
    {
        StackPanel panel;
        panel.Padding({ 50.0, 50.0 });
        m_children = panel.Children();

        CalendarDatePicker picker;
        FormatDateTime(picker, clock::now());

        picker.DateChanged([this](CalendarDatePicker const& picker, CalendarDatePickerDateChangedEventArgs const& args)
        {
            FormatDateTime(picker, args.NewDate().Value());
        });

        Window window = Window::Current();
        window.Content(panel);
        window.Activate();
    }