DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2821007 - Last Review: February 25, 2013 - Revision: 1.0

Summary

Microsoft Office 2013 applications use a custom frame in which a thin border is surrounded by four transparent Window handles (hWnds) that are used to render shadows. These hWnds are designed to make resizing the application easier. There is no user setting to disable these shadows. However, you can disable them (and re-enable them) by calling SendMessage or SendMessageTimeout together with the parameters in the code snippet that appears in the "Sample Code" section.

More information

The transparent hWnds in Office 2013 applications that are used to render shadows use the class name MSO_BORDEREFFECT_WINDOW_CLASS. To show or hide the shadows in Office 2013 applications, you have to message the application’s window procedure (WndProc) by using SendMessage or SendMessageTimeout together with the following parameters:
  • To disable shadows: Msg = WM_USER + 0x0900, wParam = 117, and lParam = 0
  • To enable shadows: Msg = WM_USER + 0x0900, wParam = 117, and lParam = 1

Sample Code

The following function sends a message to an Office application’s hWnd to enable or disable the shadows around the application frame. (Some error checking is omitted for brevity.) 
#define WM_MSO (WM_USER + 0x0900) #define WM_MSO_WPARAM_OMFRAMEENABLESHADOW 117 #define WM_MSO_LPARAM_SHADOW_ENABLED 1 #define WM_MSO_LPARAM_SHADOW_DISABLED 0 void DisableShadows(HWND hwndOfficeApp) { SendMessage ( hwndOfficeApp, WM_MSO, WM_MSO_WPARAM_OMFRAMEENABLESHADOW, WM_MSO_LPARAM_SHADOW_DISABLED); } void EnableShadows(HWND hwndOfficeApp) { SendMessage ( hwndOfficeApp, WM_MSO, WM_MSO_WPARAM_OMFRAMEENABLESHADOW, WM_MSO_LPARAM_SHADOW_ENABLED); }

Applies to
  • Microsoft Office Home and Business 2013
  • Microsoft Office Home and Student 2013
  • Microsoft Office Personal 2013
  • Microsoft Office Professional 2013
  • Microsoft Office Professional Academic 2013
  • Microsoft Office Professional Plus 2013
  • Microsoft Office Standard 2013
Keywords: 
KB2821007
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support