Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wireless settings

3 views
Skip to first unread message

schliz

unread,
Nov 8, 2006, 5:34:24 AM11/8/06
to
I would either like to configure all WLAN settings out of my Programm.
Written in embedded VC++ using MFC,
or
I would like to let the Dialog Control pop up out of my programm, but
it seems it is in device.exe, if I am right.


For configuring WLAN settings out of the program I found information
on: OID_802_11_ objects, but I don't know the syntax to use them.

Can anybody please give me a hint please.

Thank you very much.

G

Paul G. Tobey [eMVP]

unread,
Nov 8, 2006, 11:09:50 AM11/8/06
to
What are you trying to actually accomplish? You don't want the Windows CE
Windows Zero Config user interface to pop up and allow the user to enter the
WEP keys, to enter passwords, etc. or you *do* want that to happen?

Paul T.

"schliz" <schl...@yahoo.com> wrote in message
news:1162982064.1...@i42g2000cwa.googlegroups.com...

schliz

unread,
Nov 9, 2006, 8:06:42 AM11/9/06
to
Dear Paul

Thank's for your reply, I would like to let the Config Panel for WEP
key and so on pop up out of my program.

Georg


Paul G. Tobey [eMVP] schrieb:

schliz

unread,
Nov 9, 2006, 8:06:58 AM11/9/06
to
Dear Paul

Thank's for your reply, I would like to let the Config Panel for WEP
key and so on pop up out of my program.

Georg


Paul G. Tobey [eMVP] schrieb:

> What are you trying to actually accomplish? You don't want the Windows CE

Paul G. Tobey [eMVP]

unread,
Nov 9, 2006, 11:15:57 AM11/9/06
to
"out of my program"? That doesn't have any meaning. It will come to the
front at an appropriate time. I can't visualize what you're trying to say.
Sorry.

Paul T.

"schliz" <schl...@yahoo.com> wrote in message

news:1163077602.1...@h54g2000cwb.googlegroups.com...

schliz

unread,
Nov 10, 2006, 2:09:28 AM11/10/06
to
Dear Paul,

There is this wireless connection icon in the notification area on the
right bottom of the screen (like time and date). If you double click
it, a panel for configuring WLAN options, the key and so on appears.
What I wanna do is: I have got an application, and in there I would
like to show this panel, means I would like it to pop up, so the user
is able to set his WLAN options.

Thank you so much

Paul G. Tobey [eMVP]

unread,
Nov 10, 2006, 10:54:17 AM11/10/06
to
So, you want to trigger a shell event from your code. I don't see any
documented way to do that. If you have Platform Builder, you can look in
the code in PUBLIC/COMMON/OAK/DRIVERS/NETUI for the window and message that
are set up to be associated with the system tray icon and try to send that
message combo yourself when you want the dialog displayed. Obviously, you'd
be counting on the internal implementation of the NetUI stuff and it might
easily change tomorrow.

Paul T.

"schliz" <schl...@yahoo.com> wrote in message

news:1163142568....@m73g2000cwd.googlegroups.com...

schliz

unread,
Nov 13, 2006, 1:53:26 AM11/13/06
to
Dear Paul,

Thank you for your time. The only thing else I found, are OID_802_11
objects for setting WLAN options. Have you ever used them in an
application?
I will try to find further information on that topic.

Thanks Georg

Paul G. Tobey [eMVP]

unread,
Nov 13, 2006, 11:36:17 AM11/13/06
to
That's not going to trigger the appearance of the standard dialog. That's
how the WZC code talks to the adapter driver. Remember that it's *not* the
driver that is displaying that dialog or performing those operations, it's
WZC.

Paul T.

"schliz" <schl...@yahoo.com> wrote in message

news:1163400806.0...@k70g2000cwa.googlegroups.com...

schliz

unread,
Nov 14, 2006, 2:10:00 AM11/14/06
to
Dear Paul,

I hope you read the post in the other forum, as I sad I did not know
the rules.
2. mistake is I did not read your last reply about WZC. So isn't it
possible to start WZC or so?

Thanks

G

schliz

unread,
Nov 14, 2006, 4:10:37 AM11/14/06
to
Dear Paul,

Due to your information I found an article about Ethman:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceosdev5/html/wce50conethman.asp

it says: ...

It also provides a basic configuration dialog box for 802.11 adapters
if no previous configuration is available. ...

I guess that's it what I am looking for.
Now is the question how to excess and open this dialog.

Georg


schliz schrieb:

schliz

unread,
Nov 14, 2006, 6:53:16 AM11/14/06
to
Please Help!

MSDN says: Ethman adds a wireless adapter, a dialog box that allows the
user to set the wireless properties appears. ...

Ethman has got some functions, and there is a .lib and .dll.
I don't not know how to use it.

I added the lib to my project, it appeared in the Resource Files.
After that I tried to call the function RemoveNetUISystrayIcon(...)
but I got the error message : error C2065: 'RemoveNetUISystrayIcon' :
undeclared identifier

Thank you in advance

Paul G. Tobey [eMVP]

unread,
Nov 14, 2006, 11:46:07 AM11/14/06
to
Why are you trying to do this? What possible use would calling
RemoveNetUISystrayIcon() be?

I'm going to quote my message two cycles back. Please try this before doing
a bunch of completely random stuff!

"So, you want to trigger a shell event from your code. I don't see any
documented way to do that. If you have Platform Builder, you can look in
the code in PUBLIC/COMMON/OAK/DRIVERS/NETUI for the window and message that
are set up to be associated with the system tray icon and try to send that
message combo yourself when you want the dialog displayed. Obviously, you'd
be counting on the internal implementation of the NetUI stuff and it might
easily change tomorrow."

Paul T.

"schliz" <schl...@yahoo.com> wrote in message

news:1163505196.3...@i42g2000cwa.googlegroups.com...

schliz

unread,
Nov 15, 2006, 3:22:00 AM11/15/06
to
Dear Paul,

Thank you for your reply.

I just thought Ethman would be a solution, because a note in MSDN says:
When Ethman adds a wireless adapter, a dialog box that allows the user
to set the wireless properties appears. These properties are then set
in the wzcuip.c file for use by the operating system.

I will try to find the associated system tray icon in NETUI, than I
will try to find out how to send a shell event containing the message
combo out of my program.

Thank you very much.

schliz

unread,
Dec 4, 2006, 10:02:02 AM12/4/06
to
Dear Paul,

I think I've found it:

I think it is this function in: wzcui.c

//
---------------------------------------------------------------------------
// Dialog proc for the "advanced" button.
//
---------------------------------------------------------------------------

LRESULT CALLBACK
NetworkWLanAdvancedDlgProc(HWND hDlg, UINT message, WPARAM wParam,
LPARAM lParam)
{
static PWLAN_INFO s_pWLanInfo;
static NDIS_802_11_NETWORK_INFRASTRUCTURE s_mode;

BOOL fRetVal = TRUE;
NMHDR* header = NULL;

switch(message)
{
case WM_INITDIALOG:
{
// Get WLanInfo
s_pWLanInfo = (PWLAN_INFO) lParam;
if(!s_pWLanInfo)
{
fRetVal = FALSE;
break;
}

OnInitWZCAdvancedDialog(hDlg, s_pWLanInfo, &s_mode);

fRetVal = FALSE;
break;
}
case WM_NOTIFY:

header = (NMHDR*) lParam;
switch(header->code)
{
case LVN_ITEMCHANGED:

RefreshButtons(hDlg, s_pWLanInfo);

fRetVal = FALSE;
break;

case NM_RCLICK:

OnAdvListRClick(hDlg);

fRetVal = FALSE;
break;

case NM_CLICK:

if (GetKeyState(VK_MENU) < 0)
OnAdvListRClick(hDlg);

fRetVal = FALSE;
break;

case NM_DBLCLK:

OnAdvConfigureNetwork(hDlg, s_pWLanInfo);

fRetVal = FALSE;
break;
}

fRetVal = FALSE;
break;

case WM_COMMAND:

switch(LOWORD(wParam))
{
case IDM_WZC_CONFIGURE:

OnAdvConfigureNetwork(hDlg, s_pWLanInfo);
break;

case IDOK:

OnWZCAdvancedOK(hDlg, s_pWLanInfo);
break;

case IDCANCEL:

DestroyWindow(hDlg);
break;

case IDC_WZC_CHK_ENABLEWZC:

OnWZCEnableChk(hDlg, s_pWLanInfo);
fRetVal = FALSE;
break;

case IDC_WZC_PREF_UP:

MoveWZCNetwork(hDlg, s_pWLanInfo, TRUE);

fRetVal = FALSE;
break;

case IDC_WZC_PREF_DOWN:

MoveWZCNetwork(hDlg, s_pWLanInfo, FALSE);

fRetVal = FALSE;
break;

case IDM_WZC_DELETE:
case IDC_WZC_PREF_DELETE:

OnWZCPrefDelete(hDlg, s_pWLanInfo);

fRetVal = FALSE;
break;

case IDC_WZC_NETACCESS_COMBO:
{
int iSelection;

iSelection = SendMessage(s_pWLanInfo->hwndNetAccess, CB_GETCURSEL,
0, 0);
ASSERT(iSelection != CB_ERR);

// See what type of network connectivity the user
selected
if(iSelection == 2)
{
// Computer-to-computer
s_mode = Ndis802_11IBSS;
}
else if(iSelection == 1)
{
// infrastructure (access point) network
s_mode = Ndis802_11Infrastructure;
}
else if(iSelection == 0)\
{
// Any network (access point preferred)
s_mode = Ndis802_11AutoUnknown;
}

s_pWLanInfo->dwCtlFlags &= ~INTFCTL_CM_MASK;
s_pWLanInfo->dwCtlFlags |= (((DWORD) s_mode) &
INTFCTL_CM_MASK);

FillPreferredLV(s_pWLanInfo);
}
fRetVal = FALSE;
break;
}

fRetVal = FALSE;
break;

case WM_CLOSE:

DestroyWindow(hDlg);
fRetVal = FALSE;
break;

case WM_DESTROY:

PostQuitMessage(0);
fRetVal = FALSE;
break;


default:
fRetVal = FALSE;
break;
}

return fRetVal;
}

But I don't know how to call it as you said? Can you please give me a
hint?

Thank you.
G

Paul G. Tobey [eMVP]

unread,
Dec 4, 2006, 11:35:40 AM12/4/06
to
Please read my message from a couple of cycles back. I'm not going to
refresh your memory every few days. You want to send a suitable message to
the window which will trigger the same operation as when the user does
something, double-clicks, say, the icon in the system tray. Capture the
message stream when you do this as a user, figure out how to identify the
window to which this message is being sent by your user action, then do the
same thing programmatically. Again, I doubt that anyone else has ever done
this, so no one is going to be able to guide you step-by-step. You're going
to have to do some real engineering.

Paul T.

"schliz" <schl...@yahoo.com> wrote in message

news:1165244522....@j44g2000cwa.googlegroups.com...

schliz

unread,
Dec 5, 2006, 9:05:06 AM12/5/06
to
Dear Paul!

Thank you sooooooooo much!

I found it out due to your hint and I am sooo proud.

CWnd *pWndPrev, *pWndChild;
pWndPrev = 0;
pWndChild = 0;

// Determine if a window with the class name exists...
if (pWndPrev = CWnd::FindWindow(_T("HHTaskBar"),NULL))
{
// Get the child
pWndChild = pWndPrev->GetTopWindow();
HWND window = pWndChild->GetSafeHwnd();
::SendMessage(window,WM_LBUTTONDBLCLK,0x00000001,0x000D000A);
}

Than it pops up.

Thank you again.
The next problem is, that I would like to run the application in kiosk
mode after startup. So I have to run the TaskBar in the background. I
posted a different thread about that and as everytime you gave me an
answer.
Thank's again for your time! :-)
G


Paul G. Tobey [eMVP] schrieb:

> Please read my message from a couple of cycles back. I'm not going to

monday_sunny

unread,
Feb 28, 2007, 3:47:08 AM2/28/07
to
Hi,schliz.
I am going through the same problem as you, Would you please
explain the prarmetes :0x00000001,0x000D000A in function
SendMessage(window,WM_LBUTTONDBLCLK,0x00000001,0x000D000A) and what is the
use of this function.

Thanks.

Paul G. Tobey [eMVP]

unread,
Feb 28, 2007, 10:59:05 AM2/28/07
to
Read the documentation for the message WM_LBUTTONDBLCLK to see what the
parameters mean...

Paul T.

"monday_sunny" <monda...@discussions.microsoft.com> wrote in message
news:98B5BEEA-CE28-4CCF...@microsoft.com...

0 new messages