[ros-diffs] [gedmurphy] 29331: - half implement support for multiple monitors to desk.cpl - people with more than one monitor can now use this applet in windows without it crashing

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Mon Oct 1 17:44:54 CEST 2007


Author: gedmurphy
Date: Mon Oct  1 19:44:53 2007
New Revision: 29331

URL: http://svn.reactos.org/svn/reactos?rev=29331&view=rev
Log:
- half implement support for multiple monitors to desk.cpl
- people with more than one monitor can now use this applet in windows without it crashing

Modified:
    trunk/reactos/dll/cpl/desk/settings.c

Modified: trunk/reactos/dll/cpl/desk/settings.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?rev=29331&r1=29330&r2=29331&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/desk/settings.c (original)
+++ trunk/reactos/dll/cpl/desk/settings.c Mon Oct  1 19:44:53 2007
@@ -330,10 +330,35 @@
 						   1,
 						   (LPARAM)&monitors);
 	}
-	else
-	{
-		/* FIXME: multi video adapter */
-		/* FIXME: choose selected adapter being the primary one */
+	else /* FIXME: incomplete! */
+	{
+		PMONSL_MONINFO pMonitors;
+		INT i;
+
+		SendDlgItemMessage(hwndDlg, IDC_SETTINGS_DEVICE, WM_SETTEXT, 0, (LPARAM)pGlobalData->DisplayDeviceList->DeviceDescription);
+		OnDisplayDeviceChanged(hwndDlg, pGlobalData, pGlobalData->DisplayDeviceList);
+
+		pMonitors = (PMONSL_MONINFO)HeapAlloc(GetProcessHeap(), 0, sizeof(MONSL_MONINFO) * Result);
+		if (pMonitors)
+		{
+			INT hack = 1280;
+			for (i = 0; i < Result; i++)
+			{
+				pMonitors[i].Position.x = hack * i;
+				pMonitors[i].Position.y = 0;
+				pMonitors[i].Size.cx = pGlobalData->DisplayDeviceList->CurrentSettings->dmPelsWidth;
+				pMonitors[i].Size.cy = pGlobalData->DisplayDeviceList->CurrentSettings->dmPelsHeight;
+				pMonitors[i].Flags = 0;
+			}
+
+			SendDlgItemMessage(hwndDlg,
+							   IDC_SETTINGS_MONSEL,
+							   MSLM_SETMONITORSINFO,
+							   Result,
+							   (LPARAM)pMonitors);
+
+			HeapFree(GetProcessHeap(), 0, pMonitors);
+		}
 	}
 
 	pGlobalData->hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);




More information about the Ros-diffs mailing list