Python win32con.WS_SYSMENU Examples
The following are 30
code examples of win32con.WS_SYSMENU().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
win32con
, or try the search function
.
Example #1
Source File: ocxtest.py From ironpython2 with Apache License 2.0 | 6 votes |
def MakeDlgTemplate(): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE dlg = [ ["OCX Demos", (0, 0, 350, 350), style, None, (8, "MS Sans Serif")], ] s = win32con.WS_TABSTOP | cs # dlg.append([131, None, 130, (5, 40, 110, 48), # s | win32con.LBS_NOTIFY | win32con.LBS_SORT | win32con.LBS_NOINTEGRALHEIGHT | win32con.WS_VSCROLL | win32con.WS_BORDER]) # dlg.append(["{8E27C92B-1264-101C-8A2F-040224009C02}", None, 131, (5, 40, 110, 48),win32con.WS_TABSTOP]) dlg.append([128, "About", win32con.IDOK, (124, 5, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Close", win32con.IDCANCEL, (124, 22, 50, 14), s]) return dlg #################################### # # Calendar test code #
Example #2
Source File: check_external_drive.py From BrainDamage with Apache License 2.0 | 6 votes |
def __init__(self): message_map = { win32con.WM_DEVICECHANGE : self.onDeviceChange } wc = win32gui.WNDCLASS () hinst = wc.hInstance = win32api.GetModuleHandle (None) wc.lpszClassName = "DeviceChangeDemo" wc.style = win32con.CS_VREDRAW | win32con.CS_HREDRAW; wc.hCursor = win32gui.LoadCursor (0, win32con.IDC_ARROW) wc.hbrBackground = win32con.COLOR_WINDOW wc.lpfnWndProc = message_map classAtom = win32gui.RegisterClass (wc) style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU self.hwnd = win32gui.CreateWindow ( classAtom, "Device Change Demo", style, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, hinst, None )
Example #3
Source File: win32_toast.py From servoshell with Mozilla Public License 2.0 | 6 votes |
def balloon_tip(self, title, msg): style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU hwnd = CreateWindow(self.classAtom, "Taskbar", style, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, self.hinst, None) UpdateWindow(hwnd) hicon = LoadIcon(0, win32con.IDI_APPLICATION) nid = (hwnd, 0, NIF_ICON | NIF_MESSAGE | NIF_TIP, win32con.WM_USER + 20, hicon, 'Tooltip') Shell_NotifyIcon(NIM_ADD, nid) nid = (hwnd, 0, NIF_INFO, win32con.WM_USER + 20, hicon, 'Balloon Tooltip', msg, 200, title, NIIF_INFO) Shell_NotifyIcon(NIM_MODIFY, nid) DestroyWindow(hwnd)
Example #4
Source File: shell.py From eavatar-me with Apache License 2.0 | 6 votes |
def create_window(self): # Create the Window. style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU hwnd = win32gui.CreateWindow(self.class_atom, self.window_class_name, style, 0, 0, 310, 250, 0, 0, self.hinst, None) win32gui.UpdateWindow(hwnd) return hwnd
Example #5
Source File: simpledialog.py From eavatar-me with Apache License 2.0 | 6 votes |
def _GetDialogTemplate(self, dlgClassName): style = (win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT | win32con.WS_MINIMIZEBOX) cs = win32con.WS_CHILD | win32con.WS_VISIBLE # Window frame and title dlg = [[self.title, (0, 0, 210, 60), style, None, (8, "MS Sans Serif"), None, dlgClassName], ] # ID label and text box dlg.append([130, self.message, -1, (5, 5, 200, 9), cs | win32con.SS_LEFT]) s = cs | win32con.WS_TABSTOP | win32con.WS_BORDER dlg.append(['EDIT', None, IDC_SEARCHTEXT, (5, 15, 200, 12), s]) # Search/Display Buttons # (x positions don't matter here) s = cs | win32con.WS_TABSTOP dlg.append([128, "Cancel", IDC_BUTTON_CANCEL, (100, 35, 50, 14), s]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "OK", IDC_BUTTON_OK, (100, 35, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) return dlg
Example #6
Source File: dyndlg.py From eavatar-me with Apache License 2.0 | 6 votes |
def MakeDlgTemplate(): style = (win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT) cs = win32con.WS_CHILD | win32con.WS_VISIBLE dlg = [["Select Warehouse", (0, 0, 177, 93), style, None, (8, "MS Sans Serif")], ] dlg.append( [130, "Current Warehouse:", -1, (7, 7, 69, 9), cs | win32con.SS_LEFT]) dlg.append([130, "ASTORIA", 128, (16, 17, 99, 7), cs | win32con.SS_LEFT]) dlg.append( [130, "New &Warehouse:", -1, (7, 29, 69, 9), cs | win32con.SS_LEFT]) s = win32con.WS_TABSTOP | cs dlg.append( ["{8E27C92B-1264-101C-8A2F-040224009C02}", None, 131, (5, 40, 110, 48), win32con.WS_TABSTOP]) dlg.append([128, "OK", win32con.IDOK, (124, 5, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Cancel", win32con.IDCANCEL, (124, 22, 50, 14), s]) dlg.append([128, "&Help", 100, (124, 74, 50, 14), s]) return dlg
Example #7
Source File: window.py From eavatar-me with Apache License 2.0 | 6 votes |
def _create_window(self, style=win32con.WS_OVERLAPPED | win32con.WS_SYSMENU): # Create the Window. hwnd = win32gui.CreateWindow(self.class_atom, self.window_class_name, style, 0, 0, 310, 250, 0, 0, self.hinst, None) win32gui.UpdateWindow(hwnd) return hwnd
Example #8
Source File: was.py From WAS with GNU General Public License v3.0 | 6 votes |
def __init__(self): message_map = { win32con.WM_DEVICECHANGE: self.onDeviceChange } wc = win32gui.WNDCLASS() hinst = wc.hInstance = win32api.GetModuleHandle(None) wc.lpszClassName = "DeviceChangeDemo" wc.style = win32con.CS_VREDRAW | win32con.CS_HREDRAW wc.hCursor = win32gui.LoadCursor(0, win32con.IDC_ARROW) wc.hbrBackground = win32con.COLOR_WINDOW wc.lpfnWndProc = message_map classAtom = win32gui.RegisterClass(wc) style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU self.hwnd = win32gui.CreateWindow( classAtom, "Device Change Demo", style, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, hinst, None )
Example #9
Source File: ControlService.py From ironpython2 with Apache License 2.0 | 6 votes |
def GetResource(self): style = win32con.WS_POPUP | win32con.DS_SETFONT | win32con.WS_SYSMENU | win32con.WS_CAPTION | win32con.WS_VISIBLE | win32con.DS_MODALFRAME exstyle = None t = [["Services", (16, 16, 333, 157), style, exstyle, (8, 'MS Shell Dlg')], ] t.append([130, "Ser&vice", -1, (6, 6, 70, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([130, "Status", -1, (164, 6, 42, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([130, "Startup", -1, (206, 6, 50, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([131, "", self.IDC_LIST, (6, 16, 255, 106), win32con.LBS_USETABSTOPS | win32con.LBS_SORT | win32con.LBS_NOINTEGRALHEIGHT | win32con.WS_BORDER | win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_TABSTOP | win32con.LBS_NOTIFY | win32con.WS_VSCROLL]) t.append([128, "Close", win32con.IDOK, (267, 6, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_GROUP | win32con.WS_TABSTOP | win32con.BS_DEFPUSHBUTTON]) t.append([128, "&Start", self.IDC_START, (267, 27, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "S&top", self.IDC_STOP, (267, 44, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "&Pause", self.IDC_PAUSE, (267, 61, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "&Continue", self.IDC_CONTINUE, (267, 78, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "Sta&rtup...", self.IDC_STARTUP, (267, 99, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "H&W Profiles...", self.IDC_PROFILES, (267, 116, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "&Help", win32con.IDHELP, (267, 137, 60, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([130, "St&artup Parameters:", -1, (6, 128, 70, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([129, "", self.IDC_PARAMS, (6, 139, 247, 12), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_GROUP | win32con.WS_BORDER | win32con.ES_AUTOHSCROLL]) return t
Example #10
Source File: ControlService.py From ironpython2 with Apache License 2.0 | 6 votes |
def GetResource(self): style = win32con.WS_POPUP | win32con.DS_SETFONT | win32con.WS_SYSMENU | win32con.WS_CAPTION | win32con.WS_VISIBLE | win32con.DS_MODALFRAME exstyle = None t = [["Service Startup", (6, 18, 188, 107), style, exstyle, (8, 'MS Shell Dlg')], ] t.append([130, "Device:", self.IDC_LABEL, (6, 7, 40, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([130, "", self.IDC_DEVICE, (48, 7, 134, 8), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.SS_LEFT]) t.append([128, "Startup Type", -1, (6, 21, 130, 80), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_GROUP | win32con.BS_GROUPBOX]) t.append([128, "&Boot", self.IDC_BOOT, (12, 33, 39, 10), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_AUTORADIOBUTTON]) t.append([128, "&System", self.IDC_SYSTEM, (12, 46, 39, 10), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_AUTORADIOBUTTON]) t.append([128, "&Automatic", self.IDC_AUTOMATIC, (12, 59, 118, 10), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_AUTORADIOBUTTON]) t.append([128, "&Manual", self.IDC_MANUAL, (12, 72, 118, 10), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_AUTORADIOBUTTON]) t.append([128, "&Disabled", self.IDC_DISABLED, (12, 85, 118, 10), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_AUTORADIOBUTTON]) t.append([128, "OK", win32con.IDOK, (142, 25, 40, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.WS_GROUP | win32con.BS_DEFPUSHBUTTON]) t.append([128, "Cancel", win32con.IDCANCEL, (142, 43, 40, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) t.append([128, "&Help", win32con.IDHELP, (142, 61, 40, 14), win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.WS_TABSTOP | win32con.BS_PUSHBUTTON]) return t
Example #11
Source File: desktopmanager.py From ironpython2 with Apache License 2.0 | 6 votes |
def get_new_desktop_name(parent_hwnd): """ Create a dialog box to ask the user for name of desktop to be created """ msgs={win32con.WM_COMMAND:desktop_name_dlgproc, win32con.WM_CLOSE:desktop_name_dlgproc, win32con.WM_DESTROY:desktop_name_dlgproc} # dlg item [type, caption, id, (x,y,cx,cy), style, ex style style=win32con.WS_BORDER|win32con.WS_VISIBLE|win32con.WS_CAPTION|win32con.WS_SYSMENU ## |win32con.DS_SYSMODAL h=win32gui.CreateDialogIndirect( win32api.GetModuleHandle(None), [['One ugly dialog box !',(100,100,200,100),style,0], ['Button','Create', win32con.IDOK, (10,10,30,20),win32con.WS_VISIBLE|win32con.WS_TABSTOP|win32con.BS_HOLLOW|win32con.BS_DEFPUSHBUTTON], ['Button','Never mind', win32con.IDCANCEL, (45,10,50,20),win32con.WS_VISIBLE|win32con.WS_TABSTOP|win32con.BS_HOLLOW], ['Static','Desktop name:',71,(10,40,70,10),win32con.WS_VISIBLE], ['Edit','',72,(75,40,90,10),win32con.WS_VISIBLE]], parent_hwnd, msgs) ## parent_hwnd, msgs) win32gui.EnableWindow(h,True) hcontrol=win32gui.GetDlgItem(h,72) win32gui.EnableWindow(hcontrol,True) win32gui.SetFocus(hcontrol)
Example #12
Source File: ocxserialtest.py From ironpython2 with Apache License 2.0 | 6 votes |
def MakeDlgTemplate(): style = win32con.DS_MODALFRAME | win32con.WS_POPUP \ | win32con.WS_VISIBLE | win32con.WS_CAPTION \ | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE dlg = [ ["Very Basic Terminal", (0, 0, 350, 180), style, None, (8, "MS Sans Serif")], ] s = win32con.WS_TABSTOP | cs dlg.append(["RICHEDIT", None, 132, (5, 5, 340, 170),s | win32con.ES_WANTRETURN | win32con.ES_MULTILINE | win32con.ES_AUTOVSCROLL | win32con.WS_VSCROLL]) return dlg #################################### # # Serial Control #
Example #13
Source File: dyndlg.py From ironpython2 with Apache License 2.0 | 6 votes |
def MakeDlgTemplate(): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE dlg = [ ["Select Warehouse", (0, 0, 177, 93), style, None, (8, "MS Sans Serif")], ] dlg.append([130, "Current Warehouse:", -1, (7, 7, 69, 9), cs | win32con.SS_LEFT]) dlg.append([130, "ASTORIA", 128, (16, 17, 99, 7), cs | win32con.SS_LEFT]) dlg.append([130, "New &Warehouse:", -1, (7, 29, 69, 9), cs | win32con.SS_LEFT]) s = win32con.WS_TABSTOP | cs # dlg.append([131, None, 130, (5, 40, 110, 48), # s | win32con.LBS_NOTIFY | win32con.LBS_SORT | win32con.LBS_NOINTEGRALHEIGHT | win32con.WS_VSCROLL | win32con.WS_BORDER]) dlg.append(["{8E27C92B-1264-101C-8A2F-040224009C02}", None, 131, (5, 40, 110, 48),win32con.WS_TABSTOP]) dlg.append([128, "OK", win32con.IDOK, (124, 5, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Cancel", win32con.IDCANCEL, (124, 22, 50, 14), s]) dlg.append([128, "&Help", 100, (124, 74, 50, 14), s]) return dlg
Example #14
Source File: dlgtest.py From ironpython2 with Apache License 2.0 | 6 votes |
def demo(modal = 0): TestDialog(modal) # property sheet/page demo ps=win32ui.CreatePropertySheet('Property Sheet/Page Demo') # Create a completely standard PropertyPage. page1=win32ui.CreatePropertyPage(win32ui.IDD_PROPDEMO1) # Create our custom property page. page2=TestPage(win32ui.IDD_PROPDEMO2) ps.AddPage(page1) ps.AddPage(page2) if modal: ps.DoModal() else: style = win32con.WS_SYSMENU|win32con.WS_POPUP|win32con.WS_CAPTION|win32con.DS_MODALFRAME|win32con.WS_VISIBLE styleex = win32con.WS_EX_DLGMODALFRAME | win32con.WS_EX_PALETTEWINDOW ps.CreateWindow(win32ui.GetMainFrame(), style, styleex)
Example #15
Source File: login.py From ironpython2 with Apache License 2.0 | 6 votes |
def MakeLoginDlgTemplate(title): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE # Window frame and title dlg = [ [title, (0, 0, 184, 40), style, None, (8, "MS Sans Serif")], ] # ID label and text box dlg.append([130, "User ID:", -1, (7, 9, 69, 9), cs | win32con.SS_LEFT]) s = cs | win32con.WS_TABSTOP | win32con.WS_BORDER dlg.append(['EDIT', None, win32ui.IDC_EDIT1, (50, 7, 60, 12), s]) # Password label and text box dlg.append([130, "Password:", -1, (7, 22, 69, 9), cs | win32con.SS_LEFT]) s = cs | win32con.WS_TABSTOP | win32con.WS_BORDER dlg.append(['EDIT', None, win32ui.IDC_EDIT2, (50, 20, 60, 12), s | win32con.ES_PASSWORD]) # OK/Cancel Buttons s = cs | win32con.WS_TABSTOP dlg.append([128, "OK", win32con.IDOK, (124, 5, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Cancel", win32con.IDCANCEL, (124, 20, 50, 14), s]) return dlg
Example #16
Source File: list.py From ironpython2 with Apache License 2.0 | 6 votes |
def _maketemplate(self, title): style = win32con.WS_DLGFRAME | win32con.WS_SYSMENU | win32con.WS_VISIBLE ls = ( win32con.WS_CHILD | win32con.WS_VISIBLE | commctrl.LVS_ALIGNLEFT | commctrl.LVS_REPORT ) bs = ( win32con.WS_CHILD | win32con.WS_VISIBLE ) return [ [title, (0, 0, 200, 200), style, None, (8, "MS Sans Serif")], ["SysListView32", None, win32ui.IDC_LIST1, (0, 0, 200, 200), ls], [128, "OK", win32con.IDOK, (10, 0, 50, 14), bs | win32con.BS_DEFPUSHBUTTON], [128, "Cancel",win32con.IDCANCEL,(0, 0, 50, 14), bs], ]
Example #17
Source File: find.py From ironpython2 with Apache License 2.0 | 6 votes |
def _GetDialogTemplate(self): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT visible = win32con.WS_CHILD | win32con.WS_VISIBLE dt = [ ["Find", (0, 2, 240, 75), style, None, (8, "MS Sans Serif")], ["Static", "Fi&nd What:", 101, (5, 8, 40, 10), visible], ["Edit", "", 102, (50, 7, 120, 12), visible | win32con.WS_BORDER | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL], ["Button", "Match &whole word only", 105, (5, 23, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Match &case", 107, (5, 33, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Keep &dialog open", 115, (5, 43, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Across &open files", 116, (5, 52, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "&Remember as default search", 117, (5, 61, 150, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "&Find Next", 109, (185, 5, 50, 14), visible | win32con.BS_DEFPUSHBUTTON | win32con.WS_TABSTOP], ["Button", "Cancel", win32con.IDCANCEL, (185, 23, 50, 14), visible | win32con.WS_TABSTOP], ] return dt
Example #18
Source File: find.py From ironpython2 with Apache License 2.0 | 6 votes |
def _GetDialogTemplate(self): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT visible = win32con.WS_CHILD | win32con.WS_VISIBLE dt = [ ["Replace", (0, 2, 240, 95), style, 0, (8, "MS Sans Serif")], ["Static", "Fi&nd What:", 101, (5, 8, 40, 10), visible], ["Edit", "", 102, (60, 7, 110, 12), visible | win32con.WS_BORDER | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL], ["Static", "Re&place with:", 103, (5, 25, 50, 10), visible], ["Edit", "", 104, (60, 24, 110, 12), visible | win32con.WS_BORDER | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL], ["Button", "Match &whole word only", 105, (5, 42, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Match &case", 107, (5, 52, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Keep &dialog open", 115, (5, 62, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "Across &open files", 116, (5, 72, 100, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "&Remember as default search", 117, (5, 81, 150, 10), visible | win32con.BS_AUTOCHECKBOX | win32con.WS_TABSTOP], ["Button", "&Find Next", 109, (185, 5, 50, 14), visible | win32con.BS_DEFPUSHBUTTON | win32con.WS_TABSTOP], ["Button", "&Replace", 110, (185, 23, 50, 14), visible | win32con.WS_TABSTOP], ["Button", "Replace &All", 111, (185, 41, 50, 14), visible | win32con.WS_TABSTOP], ["Button", "Cancel", win32con.IDCANCEL, (185, 59, 50, 14), visible | win32con.WS_TABSTOP], ] return dt
Example #19
Source File: mdi_pychecker.py From ironpython2 with Apache License 2.0 | 5 votes |
def __init__(self, items): self.items = items self.newitems = [] style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT CS = win32con.WS_CHILD | win32con.WS_VISIBLE tmp = [ ["Pychecker Parameters", (0, 0, 205, 100), style, None, (8, "MS Sans Serif")], ] tmp.append([LISTBOX, '', 107, (7, 7, 150, 72), CS | win32con.LBS_MULTIPLESEL| win32con.LBS_STANDARD | win32con.LBS_HASSTRINGS | win32con.WS_TABSTOP | win32con.LBS_NOTIFY]) tmp.append([BUTTON,'OK', win32con.IDOK, (167, 7, 32, 12), CS | win32con.BS_DEFPUSHBUTTON| win32con.WS_TABSTOP]) tmp.append([BUTTON,'Cancel', win32con.IDCANCEL, (167,23, 32, 12), CS | win32con.BS_PUSHBUTTON| win32con.WS_TABSTOP]) tmp.append([STATIC,'New:', -1, (2, 83, 15, 12), CS]) tmp.append([EDIT, '', 108, (18, 83, 139, 12), CS | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL | win32con.WS_BORDER]) tmp.append([BUTTON,'Add', 109, (167,83, 32, 12), CS | win32con.BS_PUSHBUTTON| win32con.WS_TABSTOP]) dialog.Dialog.__init__(self, tmp) self.HookCommand(self.OnAddItem, 109) self.HookCommand(self.OnListDoubleClick, 107)
Example #20
Source File: ABuWinUtil.py From abu with GNU General Public License v3.0 | 5 votes |
def __init__(self, title, msg): message_map = { win32con.WM_DESTROY: self.on_destroy, } # Register the Window class. wc = WNDCLASS() hinst = wc.hInstance = GetModuleHandle(None) wc.lpszClassName = "PythonTaskbarDemo" wc.lpfnWndProc = message_map # could also specify a wndproc. class_atom = RegisterClass(wc) # Create the Window. style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU self.hwnd = CreateWindow(class_atom, "Taskbar Demo", style, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, hinst, None) UpdateWindow(self.hwnd) icon_path_name = os.path.abspath(os.path.join(sys.prefix, "pyc.ico")) icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE # noinspection PyBroadException try: hicon = LoadImage(hinst, icon_path_name, win32con.IMAGE_ICON, 0, 0, icon_flags) except: hicon = LoadIcon(0, win32con.IDI_APPLICATION) flags = NIF_ICON | NIF_MESSAGE | NIF_TIP nid = (self.hwnd, 0, flags, win32con.WM_USER + 20, hicon, "Balloon tooltip demo") Shell_NotifyIcon(NIM_ADD, nid) self.show_balloon(title, msg) time.sleep(20) DestroyWindow(self.hwnd)
Example #21
Source File: createwin.py From ironpython2 with Apache License 2.0 | 5 votes |
def MakeDlgTemplate(): style = (win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT) cs = (win32con.WS_CHILD | win32con.WS_VISIBLE) w = 64 h = 64 dlg = [["Red box", (0, 0, w, h), style, None, (8, "MS Sans Serif")], ] s = win32con.WS_TABSTOP | cs dlg.append([128, "Cancel", win32con.IDCANCEL, (7, h - 18, 50, 14), s | win32con.BS_PUSHBUTTON]) return dlg
Example #22
Source File: simpledialog.py From eavatar-me with Apache License 2.0 | 5 votes |
def MakeLoginDlgTemplate(title): style = (win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT) cs = win32con.WS_CHILD | win32con.WS_VISIBLE # Window frame and title dlg = [[title, (0, 0, 184, 40), style, None, (8, "MS Sans Serif")], ] # ID label and text box dlg.append([130, "User ID:", -1, (7, 9, 69, 9), cs | win32con.SS_LEFT]) s = cs | win32con.WS_TABSTOP | win32con.WS_BORDER dlg.append(['EDIT', None, win32ui.IDC_EDIT1, (50, 7, 60, 12), s]) # Password label and text box dlg.append([130, "Password:", -1, (7, 22, 69, 9), cs | win32con.SS_LEFT]) s = cs | win32con.WS_TABSTOP | win32con.WS_BORDER dlg.append(['EDIT', None, win32ui.IDC_EDIT2, (50, 20, 60, 12), s | win32con.ES_PASSWORD]) # OK/Cancel Buttons s = cs | win32con.WS_TABSTOP dlg.append([128, "OK", win32con.IDOK, (124, 5, 50, 14), s | win32con.BS_DEFPUSHBUTTON]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Cancel", win32con.IDCANCEL, (124, 20, 50, 14), s]) return dlg
Example #23
Source File: notice_dlg.py From eavatar-me with Apache License 2.0 | 5 votes |
def _GetDialogTemplate(self, dlgClassName): style = (win32con.WS_POPUP | win32con.DS_MODALFRAME | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT | win32con.WS_MINIMIZEBOX) cs = win32con.WS_CHILD | win32con.WS_VISIBLE # Window frame and title # font_name = 'COURIER' font_name = "MS Sans Serif" dlg = [[self.title, (0, 0, 230, 180), style, None, (11, font_name), None, dlgClassName], ] # ID label and text box dlg.append([130, 'Instructions:', -1, (5, 30, 220, 9), cs | win32con.SS_LEFT]) s = (cs | win32con.WS_TABSTOP | win32con.WS_BORDER | win32con.ES_MULTILINE) s |= (win32con.WS_VSCROLL | win32con.ES_AUTOVSCROLL | win32con.ES_WANTRETURN) dlg.append(['EDIT', None, IDC_SCRIPT, (5, 40, 220, 110), s]) # OK/Cancel Buttons # (x positions don't matter here) s = cs | win32con.WS_TABSTOP # dlg.append([128, "Clear", IDC_BUTTON_CLEAR, (5, 155, 50, 14), s]) dlg.append([128, "Close", IDC_BUTTON_CLOSE, (125, 155, 50, 14), s]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Submit", IDC_BUTTON_SUBMIT, (100, 155, 50, 14), s]) return dlg
Example #24
Source File: console.py From eavatar-me with Apache License 2.0 | 5 votes |
def _GetDialogTemplate(self, dlgClassName): style = (win32con.WS_POPUP | win32con.DS_MODALFRAME | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT | win32con.WS_MINIMIZEBOX) cs = win32con.WS_CHILD | win32con.WS_VISIBLE # Window frame and title # font_name = 'COURIER' font_name = "MS Sans Serif" dlg = [ [self.title, (0, 0, 230, 170), style, None, (11, font_name), None, dlgClassName], ] s = (cs | win32con.WS_TABSTOP | win32con.WS_BORDER | win32con.ES_MULTILINE) s |= (win32con.WS_VSCROLL | win32con.ES_AUTOVSCROLL | win32con.ES_READONLY | win32con.ES_WANTRETURN) dlg.append(['EDIT', None, IDC_MESSAGE, (5, 5, 220, 60), s]) dlg.append( [130, 'Instructions:', -1, (5, 70, 220, 9), cs | win32con.SS_LEFT]) s = (cs | win32con.WS_TABSTOP | win32con.WS_BORDER | win32con.ES_MULTILINE) s |= (win32con.WS_VSCROLL | win32con.ES_AUTOVSCROLL | win32con.ES_WANTRETURN) dlg.append(['EDIT', None, IDC_SCRIPT, (5, 80, 220, 70), s]) ss = cs | win32con.SS_ENDELLIPSIS dlg.append(['STATIC', None, IDC_LABEL_STATUS, (5, 155, 100, 14), ss]) # OK/Cancel Buttons # (x positions don't matter here) s = cs | win32con.WS_TABSTOP # dlg.append([128, "Clear", IDC_BUTTON_CLEAR, (5, 155, 50, 14), s]) # dlg.append([128, "Close", IDC_BUTTON_CLOSE, (125, 155, 50, 14), s]) s = win32con.BS_PUSHBUTTON | s dlg.append([128, "Submit", IDC_BUTTON_SUBMIT, (100, 155, 50, 14), s]) return dlg
Example #25
Source File: __init__.py From pyrexecd with MIT License | 5 votes |
def __init__(self, name): self.logger = logging.getLogger(name) self.hwnd = win32gui.CreateWindow( self.CLASS_ATOM, name, (win32con.WS_OVERLAPPED | win32con.WS_SYSMENU), 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, self.WNDCLASS.hInstance, None) self._create(self.hwnd, self) self.logger.info('create: name=%r' % name) return
Example #26
Source File: dialog_base.py From dragonfly with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, title, size, min_size=None, max_size=None, modal=False): classname = "dragonfly.BasicDialog" position = self._calculate_center(size) font = (8, "MS Sans Serif") style = ( win32con.WS_THICKFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT | win32con.WS_MINIMIZEBOX) DialogBase.__init__( self, classname=classname, title=title, initial_size=size, initial_position=position, min_size=min_size, max_size=max_size, style=style, font=font, modal=modal, ) template = self._dialog_build_template() message_map = self._dialog_build_message_map() self._dialog_create(template, message_map)
Example #27
Source File: status.py From ironpython2 with Apache License 2.0 | 5 votes |
def MakeProgressDlgTemplate(caption, staticText = ""): style = (win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT) cs = (win32con.WS_CHILD | win32con.WS_VISIBLE) w = 215 h = 36 # With button h = 40 dlg = [[caption, (0, 0, w, h), style, None, (8, "MS Sans Serif")], ] s = win32con.WS_TABSTOP | cs dlg.append([130, staticText, 1000, (7, 7, w-7, h-32), cs | win32con.SS_LEFT]) # dlg.append([128, # "Cancel", # win32con.IDCANCEL, # (w - 60, h - 18, 50, 14), s | win32con.BS_PUSHBUTTON]) return dlg
Example #28
Source File: regpy.py From ironpython2 with Apache License 2.0 | 5 votes |
def GetTemplate(self): "Return the template used to create this dialog" w = 152 # Dialog width h = 122 # Dialog height SS_STD = win32con.WS_CHILD | win32con.WS_VISIBLE FRAMEDLG_STD = win32con.WS_CAPTION | win32con.WS_SYSMENU style = FRAMEDLG_STD | win32con.WS_VISIBLE | win32con.DS_SETFONT | win32con.WS_MINIMIZEBOX template = [[self.caption, (0, 0, w, h), style, None, (8, 'Helv')], ] lvStyle = SS_STD | commctrl.LVS_EDITLABELS | commctrl.LVS_REPORT | commctrl.LVS_AUTOARRANGE | commctrl.LVS_ALIGNLEFT | win32con.WS_BORDER | win32con.WS_TABSTOP template.append(["SysListView32", "", self.IDC_LISTVIEW, (10, 10, 185, 100), lvStyle]) return template
Example #29
Source File: sgrepmdi.py From ironpython2 with Apache License 2.0 | 5 votes |
def __init__(self, items): self.items = items self.newitems = [] style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT CS = win32con.WS_CHILD | win32con.WS_VISIBLE tmp = [ ["Grep Parameters", (0, 0, 205, 100), style, None, (8, "MS Sans Serif")], ] tmp.append([LISTBOX, '', 107, (7, 7, 150, 72), CS | win32con.LBS_MULTIPLESEL| win32con.LBS_STANDARD | win32con.LBS_HASSTRINGS | win32con.WS_TABSTOP | win32con.LBS_NOTIFY]) tmp.append([BUTTON,'OK', win32con.IDOK, (167, 7, 32, 12), CS | win32con.BS_DEFPUSHBUTTON| win32con.WS_TABSTOP]) tmp.append([BUTTON,'Cancel', win32con.IDCANCEL, (167,23, 32, 12), CS | win32con.BS_PUSHBUTTON| win32con.WS_TABSTOP]) tmp.append([STATIC,'New:', -1, (2, 83, 15, 12), CS]) tmp.append([EDIT, '', 108, (18, 83, 139, 12), CS | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL | win32con.WS_BORDER]) tmp.append([BUTTON,'Add', 109, (167,83, 32, 12), CS | win32con.BS_PUSHBUTTON| win32con.WS_TABSTOP]) dialog.Dialog.__init__(self, tmp) self.HookCommand(self.OnAddItem, 109) self.HookCommand(self.OnListDoubleClick, 107)
Example #30
Source File: sgrepmdi.py From ironpython2 with Apache License 2.0 | 5 votes |
def __init__(self, dp, fp, gp, cs, r, v): style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT CS = win32con.WS_CHILD | win32con.WS_VISIBLE tmp = [ ["Grep", (0, 0, 210, 90), style, None, (8, "MS Sans Serif")], ] tmp.append([STATIC, "Grep For:", -1, (7, 7, 50, 9), CS ]) tmp.append([EDIT, gp, 101, (52, 7, 144, 11), CS | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL | win32con.WS_BORDER]) tmp.append([STATIC, "Directories:", -1, (7, 20, 50, 9), CS ]) tmp.append([EDIT, dp, 102, (52, 20, 128, 11), CS | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL | win32con.WS_BORDER]) tmp.append([BUTTON, '...', 110, (182,20, 16, 11), CS | win32con.BS_PUSHBUTTON | win32con.WS_TABSTOP]) tmp.append([STATIC, "File types:", -1, (7, 33, 50, 9), CS ]) tmp.append([EDIT, fp, 103, (52, 33, 128, 11), CS | win32con.WS_TABSTOP | win32con.ES_AUTOHSCROLL | win32con.WS_BORDER ]) tmp.append([BUTTON, '...', 111, (182,33, 16, 11), CS | win32con.BS_PUSHBUTTON | win32con.WS_TABSTOP]) tmp.append([BUTTON,'Case sensitive', 104, (7, 45, 72, 9), CS | win32con.BS_AUTOCHECKBOX | win32con.BS_LEFTTEXT| win32con.WS_TABSTOP]) tmp.append([BUTTON,'Subdirectories', 105, (7, 56, 72, 9), CS | win32con.BS_AUTOCHECKBOX | win32con.BS_LEFTTEXT| win32con.WS_TABSTOP]) tmp.append([BUTTON,'Verbose', 106, (7, 67, 72, 9), CS | win32con.BS_AUTOCHECKBOX | win32con.BS_LEFTTEXT| win32con.WS_TABSTOP]) tmp.append([BUTTON,'OK', win32con.IDOK, (166,53, 32, 12), CS | win32con.BS_DEFPUSHBUTTON| win32con.WS_TABSTOP]) tmp.append([BUTTON,'Cancel', win32con.IDCANCEL, (166,67, 32, 12), CS | win32con.BS_PUSHBUTTON| win32con.WS_TABSTOP]) dialog.Dialog.__init__(self, tmp) self.AddDDX(101,'greppattern') self.AddDDX(102,'dirpattern') self.AddDDX(103,'filpattern') self.AddDDX(104,'casesensitive') self.AddDDX(105,'recursive') self.AddDDX(106,'verbose') self._obj_.data['greppattern'] = gp self._obj_.data['dirpattern'] = dp self._obj_.data['filpattern'] = fp self._obj_.data['casesensitive'] = cs self._obj_.data['recursive'] = r self._obj_.data['verbose'] = v self.HookCommand(self.OnMoreDirectories, 110) self.HookCommand(self.OnMoreFiles, 111)