Sample Code

Windows Driver Samples/ Toaster Sample (UMDF Version 2)/ C++/ exe/ notify/ notify.rc/

#include "windows.h"

#include "notify.h"


GenericMenu MENU
  {
    POPUP    "&File"
    {
      MENUITEM "Clear &Display",   IDM_CLEAR
      MENUITEM "&Verbose Trace",   IDM_VERBOSE
      MENUITEM "E&xit",   IDM_EXIT
    }
    POPUP    "&Bus"
    {
      MENUITEM "&PlugIn", IDM_PLUGIN
      MENUITEM "&UnPlug (Surprise Removal)", IDM_UNPLUG
      MENUITEM "&Eject",  IDM_EJECT
    }
    POPUP    "&Function"
    {
      MENUITEM "&Open",  IDM_OPEN
      MENUITEM "&Close", IDM_CLOSE
      MENUITEM "&Hide",  IDM_HIDE
      
    }
    POPUP    "Fil&ter"
    {
      MENUITEM "&Ioctl to Control Device",  IDM_IOCTL     
    }
  }



/////////////////////////////////////////////////////////////////////////////
//
// Dialog for plug in
//

IDD_DIALOG DIALOG DISCARDABLE  0, 0, 289, 86
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Plug In Device"
FONT 8, "MS Shell Dlg"
BEGIN
    DEFPUSHBUTTON   "OK",ID_OK,72,61,50,14,BS_NOTIFY
    PUSHBUTTON   "CANCEL",ID_CANCEL,170,60,50,14,BS_NOTIFY
    LTEXT           "Serial Number :",IDC_STATIC,18,13,55,8
    LTEXT           "Device ID :",IDC_STATIC,20,35,55,8
    EDITTEXT        IDC_SERIALNO,75,11,24,14,ES_NUMBER
    EDITTEXT        IDC_DEVICEID,76,32,200,14,ES_AUTOHSCROLL
END

/////////////////////////////////////////////////////////////////////////////
//
// Dialog for unplug/hide/enable/disable
//

IDD_DIALOG1 DIALOG DISCARDABLE  0, 0, 232, 86
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enter SerialNo of the device"
FONT 8, "MS Shell Dlg"
BEGIN
    LTEXT           "Serial Number :",IDC_STATIC,18,13,55,8
    EDITTEXT        IDC_SERIALNO,75,11,24,14,ES_NUMBER
    DEFPUSHBUTTON   "OK",ID_OK,27,61,50,14,BS_NOTIFY
    PUSHBUTTON   "CANCEL",ID_CANCEL,121,60,50,14,BS_NOTIFY
END


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

IDI_CLASS_ICON               ICON    DISCARDABLE     "TOASTER.ICO"


Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS