This little sample application queries, the handheld device for all its configurable barcode scanner settings.  This helps developers to point out exactly what barcode settings they would want to configure, either turning them off or on.  This code implementation was done in c++ and for Windows CE 5.0 operating system.

See code snippets below and a screen shot.

 

 

 

#include "stdafx.h"

#include <windows.h>

#include <stdio.h>

#include "resource.h"

#include <commctrl.h>

#include <vector>

#include <string>

#include "PsionTeklogix.hpp"

 

using namespace std;

using namespace PsionTeklogix;

using namespace PsionTeklogix::Scanner;

LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

int WINAPI WinMain( HINSTANCE hInstance,

HINSTANCE hPrevInstance,

LPTSTR    lpCmdLine,

int       nCmdShow)

{

  // TODO: Place code here.

DialogBox(hInstance, (LPCTSTR)IDD_DIALOG1, NULL, (DLGPROC)DlgProc);

return 0;

}

 

LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

{

switch(message)

{

case WM_INITDIALOG:

{

Utility::StringList::const_iterator i;

Utility::StringList scanSettings = Scanner::EnumerateScannerSettings ();

for (i= scanSettings.begin (); i != scanSettings.end (); ++i)

{

SendDlgItemMessage(hDlg,IDC_LIST11,LB_ADDSTRING,0,(LPARAM)i->c_str ());//

}

//Scanner::SetIntegerSetting (L"ICSP\\Add AIM ID prefix",0);

//Scanner::ApplySettingChanges ();

 

}

return TRUE; 

 

case WM_COMMAND:

switch(LOWORD(wParam))

{

case WM_CLOSE:

{

EndDialog(hDlg,message);

return TRUE;

}

case IDOK:

{

EndDialog(hDlg, LOWORD(wParam));

return TRUE;

}

case IDCANCEL:

{

EndDialog(hDlg, LOWORD(wParam));

return TRUE;

}

}

}

return FALSE;

}

 

2134.EnumerateScannerSettingsCE5.zip