Commit 2ef2fcd8 authored by Peter Achten's avatar Peter Achten
Browse files

PA: crosscall code added to refresh desktop (on request by Diederik)

parent f5679df4
...@@ -5635,6 +5635,35 @@ HandleCleanRequest (CrossCallInfo * pcci) ...@@ -5635,6 +5635,35 @@ HandleCleanRequest (CrossCallInfo * pcci)
MakeReturn0Cci (pcci); MakeReturn0Cci (pcci);
} }
break; break;
/* CcRqUPDATEDESKTOP forces an update of the desktop and its applications.
*/
case CcRqUPDATEDESKTOP: /* no params; no result; */
{
OSVERSIONINFO osVersionInfo;
DWORD osPlatformID;
osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); /* Set size BEFORE calling GetVersionEx. */
if (GetVersionEx (&osVersionInfo))
{
osPlatformID = osVersionInfo.dwPlatformId;
if (osPlatformID==VER_PLATFORM_WIN32_WINDOWS) /* We're in Windows95. */
{
char szParam[13] = "WindowMetrics";
SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, (WPARAM)SPI_SETICONMETRICS, (LPARAM)(LPCTSTR)szParam);
}
if (osPlatformID==VER_PLATFORM_WIN32_NT) /* We're in WindowsNT. */
{
SendMessage (HWND_BROADCAST, WM_WININICHANGE, (WPARAM)SPI_SETICONMETRICS, (LPARAM)(LPCTSTR)NULL);
}
}
/* if either GetVersionEx fails, or platform is different, skip refresh action altogether.
*/
MakeReturn0Cci (pcci);
}
break;
/* Create the specialised directory selector dialog from Windows. /* Create the specialised directory selector dialog from Windows.
By courtesy of Martijn Vervoort. By courtesy of Martijn Vervoort.
*/ */
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
#define CcRqDIRECTORYDIALOG 1802 /* PA: added to create directory selector dialog. */ #define CcRqDIRECTORYDIALOG 1802 /* PA: added to create directory selector dialog. */
#define CcRqFILESAVEDIALOG 1801 #define CcRqFILESAVEDIALOG 1801
#define CcRqFILEOPENDIALOG 1800 #define CcRqFILEOPENDIALOG 1800
#define CcRqUPDATEDESKTOP 1790 /* PA: added to force refresh of desktop. */
#define CcRqSHOWCONTROL 1755 /* PA: added */ #define CcRqSHOWCONTROL 1755 /* PA: added */
#define CcRqSELECTPOPUPITEM 1754 #define CcRqSELECTPOPUPITEM 1754
#define CcRqENABLEPOPUPITEM 1753 #define CcRqENABLEPOPUPITEM 1753
......
...@@ -65,6 +65,7 @@ WinStartOsThread :: !*OSToolbox -> *OSToolbox ...@@ -65,6 +65,7 @@ WinStartOsThread :: !*OSToolbox -> *OSToolbox
WinCloseOs :: !*OSToolbox -> Bool WinCloseOs :: !*OSToolbox -> Bool
WinInitOs :: (!Bool,!*OSToolbox) WinInitOs :: (!Bool,!*OSToolbox)
WinRefreshDesktop :: !*OSToolbox -> *OSToolbox
//------------------------------------------------------------------------// //------------------------------------------------------------------------//
...@@ -81,6 +82,7 @@ CcRqCREATEGAMEWINDOW :== 1900 ...@@ -81,6 +82,7 @@ CcRqCREATEGAMEWINDOW :== 1900
// MW... // MW...
CcRqDO_PRINT_SETUP :== 1828 // MW11++ CcRqDO_PRINT_SETUP :== 1828 // MW11++
CcRqDO_HTML_HELP :== 1827 CcRqDO_HTML_HELP :== 1827
CcRqGET_PRINTER_DC :== 1824 CcRqGET_PRINTER_DC :== 1824
CcRqDISPATCH_MESSAGES_WHILE_PRINTING CcRqDISPATCH_MESSAGES_WHILE_PRINTING
:== 1823 :== 1823
...@@ -92,7 +94,6 @@ CcRqCREATESDIDOCWINDOW :== 1816 // PA: added to create SDI document window ...@@ -92,7 +94,6 @@ CcRqCREATESDIDOCWINDOW :== 1816 // PA: added to create SDI document window
CcRqCREATEMDIDOCWINDOW :== 1815 // PA: added to create MDI document window CcRqCREATEMDIDOCWINDOW :== 1815 // PA: added to create MDI document window
CcRqCREATEMDIFRAMEWINDOW :== 1814 // PA: added to create MDI frame window CcRqCREATEMDIFRAMEWINDOW :== 1814 // PA: added to create MDI frame window
CcRqCREATESDIFRAMEWINDOW :== 1813 // PA: added to create SDI frame window CcRqCREATESDIFRAMEWINDOW :== 1813 // PA: added to create SDI frame window
CcRqCLIPBOARDHASTEXT :== 1812 CcRqCLIPBOARDHASTEXT :== 1812
CcRqGETCLIPBOARDTEXT :== 1811 CcRqGETCLIPBOARDTEXT :== 1811
CcRqSETCLIPBOARDTEXT :== 1810 CcRqSETCLIPBOARDTEXT :== 1810
...@@ -101,6 +102,8 @@ CcRqDIRECTORYDIALOG :== 1802 /* PA: added to create directory selector dialog ...@@ -101,6 +102,8 @@ CcRqDIRECTORYDIALOG :== 1802 /* PA: added to create directory selector dialog
CcRqFILESAVEDIALOG :== 1801 CcRqFILESAVEDIALOG :== 1801
CcRqFILEOPENDIALOG :== 1800 CcRqFILEOPENDIALOG :== 1800
CcRqUPDATEDESKTOP :== 1790 /* PA: added to force refresh of desktop. */
CcRqSHOWCONTROL :== 1755 /* PA: added */ CcRqSHOWCONTROL :== 1755 /* PA: added */
CcRqSELECTPOPUPITEM :== 1754 CcRqSELECTPOPUPITEM :== 1754
CcRqENABLEPOPUPITEM :== 1753 CcRqENABLEPOPUPITEM :== 1753
......
...@@ -5,12 +5,14 @@ implementation module clCrossCall_12 ...@@ -5,12 +5,14 @@ implementation module clCrossCall_12
import StdBool, StdClass, StdInt, StdMisc, StdString, StdTuple import StdBool, StdClass, StdInt, StdMisc, StdString, StdTuple
import ostoolbox import ostoolbox
import code from "cCrossCall_12.obj", "cdebug_12.obj", "cpicture_12.obj", "htmlhelp.obj", "util_12.obj",/*MW11*/ "cprinter_12.obj", "cTCP.obj" import code from "cCrossCall_12.obj", "cdebug_12.obj", "cpicture_12.obj", "htmlhelp.obj", "util_12.obj",/*MW11*/ "cprinter_12.obj", "cTCP.obj"
import code from library "advapi32_library" import code from library "advapi32_library",
import code from library "comctl32_library" library "comctl32_library",
import code from library "shell32_library" library "kernel32_library",
import code from library "winmm_library" library "ole32_library",
import code from library "ole32_library" library "shell32_library",
import code from library "winspool_library", library "wsock_library" library "winmm_library",
library "winspool_library",
library "wsock_library"
//----------------------------------------------// //----------------------------------------------//
...@@ -195,6 +197,11 @@ WinInitOs ...@@ -195,6 +197,11 @@ WinInitOs
.end .end
} }
// PA: added to test refreshing of desktop
WinRefreshDesktop :: !*OSToolbox -> *OSToolbox
WinRefreshDesktop tb
= snd (IssueCleanRequest2 (ErrorCallback2 "WinRefreshDesktop") (Rq0Cci CcRqUPDATEDESKTOP) tb)
//------------------------------------------------------------------------// //------------------------------------------------------------------------//
// The message numbers for communication from Clean to OS (ccMsg field) // // The message numbers for communication from Clean to OS (ccMsg field) //
...@@ -210,6 +217,7 @@ CcRqCREATEGAMEWINDOW :== 1900 ...@@ -210,6 +217,7 @@ CcRqCREATEGAMEWINDOW :== 1900
// MW... // MW...
CcRqDO_PRINT_SETUP :== 1828 // MW11++ CcRqDO_PRINT_SETUP :== 1828 // MW11++
CcRqDO_HTML_HELP :== 1827 CcRqDO_HTML_HELP :== 1827
CcRqGET_PRINTER_DC :== 1824 CcRqGET_PRINTER_DC :== 1824
CcRqDISPATCH_MESSAGES_WHILE_PRINTING CcRqDISPATCH_MESSAGES_WHILE_PRINTING
:== 1823 :== 1823
...@@ -221,7 +229,6 @@ CcRqCREATESDIDOCWINDOW :== 1816 // PA: added to create SDI document window ...@@ -221,7 +229,6 @@ CcRqCREATESDIDOCWINDOW :== 1816 // PA: added to create SDI document window
CcRqCREATEMDIDOCWINDOW :== 1815 // PA: added to create MDI document window CcRqCREATEMDIDOCWINDOW :== 1815 // PA: added to create MDI document window
CcRqCREATEMDIFRAMEWINDOW :== 1814 // PA: added to create MDI frame window CcRqCREATEMDIFRAMEWINDOW :== 1814 // PA: added to create MDI frame window
CcRqCREATESDIFRAMEWINDOW :== 1813 // PA: added to create SDI frame window CcRqCREATESDIFRAMEWINDOW :== 1813 // PA: added to create SDI frame window
CcRqCLIPBOARDHASTEXT :== 1812 CcRqCLIPBOARDHASTEXT :== 1812
CcRqGETCLIPBOARDTEXT :== 1811 CcRqGETCLIPBOARDTEXT :== 1811
CcRqSETCLIPBOARDTEXT :== 1810 CcRqSETCLIPBOARDTEXT :== 1810
...@@ -230,6 +237,8 @@ CcRqDIRECTORYDIALOG :== 1802 /* PA: added to create directory selector dialog ...@@ -230,6 +237,8 @@ CcRqDIRECTORYDIALOG :== 1802 /* PA: added to create directory selector dialog
CcRqFILESAVEDIALOG :== 1801 CcRqFILESAVEDIALOG :== 1801
CcRqFILEOPENDIALOG :== 1800 CcRqFILEOPENDIALOG :== 1800
CcRqUPDATEDESKTOP :== 1790 /* PA: added to force refresh of desktop. */
CcRqSHOWCONTROL :== 1755 /* PA: added */ CcRqSHOWCONTROL :== 1755 /* PA: added */
CcRqSELECTPOPUPITEM :== 1754 CcRqSELECTPOPUPITEM :== 1754
CcRqENABLEPOPUPITEM :== 1753 CcRqENABLEPOPUPITEM :== 1753
......
...@@ -21,3 +21,5 @@ OSmaxFixedWindowSize :: (!Int,!Int) ...@@ -21,3 +21,5 @@ OSmaxFixedWindowSize :: (!Int,!Int)
OSscreenrect :: !*OSToolbox -> (!Rect,!*OSToolbox) OSscreenrect :: !*OSToolbox -> (!Rect,!*OSToolbox)
OSprintSetupTypical :: Bool // MW11++ OSprintSetupTypical :: Bool // MW11++
OSrefreshDesktop :: !*OSToolbox -> *OSToolbox
...@@ -3,7 +3,7 @@ implementation module ossystem // for Windows ...@@ -3,7 +3,7 @@ implementation module ossystem // for Windows
// Clean Object I/O library, version 1.2 // Clean Object I/O library, version 1.2
import StdInt, StdReal, StdString import StdInt, StdReal, StdString
import clCCall_12 import clCCall_12, clCrossCall_12
from ostypes import Rect from ostypes import Rect
OSdirseparator :== '\\' // OS separator between folder- and filenames in a pathname OSdirseparator :== '\\' // OS separator between folder- and filenames in a pathname
...@@ -43,3 +43,7 @@ OSscreenrect tb ...@@ -43,3 +43,7 @@ OSscreenrect tb
OSprintSetupTypical :: Bool // MW11++ OSprintSetupTypical :: Bool // MW11++
OSprintSetupTypical = False OSprintSetupTypical = False
OSrefreshDesktop :: !*OSToolbox -> *OSToolbox
OSrefreshDesktop tb
= WinRefreshDesktop tb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment