For Windows Mobile 6 Professional and Windows Mobile 6 Classic, the
Note: |
|---|
| In most cases, a developer does not need to access direct information about the input panel, and the number of cases where these settings should be programmatically changed are fewer still. However, when this level of control is required, SHSipInfo provides a convenient way to directly manage the input panel. |
The following code example shows how to use the SHSipInfo function to access and modify the SIPINFO structure.
Copy Code | |
|---|---|
BOOL LowerSip( void )
{
BOOL fRes = FALSE;
SIPINFO si;
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
if(SHSipInfo(SPI_GETSIPINFO, 0, &si, 0))
{
si.fdwFlags &= ~SIPF_ON;
fRes = SHSipInfo( SPI_SETSIPINFO, 0, &si, 0 );
}
return fRes;
} | |
When the user changes the input panel state, the operating system sends a WM_SETTINGCHANGE message to all active applications. This message has SPI_SETSIPINFO in its wParam parameter. The following code example shows how you can use the
Copy Code | |
|---|---|
WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
SIPINFO si;
switch( msg )
{
case WM_SETTINGCHANGE:
switch( wParam )
{
case SPI_SETSIPINFO:
memset( &si, 0, sizeof( si ) );
si.cbSize = sizeof( si );
if( SHSipInfo( SPI_GETSIPINFO, 0, &si, 0 ) )
{
MoveWindow(
hwnd,
si.rcVisibleDesktop.left,
si.rcVisibleDesktop.top,
si.rcVisibleDesktop.right –
si.rcVisibleDesktop.left,
si.rcVisibleDesktop.bottom -
si.rcVisibleDesktop.top,
TRUE );
}
break;
}
break;
}
return 0;
} | |
See Also
Note: