From: mtpoth on
Hi, I use this method to call the battery information window, and this work
fine in some pockets but wen I tried use it in a HP with Windows Pocket PC
4.20.1081 dont work...

CString path ("\\Windows\\ctlpnl.exe");
SHELLEXECUTEINFO si;

memset(&si,0,sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SEE_MASK_NOCLOSEPROCESS;
si.hwnd = NULL;
si.lpVerb = _T("open");
si.lpParameters = _T("cplmain.cpl,3");
si.lpDirectory = NULL;
si.nShow = SW_SHOWMAXIMIZED;
si.hInstApp = NULL;
si.lpFile = LPCTSTR(path);

ShellExecuteEx( &si );

can anyone help me ?
From: Peter Foot on
Some devices override the standard property pages with a custom one in a
separate dll or perhaps an exe. You need to check the registry to see if an
alternative is registered and if so call ctlpnl.exe with the dll as an
argument. Check HKEY_LOCAL_MACHINE\ControlPanel\Power
And look for a value named "Redirect".

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - Software Solutions for a Mobile World
In The Hand Ltd - .NET Components for Mobility

"mtpoth" <mtpoth(a)discussions.microsoft.com> wrote in message
news:3205A4DB-81FA-4083-AC15-98F316C5C25C(a)microsoft.com...
> Hi, I use this method to call the battery information window, and this
> work
> fine in some pockets but wen I tried use it in a HP with Windows Pocket PC
> 4.20.1081 dont work...
>
> CString path ("\\Windows\\ctlpnl.exe");
> SHELLEXECUTEINFO si;
>
> memset(&si,0,sizeof(si));
> si.cbSize = sizeof(si);
> si.fMask = SEE_MASK_NOCLOSEPROCESS;
> si.hwnd = NULL;
> si.lpVerb = _T("open");
> si.lpParameters = _T("cplmain.cpl,3");
> si.lpDirectory = NULL;
> si.nShow = SW_SHOWMAXIMIZED;
> si.hInstApp = NULL;
> si.lpFile = LPCTSTR(path);
>
> ShellExecuteEx( &si );
>
> can anyone help me ?

From: mtpoth on
Peter, I have already did that, but I get the same result... nothing...
others window from the control panel open normally wen I pass another
parameter. The only than I can“t open is just that I need....

thanks anyway

"Peter Foot" wrote:

> Some devices override the standard property pages with a custom one in a
> separate dll or perhaps an exe. You need to check the registry to see if an
> alternative is registered and if so call ctlpnl.exe with the dll as an
> argument. Check HKEY_LOCAL_MACHINE\ControlPanel\Power
> And look for a value named "Redirect".
>
> Peter
>
> --
> Peter Foot
> Microsoft Device Application Development MVP
> peterfoot.net | appamundi.com | inthehand.com
> APPA Mundi Ltd - Software Solutions for a Mobile World
> In The Hand Ltd - .NET Components for Mobility
>
> "mtpoth" <mtpoth(a)discussions.microsoft.com> wrote in message
> news:3205A4DB-81FA-4083-AC15-98F316C5C25C(a)microsoft.com...
> > Hi, I use this method to call the battery information window, and this
> > work
> > fine in some pockets but wen I tried use it in a HP with Windows Pocket PC
> > 4.20.1081 dont work...
> >
> > CString path ("\\Windows\\ctlpnl.exe");
> > SHELLEXECUTEINFO si;
> >
> > memset(&si,0,sizeof(si));
> > si.cbSize = sizeof(si);
> > si.fMask = SEE_MASK_NOCLOSEPROCESS;
> > si.hwnd = NULL;
> > si.lpVerb = _T("open");
> > si.lpParameters = _T("cplmain.cpl,3");
> > si.lpDirectory = NULL;
> > si.nShow = SW_SHOWMAXIMIZED;
> > si.hInstApp = NULL;
> > si.lpFile = LPCTSTR(path);
> >
> > ShellExecuteEx( &si );
> >
> > can anyone help me ?
>