Sample Code

Windows Driver Samples/ Toaster Sample Driver/ C++/ exe/ notify/ notify.rc/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#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-2025 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