Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/14/2010

Use the WM_SETTINGCHANGEnotification for detecting screen rotations and performing processing on any rotating application windows that are not full-screen. If your application has only full-screen application windows, there is no need to handle the WM_SETTINGCHANGEnotification.

The following code is an example of a window's WndProcfunction that includes a case statement for handling the WM_SETTINGCHANGEnotification.

Copy Code
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, 
WPARAMwParam, 
LPARAMlParam)
{
	switch (message) 
	{
		 // The code for handling other Windows messages has been
omitted for clarity.
		 // ...
		case WM_SETTINGCHANGE:
			{
				if (
wParam == SETTINGCHANGE_RESET)
				{
					// The processing done here can include
					// resizing full-screen child windows
					// and calling the Windows Embedded CE
					// MoveWindow function on top-level windows.
					INT nWidth = GetSystemMetrics(SM_CXSCREEN);
					HWND hEditBox = GetDlgItem(hWnd, IDC_EDIT);
					HWND hEnterButton = GetDlgItem(hWnd,
IDC_BUTTON);

					MoveWindow(hEditBox, 8, 4, nWidth - 0, 20,
TRUE);
					MoveWindow(hEnterButton, nWidth - 57, 4, 50,
20, TRUE);
			}
		}
			break;
}
}

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.