PythonWin IDE Documentation

Python Objects

  • Modules
  • Objects

    Overviews and other documentation

  • Keyboard Bindings
  • Source code folding in the editor
  • Source Safe Integration
  • Tabs and indentation in the editor
  • Pythonwin readme
  • Constants

    Help file built: 07/26/01


Overviews

  • Keyboard Bindings
  • Source code folding in the editor
  • Source Safe Integration
  • Tabs and indentation in the editor
  • Pythonwin readme


Keyboard Bindings

Pythonwin has a new, flexible keyboard binding mechanism. Bindings (and even code) can be defined in a configuration file, stored in the pywin directory.

Many bindings are still builtin to Python using Window's accelerators - see the Pythonwin menus for the specific keyboard shortcuts.

The default configuration file is named default.cfg. You can view this file with a text editor (eg, Pythonwin) This file has extensive comments, including how to create your own configuration based on the default. An example configuration which provides keyboard bindings similar to IDLE exists in IDLE.cfg, and this makes a good example of a custom configuration.

Please see default.cfg for a complete list, but the default bindings provided with Pythonwin are:

Common Keystrokes | Description
Alt+Q | Reformat the current paragraph/comment block. Note this does NOT reformat code correctly - use only within comment blocks!
Ctrl+W | Toggle view whitespace.
Alt+/ | Expand the word at the cursor. Eg, pressing "st<Alt+/>" will complete based on all words in the current file - eg, "string" would be likely to result assuming the code has an "import string" statement. Pressing the key again expands to the next match.
. | Auto expand the attribute. Eg, typing "string." will display a listbox with the contents of the string module.
Alt+I | Toggle focus to/from the interactive window.

Builtin Keystrokes | Keystrokes built into Scintilla
Ctrl+Keypad+Plus | Zoom-in for the current window (builtin to Scintilla)
Ctrl+Keypad+Minus | Zoom-out for the current window (builtin to Scintilla)
Ctrl+Backspace | Delete the word to the left of the cursor.
Ctrl+Z | Undo
Ctrl+Y | Redo
Ctrl+X | Cut
Ctrl+C | Copy
Ctrl+V | Paste
Ctrl+A | Select All
Ctrl+L | Cut the current line
Ctrl+Shift+L | Delete the corrent line
Ctrl+T | Transpose (swap) the current line with the line above
Ctrl+U | Convert the selection to lower case
Ctrl+Shift+U | Convert the selection to upper case

Editor Specific Keystrokes | Description
F2 | Move to the next bookmark.
Ctrl+F2 | Add or remove a bookmark on the current line.
Ctrl+G | Prompt for and goto a specific line number.
Alt+B | Adds a simple comment banner at the current location.
Alt+3 | Block comment the selected region.
Shift+Alt+3 | Uncomment the selected region.
Alt+4 | Uncomment the selected region (IDLE default keystroke)
Alt+5 | Tabify the selected region.
Alt+6 | Untabify the selected region.
BackSpace | Remove one indent to the left.
Ctrl+T | Toggle the use of tabs for the current file (after confirmation)
Alt+U | Change the indent width for the current file.
Enter | Insert a newline and indent.
Tab | Insert an indent, or perform a block indent if a selection exists.
Shift-Tab | Block dedent the selection
F6 | Toggle view when editor splitter is open.
Keypad-Plus | If the current line is a collapsed fold, expand it (see Folding )
Alt-Keypad-Plus | Expand all folds in the current file (see Folding )
Keypad-Minus | If the current line is an expanded fold, collapse it (see Folding )
Alt-Keypad-Minus | Collapse all folds in the current file. regardless of how deep the fold becomes. (see Folding )
Keypad-Multiply | Expand or collapse all top-level folds in the current file. No second level or deeper folds are changed. If the first fold in the file is collapsed, all top-level folds are opened. Otherwise, all top-level folds are collapsed (see Folding )

Debugger Keystrokes | Description
F9 | Toggle breakpoint
F5 | Run (ie, go)
Shift+F5 | Stop debugging
F11 | Single step into functions
F10 | Step over functions
Shift+F11 | Step out of the current function

Interactive Window Specific Keystrokes | Description
Ctrl+Up | Recall the previous command in the history list.
Ctrl+Down | Recall the next command in the history list.


Source Safe Integration

Note you will need to restart Pythonwin for this option to take effect.

Before using the VSS integration, you must create a "mssccprj.scc" file in the directory, or a parent directory, of the files you wish to integrate. There are no limits on how many of these files exist. This is the same name and format as VB uses for VSS integration - a Windows INI file.

This file must have a section [Python] with entry "Project=ProjectName". The project name is the name of the VSS project used to check the out the file. If the .scc file is in a parent directory, the correct relative VSS path is built - so if your file system matches your VSS structure, you only need a single .scc file in the VSS "root" directory.

For example, assuming you have the file c:\\src\\mssccprj.scc with the contents:
[Python]
Project=OurProject
-eof-
The file c:\\src\\source1.py will be checked out from project OurProject, c:\\src\\sub\\source2.py will be checked out from project OurProject\\sub, etc.


Source code folding in the editor

Thanks to Scintilla (http://www.scintilla.org), Pythonwin supports source code folding. Folding is the ability to collapse sections of your source-code into a single line, making it easier to navigate around large files. Any Python statement which introduces a new block can be folded either by clicking on the indicator in the folding margin (if enabled via the View->Options->Editor dialog), by selecting one of the folding keystrokes (see Keyboard Bindings, or by using View->Folding menu.)

All find/replace or 'goto linenumber' functions work correctly when code is folded - the code is simply unfolded if necessary before the relevant operation.

You may configure Pythonwin so that all files have their top-levels folded when opened. Only the first level folds are collapsed using this function, so expanding the top-level fold reveals the entire class/method that was folded. Alternatively, you can use the Keypad-Multiply key to toggle the first level folds for the entire file at any time.


Tabs and indentation in the editor

The use of tabs and the meanings of the tab defaults is not completely clear. Unfortunately, this is very hard to fix without losing the smart indentation (eg, when indenting lists or function parameters).
If the use of smart indentation has been disabled (the default is enabled) then the indentation should always follow your preferences, regardless of any existing indentation in the source.
Otherwise, the preferences for tab settings are only used when a new file is created. If smart-tabs are enabled and an existing file is opened, its first block is located, and the indentation it uses overrides the default. Thus, regardless of your preferences, if the first indent in the file is a tab, Pythonwin uses tabs for the entire file (and similarly, uses spaces if the first block is indented with spaces)
Things can appear to get wierd when editing a file with mixed tabs and spaces. Although mixed tabs and spaces in the same indent is evil, there are a number of source files that have certain classes/functions indented with spaces, and others that use tabs. The editor will not correctly adjust to the current block - whatever was used for the first block is used for the entire file.
Another common scenario where things go wrong is when pasting code into a new file. You create a new file (which sets the tabs to your defaults), then paste in a huge chunk of code that is indented differently. The editor is still using the defaults, which dont reflect the code that now exists in the buffer.
The "tab-timmy" shows up these problems very quickly, and you can quickly toggle the current tab settings by pressing Ctrl+T, or change the indent width by pressing Ctrl+U.


Pythonwin Readme.

Introduction

There are a few known problems (and probably lots of unknown ones!)

Pythonwin is a Windows only IDE and GUI framework for Python. It has an integrated debugger, and a rich Python editing environment.

Pythonwin is implemented as a 'wrapper' for the Microsoft Foundation Class library. With it, you can use MFC in an interactive, interpreted environment, or write full blown stand-alone applications tightly coupled with the Windows environment. Over 30 MFC objects are exposed, including Common Controls, Property Pages/Sheets, Control/Toolbars, Threads, etc.

Pythonwin could almost be considered a sample program for the MFC UI environment. This Python UI environment can be embedded in almost any other application - such as OLE clients/servers, Netscape plugins, as a Macro language etc.

Recent changes can be found at the end of this document.

Demos

There are many demos in the pywin\demos directory. To see a list of all the demos, run the program "pywin\demos\guidemo.py" from inside Pythonwin.

Documentation

Almost all win32ui methods are document in the Pythonwin Help file. This is available from the Help Menu in the Pythonwin enviroment.

Below is a list of external Pythonwin specific documentation.

  • There is separate documentation for the debugger
  • Check out documentation on the Pythonwin GUI environment
  • For a brief description of how to embed win32ui.pyd into your MFC application see the embedding win32ui documentation.
  • There is some general documentation on the MFC Architecture and more specifically, document and view architecture.
  • A Reference Manual of all available MFC functions etc. is released as a Windows Help file with the main Pythonwin release.
  • Check out the demos, and the source code to the Pythonwin environment.

Known Problems

  • Some of the configuration options (eg, "Docking Windows") do not take affect until you restart Pythonwin.
  • Under Windows 9x, any attempt to use Pythonwin features from an MS-DOS prompt seems to cause immediate death. This means that you can not use the Pythonwin debugger for programs running under Python.exe on Windows 9x. You should still be able to use the debugger normally from inside Pythonwin itself.
  • Pythonwin will occasionally crash upon exiting under Windows 9x. The crash is in "user.exe" (old 16 bit code) which makes debugging difficult. It does not happen on Windows NT, so I'm stumped on this one. If someone could even just narrow it down to exactly what code will cause the crash at exit I would really appreciate it.
  • Some of the menu items are always grey. This functionality is simply not yet implemented in Pythonwin.

Recent Changes

Fixed alot of the interactive window formatting problems. Pythonwin now always prints output as it receives it - this should stop Pythonwin from looking like it has completely hung when infact it is just waiting for some code to finish.

Support for Scintilla's indentation guides, that gives a nice indication of the block structure.

New, improved color editor, using the Scintilla control by Neil Hodgson (see http://hare.net.au/~neilh/ScintillaTide.html). The debugger now requires use of this editor.

Much better printing support from Roger Burnham. Pythonwin itself still can't print anything, but the framework can (meaning some kind soul could now add the support to Pythonwin :-)

DDE support is complete.

Reference helpfile is far more complete.

Lots of new methods from Kleanthis Kleanthous.

Better tool-tip and region support


Modules

  • win32ui
  • win32uiole


win32ui

Module win32ui

A module, encapsulating the Microsoft Foundation Classes.

Methods

AddToRecentFileList
Add a file name to the Recent File List.

ComparePath
Compares 2 paths.

CreateMDIFrame
Creates an MDI Frame window.

CreateMDIChild
Creates an MDI Child window.

CreateBitmap
Create a bitmap object.

CreateBitmapFromHandle
Creates a bitmap object from a HBITMAP.

CreateBrush
Creates a new GDI brush object. Returns a PyCBrush object.

CreateButton
Creates a button object. PyCButton::CreateWindow creates the actual control.

CreateColorDialog
Creates a color selection dialog box.

CreateControl
Creates an OLE control.

CreateControlBar
Creates an ControlBar

CreateCtrlView
Creates a control view object.

CreateDC
Creates a PyCDC object.

CreateDCFromHandle
Creates a PyCDC object from an integer handle.

CreateDialog
Creates a PyCDialog object.

CreateDialogBar
Creates a PyCDialogBar object.

CreateDialogIndirect
Creates a PyCDialog object from a template.

CreatePrintDialog
Creates a PyCPrintDialog object.

CreateDocTemplate
Create a PyCDocTemplate object.

CreateEdit
Creates an edit object. PyCEdit::CreateWindow creates the actual control.

CreateFileDialog
Creates a FileOpen common dialog.

CreateFontDialog
Creates a font selection dialog box.

CreateFormView
Creates a form view object.

CreateFrame
Creates a frame window.

CreateImageList
Creates an PyCImageList object.

CreateListCtrl
Creates a list control.

CreateListView
Creates a PyCListView object.

CreateTreeCtrl
Creates a tree control.

CreateTreeView
Creates a PyCTreeView object.

CreatePalette
Returns a HPALETTE

CreatePopupMenu
Creates a popup menu.

CreateMenu
Creates a menu

CreatePen
Creates a PyCPen object.

CreateProgressCtrl
Creates a progress bar object. PyCProgressCtrl::CreateWindow creates the actual control.

CreatePropertyPage
Creates a PyCPropertyPage object.

CreatePropertyPageIndirect
Creates a PyCPropertyPage object from a template.

CreatePropertySheet
Creates a PyCPropertySheet object

CreateRichEditCtrl
Creates a rich edit control.

CreateRichEditDocTemplate
Create a PyCRichEditDocTemplate object.

CreateRichEditView
Creates a PyCRichEditView object.

CreateSliderCtrl
Creates a slider control object. PyCSliderCtrl::CreateWindow creates the actual control.

CreateSplitter
Creates a splitter window.

CreateStatusBar
Creates a status bar object.

CreateStatusBarCtrl
Creates a new status bar control object. PyCStatusBarCtrl::CreateWindow creates the actual control.

CreateFont
Creates a PyCFont object.

CreateToolBar
Creates a toolbar object.

CreateToolBar
Creates a toolbar object.

CreateThread
Creates a PyCWinThread object.

CreateView
Creates a PyCView object.

CreateEditView
Creates an PyCEditView object.

CreateDebuggerThread
Starts a debugging thread.

CreateWindowFromHandle
Creates a PyCWnd from an integer containing a HWND

CreateWnd
Create a new unitialized PyCWnd object

DestroyDebuggerThread
Cleans up the debugger thread.

DoWaitCursor
Changes the cursor to/from a wait cursor.

Enable3dControls
Enables 3d controls for the application.

FindWindow
Searches for the specified top-level window

FindWindowEx
Searches for the specified top-level or child window

FullPath
Returns the full path name of the file.

GetActiveWindow
Retrieves the active window.

GetApp
Retrieves the application object.

GetAppName
Retrieves the name of the current application.

GetAppRegistryKey
Returns the registry key for the application.

GetBytes
Gets raw bytes from memory

GetCommandLine
Returns the command line for hte application.

GetDeviceCaps
Calls the API version of GetDeviceCaps. See also PyCDC::GetDeviceCaps

GetFileTitle
Given a file name, return its title

GetFocus
Retrieves the window with the focus.

GetForegroundWindow
Retrieves the foreground window.

GetHalftoneBrush
Returns a halftone brush.

GetInitialStateRequest
Returns the requested state that the application start in. This is the same as the parameter available to PyCWnd::ShowWindow

GetMainFrame
Returns a window object for the main application frame.

GetName
Returns the name of the current application.

GetProfileFileName
Returns the name of the INI file used by the application.

GetProfileVal
Returns a value from the applications INI file.

GetRecentFileList
Returns the recent file list.

GetResource
Gets a resource.

GetThread
Retrieves the current thread object.

GetType
Retrieves a Python Type object given its name

InitRichEdit
Initializes the rich edit framework.

InstallCallbackCaller
Installs a callback caller.

IsDebug
Returns a flag indicating if the current win32ui build is a DEBUG build.

IsWin32s
Determines if the application is running under Win32s.

IsObject
Determines if the passed object is a win32ui object.

LoadDialogResource
Loads a dialog resource, and returns a list detailing the objects.

LoadLibrary
Creates a PyDLL object.

LoadMenu
Loads a menu.

LoadStdProfileSettings
Loads standard application profile settings.

LoadString
Loads a string from a resource file.

MessageBox
Displays a message box.

OutputDebugString
Writes output to the Windows debugger.

EnableControlContainer
Call this function in your application object's InitInstance function to enable support for containment of OLE controls.

PrintTraceback
Prints a Traceback using the default Python traceback printer.

PumpWaitingMessages
Pumps all waiting messages to the application.

RegisterWndClass
Registers a window class

RemoveRecentFile
Removes the recent file at list index.

SetAppHelpPath
Sets the application help file path, i.e. the pApp->m_pszHelpFilePath member variable.

SetAppName
Sets the application name.

SetCurrentInstanceHandle
Sets the MFC variable afxCurrentInstanceHandle.

SetCurrentResourceHandle
Sets the MFC variable afxCurrentResourceHandle.

SetDialogBkColor
Sets the default background and text color for dialog boxes and message boxes within the application.

SetProfileFileName
Sets the INI file name used by the application.

SetRegistryKey
Causes application settings to be stored in the registry instead of INI files.

SetResource
Specifies the default DLL object for application resources.

SetStatusText
Sets the text in the status bar.

StartDebuggerPump
Starts the debugger message pump.

StopDebuggerPump
Stops the debugger message pump.

TranslateMessage
Calls ::TranslateMessage.

TranslateVirtualKey
Translates a virtual key.

WinHelp
Invokes the Window Help engine.

WriteProfileVal
Writes a value to the INI file.


win32ui.AddToRecentFileList

AddToRecentFileList(fileName)

Adds an entry to the applications Recent File List.

Parameters

fileName : string

The file name to be added to the list.

MFC References

CWinApp::AddToRecentFileList


win32ui.ComparePath

int = ComparePath(path1, path2 )

Compares 2 paths.

Parameters

path1 : string

The path name.

path2 : string

The path name.


win32ui.CreateBitmap

PyBitMap = CreateBitmap()

Creates a bitmap object.


win32ui.CreateBitmapFromHandle

PyBitMap = CreateBitmapFromHandle()

Creates a bitmap object from a HBITMAP.


win32ui.CreateBrush

PyCBrush = CreateBrush()

Creates a new brush object.

Alternative Parameters

style

The brush style.

color

The brush color.

hatch

The brush hatching.

Comments

If called with no arguments, an uninitialized brush is created.


win32ui.CreateButton

PyCButton = CreateButton()

Creates a button object. PyCButton::CreateWindow creates the actual control.


win32ui.CreateColorDialog

PyCColorDialog = CreateColorDialog(initColor, flags , parent )

Creates a color selection dialog box. self*/, PyObject *args )

Parameters

initColor=0 : int

The initial color.

flags=0 : int

The choose-color flags to use.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateControl

PyCWnd = CreateControl(classId, windowName , style , rect , parent , id , obPersist , bStorage , licKey )

Creates an OLE control.

Parameters

classId : string

The class ID for the window.

windowName : string

The title for the window.

style : int

The style for the control.

rect : (left, top, right, bottom)

The default position of the window.

parent : PyCWnd

The parent window

id : int

The child ID for the view

obPersist=None : object

Place holder for future support.

bStorage=FALSE : int

Not used.

licKey=None : string

The licence key for the control.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.CreateControlBar

PyCControlBar = CreateControlBar()

Creates a control bar object.


win32ui.CreateCtrlView

PyCCtrlView = CreateCtrlView(doc, className , style )

Creates a control view object.

Parameters

doc : PyCDocument

The document.

className : string

The class name of the control

style=0 : int

Additional style bits


win32ui.CreateDC

CreateDC()

Creates an uninitialised device context.


win32ui.CreateDCFromHandle

CreateDCFromHandle()

Creates a DC object from an integer handle.


win32ui.CreateDebuggerThread

CreateDebuggerThread()

Starts a debugging thread (ie, creates the "break" button).

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.


win32ui.CreateDialog

PyCDialog = CreateDialog(idRes, dll )

Creates a dialog object.

Parameters

idRes : int

The ID of the dialog resource to load.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.CreateDialogBar

PyCDialogBar = CreateDialogBar()

Creates a PyCDialogBar object.


win32ui.CreateDialogIndirect

PyCDialog = CreateDialogIndirect(obList)

Creates a dialog object from a template.

Parameters

obList : list

A list of [Dialog Header Tuple , Dialog Item Tuple , ...], which describe the dialog to be created.


win32ui.CreateDocTemplate

PyCDocTemplate = CreateDocTemplate(idRes)

Creates a document template object.

Parameters

idRes : int

The ID for resources for documents of this type.


win32ui.CreateEdit

PyCEdit = CreateEdit()

Creates an Edit object. PyCEdit::CreateWindow creates the actual control.


win32ui.CreateEditView

PyCEditView = CreateEditView(doc)

Creates a PyEditView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateFileDialog

PyCFileDialog = CreateFileDialog(bFileOpen, defExt , fileName , flags , filter , parent )

Creates a File Open/Save/etc Common Dialog. self*/, PyObject *args )

Parameters

bFileOpen : int

A flag indicating if the Dialog is a FileOpen or FileSave dialog.

defExt=None : string

The default file extension for saved files. If None, no extension is supplied.

fileName=None : string

The initial filename that appears in the filename edit box. If None, no filename initially appears.

flags=win32con.OFN_HIDEREADONLY|win32con.OFN_OVERWRITEPROMPT : int

The flags for the dialog. See the API documentation for full details.

filter=None : string

A series of string pairs that specify filters you can apply to the file. If you specify file filters, only selected files will appear in the Files list box. The first string in the string pair describes the filter; the second string indicates the file extension to use. Multiple extensions may be specified using ';' as the delimiter. The string ends with two '|' characters. May be None.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateFont

PyCFont = CreateFont(properties)

Creates a PyCFont object.

Parameters

properties : dict

A dictionary containing the font properties. Valid dictionary keys are:
name
size
weight
italic
underline

Comments

The code for the PyCFont was contributed by Dave Brennan (Last known address is brennan@hal.com, but I hear he is now at Microsoft) args contains a dict of font properties


win32ui.CreateFontDialog

PyCFontDialog = CreateFontDialog(font, flags , dcPrinter , parent )

Creates a font selection dialog box. self*/, PyObject *args )

Parameters

font=None : dict/tuple

A dictionary describing a LOGFONT, or a tuple describing a CHARFORMAT.

flags=win32con.CF_EFFECTS|win32con.CF_SCREENFONTS : int

The choose-font flags to use.

dcPrinter=None : PyCDC

Show fonts available for the specified device.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateFormView

PyCFormView = CreateFormView(doc, iTemplate )

Creates a form view object.

Parameters

doc : PyCDocument

The document to use with the view.

iTemplate : int

The ID of the dialog control.

Alternative Parameters

doc

The document to use with the view.

template

The ID of the dialog control.


win32ui.CreateFrame

PyFrameWnd = CreateFrame()

Creates a Frame window.

Return Value

The window object (not the OS window) created. An exception is raised if an error occurs.


win32ui.CreateImageList

int = CreateImageList(cx, cy , mask , initial , grow )

Creates an image list.

Parameters

cx : int

Dimension of each image, in pixels.

cy : int

Dimension of each image, in pixels.

mask : int

TRUE if the image contains a mask; otherwise FALSE.

initial : int

Number of images that the image list initially contains.

grow : int

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

Alternative Parameters

bitmapId

Resource ID of the bitmap to be associated with the image list.

cx

Dimension of each image, in pixels.

grow

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

crMask

Color used to generate a mask. Each pixel of this color in the specified bitmap is changed to black, and the corresponding bit in the mask is set to one.

Alternative Parameters

bitmapId

Resource ID of the bitmap to be associated with the image list.

cx

Dimension of each image, in pixels.

grow

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

crMask

Color used to generate a mask. Each pixel of this color in the specified bitmap is changed to black, and the corresponding bit in the mask is set to one.


win32ui.CreateListCtrl

PyCListCtrl = CreateListCtrl()

Creates a list control.


win32ui.CreateListView

PyCListView = CreateListView(doc)

Creates a PyCListView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateMDIChild

PyCMDIChildWnd = CreateMDIChild()

Creates an MDI Child window.

Return Value

The window object created. An exception is raised if an error occurs.


win32ui.CreateMDIFrame

PyCMDIFrameWnd = CreateMDIFrame()

Creates an MDI Frame window.

Comments

An MDI Frame Window is usually the main application window. Therefore there is uaually only one of these windows per application.

An application can only hae one main window. This method will fail if the application window already exists.

Return Value

The window object created. An exception is raised if an error occurs.


win32ui.CreateMenu

PyCMenu = CreateMenu()

Creates a menu object.


win32ui.CreatePalette

int = CreatePalette(lp)

Creates a HPALETTE

Parameters

lp : LOGPALETTE

The entries for the palette.


win32ui.CreatePen

PyCPen = CreatePen(style, width , color )

Creates a PyCPen object. static*/ PyObject *

Parameters

style : int

The pen style.

width : int

The pen width.

color : long

The pen color.


win32ui.CreatePopupMenu

PyCMenu = CreatePopupMenu()

Creates a popup menu object.


win32ui.CreatePrintDialog

PyCPrintDialog = CreatePrintDialog(idRes, bPrintSetupOnly , dwFlags , parent , dll )

Creates a print dialog object.

Parameters

idRes : int

The ID of the dialog resource to load.

bPrintSetupOnly=FALSE : int

Specifies whether the standard Windows Print dialog box or Print Setup dialog box is displayed.

dwFlags=PD_ALLPAGES|PD_USEDEVMODECOPIES|PD_NOPAGENUMS|PD_HIDEPRINTTOFILE|PD_NOSELECTION : int

One or more flags you can use to customize the settings of the dialog box, combined using the bitwise OR operator.

parent=None : PyCWnd

A pointer to the dialog box parent or owner window.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.CreateProgressCtrl

PyCProgressCtrl = CreateProgressCtrl()

Creates a progress control object. PyProgressCtrl::Create creates the actual control.


win32ui.CreatePropertyPage

PyCPropertyPage = CreatePropertyPage(resource, caption )

Creates a property page object.

Parameters

resource : int/string

The resource ID to use for the page.

caption=0 : int

The ID if the string resource to use for the caption.


win32ui.CreatePropertyPageIndirect

PyCPropertyPage = CreatePropertyPageIndirect(resourceList, caption )

Creates a property page object from a template.

Parameters

resourceList : list

A list of [Dialog Header Tuple , Dialog Item Tuple , ...], which describe the page to be created.

caption=0 : int

The ID if the string resource to use for the caption.


win32ui.CreatePropertySheet

PyCPropertySheet = CreatePropertySheet(caption, parent , select )

Creates a property sheet object.

Parameters

caption : string

The caption for the property sheet.

parent=None : PyCWnd

The parent window of the property sheet.

select=0 : int

The index of the first page to be selected.


win32ui.CreateRichEditCtrl

PyCRichEditCtrl = CreateRichEditCtrl()

Creates a rich edit control.

Comments

This method only creates the RichEdit object. To create the window, (ie, the control itself), call PyCRichEdit::CreateWindow


win32ui.CreateRichEditDocTemplate

PyCRichEditDocTemplate = CreateRichEditDocTemplate(idRes)

Creates a document template object.

Parameters

idRes : int

The ID for resources for documents of this type.


win32ui.CreateRichEditView

PyCRichEditView = CreateRichEditView(doc)

Creates a PyRichEditView object.

Parameters

doc=None : PyCDocument

The document to use with the view, or None for NULL.


win32ui.CreateSliderCtrl

PyCSliderCtrl = CreateSliderCtrl()

Creates a Slider control object.

Comments

The method PySliderCtrl::CreateWindow is used to create the actual control.


win32ui.CreateSplitter

PyCSplitterWnd = CreateSplitter()

Creates a splitter window object.


win32ui.CreateStatusBar

PyCStatusBar = CreateStatusBar(parent, style , windowId )

Creates a statusbar object.

Parameters

parent : PyCWnd

The parent window for the status bar.

style=afxres.WS_CHILD | afxres.WS_VISIBLE | afxres.CBRS_BOTTOM : int

The style for the status bar.

windowId=afxres.AFX_IDW_STATUS_BAR : int

The child window ID.

Comments

You must ensure no 2 status bars share the same ID.


win32ui.CreateStatusBarCtrl

PyCStatusBarCtrl = CreateStatusBarCtrl()

Creates a progress control object. PyStatusBarCtrl::Create creates the actual control.


win32ui.CreateThread

win32ui = CreateThread()

Creates a new PyCWinThread object


win32ui.CreateToolBar

PyCToolBar = CreateToolBar(parent, style , windowId )

Creates a toolbar object.

Parameters

parent : PyCWnd

The parent window for the toolbar.

style : int

The style for the toolbar.

windowId=afxres.AFX_IDW_TOOLBAR : int

The child window ID.

Comments

You must ensure no 2 toolbars share the same ID.


win32ui.CreateTreeCtrl

PyCTreeCtrl = CreateTreeCtrl()

Creates a tree control.


win32ui.CreateTreeView

PyCTreeView = CreateTreeView(doc)

Creates a PyCTreeView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateView

PyCScrollView = CreateView(doc)

Creates a generic view object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateWindowFromHandle

PyCWnd = CreateWindowFromHandle(hwnd)

Creates a PyCWnd from an integer containing a HWND

Parameters

hwnd : int

The window handle.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.CreateWnd

PyCWnd = CreateWnd()

Creates an unitialized PyCWnd


win32ui.DestroyDebuggerThread

DestroyDebuggerThread()

Cleans up the debugger thread. See win32ui::CreateDebuggerThread.


win32ui.DoWaitCursor

DoWaitCursor(code)

Dispay a wait cursor.

Parameters

code : int

If this parameter is 0, the original cursor is restored. If 1, a wait cursor appears. If -1, the wait cursor ends.


win32ui.Enable3dControls

int = Enable3dControls()

Enables 3d controls for the application.

Return Value

True if 3d controls could be enabled, false otherwise.


win32ui.EnableControlContainer

int = EnableControlContainer()

Enables support for containment of OLE controls.


win32ui.FindWindow

PyCWnd = FindWindow(className, windowName )

Searches for the specified top-level window

Parameters

className : string

The window class name to find, else None

windowName : string

The window name (ie, title) to find, else None

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.FindWindowEx

PyCWnd = FindWindowEx(parentWindow, childAfter , className , windowName )

Searches for the specified top-level or child window

Parameters

parentWindow : PyCWnd

The parent whose children will be searched. If None, the desktops window will be used.

childAfter : PyCWnd

The search begins with the next window in the Z order. If None, all children are searched.

className : string

The window class name to find, else None

windowName : string

The window name (ie, title) to find, else None

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.FullPath

string = FullPath(path)

Return the fully qualified path of a file name.

Parameters

path : string

The path name.


win32ui.GetActiveWindow

PyCWnd = GetActiveWindow()

Retrieves the active window.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetApp

PyCWinApp = GetApp()

Retrieves the application object.

Comments

There will only ever be one application object per application.


win32ui.GetAppName

int = GetAppName()

Returns the application name.


win32ui.GetAppRegistryKey

GetAppRegistryKey()

Returns the registry key for the application.


win32ui.GetBytes

string = GetBytes(address, size )

Gets raw bytes from memory

Parameters

address : int

The memory address

size : int

The size to get.

Comments

This method is useful to help decode unknown notify messages. You must be very carefull when using this method.

Return Value

The result is a string with a length of size.


win32ui.GetCommandLine

string = GetCommandLine()

Returns the application's command line.

Win32 API References

GetCommandLine


win32ui.GetDeviceCaps

int = GetDeviceCaps(hdc, index )

Calls the API version of GetDeviceCaps. See also PyCDC::GetDeviceCaps

Parameters

hdc : int

index : int


win32ui.GetFileTitle

string = GetFileTitle(fileName)

Given a file name, return its title

Parameters

fileName : string

The file name.


win32ui.GetFocus

PyCWnd = GetFocus()

Retrieves the window with the focus.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetForegroundWindow

PyCWnd = GetForegroundWindow()

Retrieves the foreground window.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetHalftoneBrush

PyCBrush = GetHalftoneBrush()

Creates a new halftone brush object.


win32ui.GetInitialStateRequest

int = GetInitialStateRequest()

Returns the requested state that the application start in. This is the same as the parameter available to PyCWnd::ShowWindow

Comments

In some cases, it may not be possible to start in the requested mode. An application may start in its default mode, then set its mode to match the value returned from this method.


win32ui.GetMainFrame

PyCWnd = GetMainFrame()

Returns a window object for the main application frame.


win32ui.GetName

string = GetName()

Returns the name of the current executable.


win32ui.GetProfileFileName

string = GetProfileFileName()

Returns the name of the INI file used by the application.


win32ui.GetProfileVal

int/string = GetProfileVal(section, entry , defValue )

Returns a value from the application's INI file.

Parameters

section : string

The section in the INI file to read from.

entry : string

The entry within the section in the INI file to read.

defValue : int/string

The default value. The type of this parameter determines the method's return type.


win32ui.GetRecentFileList

list = GetRecentFileList()

Returns the entries in the applications Recent File List.

Return Value

A list of strings containing the fully qualified file names.


win32ui.GetResource

PyDLL = GetResource()

Retrieve the object associated with the applications resources.


win32ui.GetThread

PyCWinApp = GetThread()

Retrieves the current thread object.


win32ui.GetType

object = GetType()

Retrieves a Python Type object given its name


win32ui.InitRichEdit

string = InitRichEdit()

Initializes the rich edit framework.


win32ui.InstallCallBackCaller

object = InstallCallBackCaller()

Install a Python method which will dispatch all callbacks into Python.

Return Value

The previous callback caller.


win32ui.IsDebug

int = IsDebug()

Returns a flag indicating if the current win32ui build is a DEBUG build.

Comments

This should not normally be of relevance to the Python programmer. However, under certain circumstances Python code may wish to detect this.


win32ui.IsObject

int = IsObject(o)

Determines if the passed object is a win32ui object.

Parameters

o : object

The object to check.


win32ui.IsWin32s

int = IsWin32s()

Determines if the application is running under Win32s.


win32ui.LoadDialogResource

list = LoadDialogResource(idRes, dll )

Loads a dialog resource, and returns a list detailing the objects.

Parameters

idRes : int

The ID of the dialog resource to load.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.LoadLibrary

PyDLL = LoadLibrary(fileName)

Creates a DLL object, and loads a Windows DLL into the object.

Parameters

fileName : string

The name of the DLL file to load.


win32ui.LoadMenu

PyCMenu = LoadMenu(id, dll )

Creates and loads a menu resource from a DLL.

Parameters

id : int

The Id of the menu to load.

dll=None : PyDLL

The DLL to load from.


win32ui.LoadStdProfileSettings

LoadStdProfileSettings(maxFiles)

Loads MFC standard settings from the applications INI file. This includes the Recent File List, etc.

Parameters

maxFiles=_AFX_MRU_COUNT : int

The maximum number of files to maintain on the Recently Used File list.

Comments

This function can only be called once in an applications lifetime, else an exception is raised.


win32ui.LoadString

PyUnicode = LoadString(stringId)

Loads a string from a resource file.

Parameters

stringId : int

The ID of the string to load.


win32ui.MessageBox

int = MessageBox(message, title , style )

Display a message box.

Parameters

message : string

The message to be displayed in the message box.

title=None : string/None

The title for the message box. If None, the applications title will be used.

style=win32con.MB_OK : int

The style of the message box.

Return Value

An integer identifying the button pressed to dismiss the dialog.


win32ui.OutputDebugString

OutputDebugString(msg)

Sends a string to the Windows debugging device.

Parameters

msg : string

The string to write.


win32ui.PrintTraceback

PrintTraceback(tb, output)

Prints a traceback using the internal Python mechanism.

Parameters

tb : object

The traceback to print.

output : object

The object to write the traceback to.


win32ui.PumpWaitingMessages

int = PumpWaitingMessages(firstMessage, lastMessage )

Recursively start a new message dispatching loop while any message remain in the queue.

Parameters

firstMessage=WM_PAINT : int

The lowest message ID to retrieve

lastMessage=WM_PAINT : int

The highest message ID to retrieve

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.

Return Value

The result is 1 if a WM_QUIT message was processed, otherwise 0.


win32ui.RegisterWndClass

string = RegisterWndClass(style, hCursor , hBrush , hIcon )

Registers a window class

Parameters

style : int

Specifies the Windows class style or combination of styles

hCursor=0 : int

hBrush=0 : int

hIcon=0 : int

Comments

The Microsoft Foundation Class Library automatically registers several standard window classes for you. Call this function if you want to register your own window classes.


win32ui.RemoveRecentFile

RemoveRecentFile(index)

Removes the entry in the applications Recent File List at index.

Parameters

index=0 : int

Zero-based index of the file to be removed from the MRU (most recently used) file list.


win32ui.SetAppHelpPath

int = SetAppHelpPath()

Set the pApp->m_pszHelpFilePath variable.


win32ui.SetAppName

int = SetAppName(appName)

Sets the name of the application.

Parameters

appName : string

The new name for the application. This is used for the default registry key, and the title bar of the application.

MFC References

CWinApp::m_pszAppName


win32ui.SetCurrentInstanceHandle

int = SetCurrentInstanceHandle(newVal)

Sets the MFC variable afxCurrentInstanceHandle

Parameters

newVal : int

The new value for afxCurrentInstanceHandle

Return Value

The result is the previous value of afxCurrentInstanceHandle


win32ui.SetCurrentResourceHandle

int = SetCurrentResourceHandle(newVal)

Sets the MFC variable afxCurrentResourceHandle

Parameters

newVal : int

The new value for afxCurrentResourceHandle

Return Value

The result is the previous value of afxCurrentResourceHandle


win32ui.SetDialogBkColor

int = SetDialogBkColor(clrCtlBk, clrCtlText )

Sets the default background and text color for dialog boxes and message boxes within the application.

Parameters

clrCtlBk=win32ui.RGB(192, 192, 192) : int

The color for the controls background.

clrCtlText=win32ui.RGB(0, 0, 0) : int

The color for the controls text.

MFC References

CWinApp::SetDialogBkColor


win32ui.SetProfileFilename

SetProfileFilename(filename)

Sets the name of the INI file used by the application.

Parameters

filename : string

The name of the ini file.


win32ui.SetRegistryKey

SetRegistryKey(key)

Causes application settings to be stored in the registry instead of INI files.

Parameters

key : string

A string containing the name of the key.

Comments

Causes application settings to be stored in the registry instead of INI files. This function sets m_pszRegistryKey, which is then used by the GetProfileXXX and WriteProfileXXX member functions of CWinApp. If this function has been called, the list of most recently-used (MRU) files is also stored in the registry. The registry key is usually the name of a company. It is stored in a key of the following form: HKEY_CURRENT_USER\\Software\\<company name>\\<application name>\\<section name>\\<value name>.


win32ui.SetResource

PyDLL = SetResource(dll)

Specifies the default DLL object for application resources.

Parameters

dll : PyDll

The dll object to use for default resources.

Return Value

The previous default DLL object.


win32ui.SetStatusText

SetStatusText(msg, bForce)

Sets the text in the status bar of the application.

Parameters

msg : string

The message to write to the status bar.

bForce=0 : int

A flag indicating if the message should be forced to the status bar, or written in idle time.


win32ui.StartDebuggerPump

StartDebuggerPump()

Starts a recursive message loop, waiting for an application close message.

Comments

This function is used by the debugger. It allows the debugger to interact with the user, even while the Python code is stopped. As the Python code may be responding to a Windows Event, this function works around the inherent message queue problems.


win32ui.StopDebuggerPump

StopDebuggerPump()

Stops the debugger pump. See win32ui::StartDebuggerPump.


win32ui.TranslateMessage

int = TranslateMessage()

Calls the API version of TranslateMessage.


win32ui.TranslateVirtualKey

string/None = TranslateVirtualKey(vk)

Parameters

vk : int

The key to translate


win32ui.WinHelp

WinHelp(cmd, data)

Invokes the Windows Help system.

Parameters

cmd=win32con.HELP_CONTEXT : int

The type of help. See the api for full details.

data : int/string

Additional data specific to the help call.


win32ui.WriteProfileVal

WriteProfileVal(section, entry, value)

Writes a value to the application's INI file.

Parameters

section : string

The section in the INI file to write to.

entry : string

The entry within the section in the INI file to write to.

value : int/string

The value to write. The type of this parameter determines the method's return type.


win32uiole

Module win32uiole

A module, encapsulating the Microsoft Foundation Classes OLE functionality.

Methods

CreateInsertDialog
Creates a InsertObject dialog.

CreateOleClientItem
Creates a PyCOleClientItem object.

CreateOleDocument
Creates a PyCOleDocument object.

DaoGetEngine

GetIDispatchForWindow
Gets an OCX IDispatch pointer, if the window has one!

OleGetUserCtrl
Retrieves the current user-control flag.

OleSetUserCtrl
Sets the current user-control flag.


win32uiole.CreateInsertDialog

PyCOleInsertDialog = CreateInsertDialog()

Creates a InsertObject dialog. self*/, PyObject *args )


win32uiole.CreateOleClientItem

PyCOleClientItem = CreateOleClientItem()

Creates a PyCOleClientItem object.


win32uiole.CreateOleDocument

PyCOleDocument = CreateOleDocument(template, fileName )

Creates an OLE document.

Parameters

template : PyCDocTemplate

The template to be attached to this document.

fileName=None : string

The filename for the document.


win32uiole.DaoGetEngine

PyIDispatch = DaoGetEngine()


win32uiole.GetIDispatchForWindow

PyIDispatch = GetIDispatchForWindow()

Gets an OCX IDispatch pointer, if the window has one!


win32uiole.OleGetUserCtrl

int = OleGetUserCtrl()

Returns the application name.


win32uiole.OleSetUserCtrl

int = OleSetUserCtrl(bUserCtrl)

Sets or clears the user control flag.

Parameters

bUserCtrl : int

Specifies whether the user-control flag is to be set or cleared.


Objects

  • CHARFORMAT
  • CREATESTRUCT
  • LV_COLUMN
  • LV_ITEM
  • PARAFORMAT
  • PyAssocCObject
  • PyAssocObject
  • PyBitmap
  • PyCBrush
  • PyCButton
  • PyCCmdTarget
  • PyCCmdUI
  • PyCColorDialog
  • PyCComboBox
  • PyCCommonDialog
  • PyCControl
  • PyCControlBar
  • PyCCtrlView
  • PyCDC
  • PyCDialog
  • PyCDialogBar
  • PyCDockContext
  • PyCDocTemplate
  • PyCDocument
  • PyCEdit
  • PyCEditView
  • PyCFileDialog
  • PyCFont
  • PyCFontDialog
  • PyCFormView
  • PyCFrameWnd
  • PyCGdiObject
  • PyCImageList
  • PyCListBox
  • PyCListCtrl
  • PyCListView
  • PyCMDIChildWnd
  • PyCMDIFrameWnd
  • PyCMenu
  • PyCOleClientItem
  • PyCOleDialog
  • PyCOleDocument
  • PyCOleInsertDialog
  • PyCPrintDialog
  • PyCPrintInfo
  • PyCProgressCtrl
  • PyCPropertyPage
  • PyCPropertySheet
  • PyCRect
  • PyCRgn
  • PyCRichEditCtrl
  • PyCRichEditDoc
  • PyCRichEditDocTemplate
  • PyCRichEditView
  • PyCScrollView
  • PyCSliderCtrl
  • PyCSpinButtonCtrl
  • PyCSplitterWnd
  • PyCStatusBar
  • PyCStatusBarCtrl
  • PyCTabCtrl
  • PyCToolBar
  • PyCToolBarCtrl
  • PyCToolTipCtrl
  • PyCTreeCtrl
  • PyCTreeView
  • PyCView
  • PyCWinApp
  • PyCWinThread
  • PyCWnd
  • PyDLL
  • TV_ITEM


CHARFORMAT

CHARFORMAT Object

Describes a CHARFORMAT tuple

Items

[0] int : mask

The mask to use. Bits in this mask indicate which of the following parameter are interpreted. Must be a combination the win32con.CFM_* constants.

[1] int : effects

The effects to use. Must be a combination the win32con.CFE_* constants.

[2] int : yHeight

The y height.

[3] int : yOffset

Character offset from the baseline. If this member is positive, the character is a superscript; if it is negative, the character is a subscript.

[4] int : colorText

The color to use.

[5] int : bCharSet

The charset. See the LOGFONT structure for details.

[6] int : bPitchAndFamily

The charset. See the LOGFONT structure for details.

[7] string : faceName

The font name.

Comments

Executing d=win32ui.CreateFontDialog(); d.DoModal(); print d.GetCharFormat() will print a valid CHARFORMAT tuple.


CREATESTRUCT

CREATESTRUCT Object

A representation of a Windows CREATESTRUCT structure.

Parameters

createParams : int

hInstance : int

hMenu : int

hwndParent : int

cy, cx, y, x : (int, int, int, int)

style : int

lpszName : int

A string cast to a long.

lpszClass : int

A string cast to a long!?

dwExStyle : int

Comments

Note that the strings are passed as longs, which are there address in memory. This is due to the internal mechanics of passing this structure around.


LV_COLUMN

LV_COLUMN Object

A tuple that describes a Win32 LV_COLUMN tuple. Used by the PyCListCtrl object. A tuple of 4 items, being fmt, cx, pszText, iSubItem

Items

[0] int : fmt

Alignment of the column header and the subitem text in the column.

[1] int : cx

Width of the column.

[2] string : text

Column header text.

[3] int : subItem

Index of subitem associated with the column.
When passed to Python, will always be a tuple of size 4, and items may be None if not available.
When passed from Python, the tuple may be any length up to 4, and any item may be None.


LV_ITEM

LV_ITEM Object

Describes an LV_ITEM tuple, used by the PyCListCtrl object.

Items

[0] int : item

The item number.

[1] int : subItem

The sub-item number.

[2] int : state

The items state.

[3] int : stateMask

A mask indicating which of the state bits are valid..

[4] string : text

The text for the item

[5] int : iImage

The image offset for the item

[6] int : userObject

Any integer to be associated with the item.

Comments

When passed to Python, will always be a tuple of size 7, and items may be None if not available.
When passed from Python, the tuple must be at least 2 items long, and any item may be None.
userob is any Python object at all, but no reference count is kept, so you must ensure the object remains referenced throught the lists life.


PARAFORMAT

PARAFORMAT Object

Describes a PARAFORMAT tuple

Items

[0] int : mask

The mask to use. Bits in this mask indicate which of the following parameters are interpreted. Must be a combination the win32con.PFM_* constants.

[1] int : numbering

The numbering style to use.

[2] int : yHeight

Reserved

[3] int : dxStartIndent

Indentation of the first line.

[4] int : dxRightIndent

Indentation from the right.

[5] int : dxOffset

The indent of second and subsequent lines.

[6] int : wAlignment

The alignment of the paragraph.

[7] [int ,...] : tabStops

The tabstops to use.


PyAssocCObject

PyAssocCObject Object

An internal class.


PyAssocObject

PyAssocObject Object

An internal class.

Methods

AttachObject
Attaches a Python object for lookup of "virtual" functions.


PyAssocObject.AttachObject

AttachObject()

Attaches a Python object for lookup of "virtual" functions.


PyBitmap

PyBitmap Object

A bitmap class, derived from a PyCGdiObject.

Methods

CreateCompatibleBitmap
Creates a bitmap compatible with the specified device context.

GetSize
Gets the size of the bitmap object, in pixels.

GetHandle
Returns the HBITMAP for a bitmap.

LoadBitmap
Loads a bitmap from a DLL object.

LoadBitmapFile
Loads a bitmap from a file object.

LoadPPMFile
Loads a bitmap from a file object containing a PPM format bitmap.

Paint
Paints a bitmap to a windows DC.

GetInfo
Returns the BITMAP structure info.

GetBitmapBits
Returns the bitmap bits.

SaveBitmapFile
Saves a bitmap to a file. sentinel


PyBitmap.CreateCompatibleBitmap

CreateCompatibleBitmap(dc, width, height)

Creates a bitmap compatible with the specified device context.

Parameters

dc : PyCDC

Specifies the device context.

width : int

The width (in bits) of the bitmap

height : int

The height (in bits) of the bitmap.


PyBitmap.GetBitmapBits

tuple = GetBitmapBits()

Returns the bitmap bits.


PyBitmap.GetHandle

int = GetHandle()

Returns the HBITMAP for a bitmap object


PyBitmap.GetInfo

dict = GetInfo()

Returns the BITMAP structure info

Return Value

A dictionary of integers, keyed by the following strings:
bmType
bmWidth
bmHeight
bmWidthBytes
bmPlanes
bmBitsPixel


PyBitmap.GetSize

(cx,cy) = GetSize()

Returns the size of the bitmap object.


PyBitmap.LoadBitmap

LoadBitmap(idRes, obDLL)

Loads a bitmap from a DLL object.

Parameters

idRes : int

The resource ID of the bitmap

obDLL=None : PyDLL

The DLL object to load from.


PyBitmap.LoadBitmapFile

LoadBitmapFile(fileObject)

Loads a bitmap (.BMP) format from a file object.

Parameters

fileObject : file[.read]

The file object to load the .BMP format file from.


PyBitmap.LoadPPMFile

LoadPPMFile(fileObject, cols, rows)

Loads a bitmap in Portable Pix Map (PPM) format from a file object.

Parameters

fileObject : file[.read]

The file object to load the PPM format file from.

cols : int

The number of columns in the bitmap.

rows : int

The number of rows in the bitmap.


PyBitmap.Paint

Paint(dcObject, rectDest, rectSrc)

Paint a bitmap.

Parameters

dcObject : PyCDC

The DC object to paint the bitmap to.

rectDest=(0,0,0,0) : (left,top,right,bottom)

The destination rectangle to paint to.

rectSrc=(0,0,0,0) : (left,top,right,bottom)

The source rectangle to paint from.


PyBitmap.SaveBitmapFile

None = SaveBitmapFile(dcObject, Filename )

Saves a bitmap to a file.

Parameters

dcObject : PyCDC

The DC object that has rendered the bitmap.

Filename : string

The file to save the bitmap to


PyCBrush

PyCBrush Object

An object encapsulating an MFC PyCBrush class.

Methods

CreateSolidBrush
Initializes a brush with a specified solid color.

GetSafeHandle
Retrieves the HBRUSH for the brush as an integer


PyCBrush.CreateSolidBrush

CreateSolidBrush()

Initializes a brush with a specified solid color.


PyCBrush.GetSafeHandle

int = GetSafeHandle()

Retrieves the HBRUSH for the brush as an integer


PyCButton

PyCButton Object

A windows button. Encapsulates an MFC CButton class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new button object.

GetBitmap
Retrieves the bitmap associated with the button.

SetBitmap
Sets the bitmap of a button.

GetCheck
Retrieves the check state of a radio button or check box.

SetCheck
Sets the check state of a radio button or check box.

GetState
Retrieves the state of a radio button or check box.

SetState
Sets the state of a radio button or check box.

GetButtonStyle
Retrieves the style of a radio button or check box.

SetButtonStyle
Sets the state of a radio button or check box.


PyCButton.CreateWindow

CreateWindow(caption, style, rect, parent, id)

Creates the window for a new button object.

Parameters

caption : string

The caption (text) for the button.

style : int

The style for the button. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the button.

parent : PyCWnd

The parent window of the button. Usually a PyCDialog.

id : int

The buttons control ID.


PyCButton.GetBitmap

int = GetBitmap()

Get the button's bitmap


PyCButton.GetButtonStyle

int = GetButtonStyle()

Gets the style of the button.


PyCButton.GetCheck

int = GetCheck()

Retrieves the check state of a radio button or check box.


PyCButton.GetState

int = GetState()

Returns the state of the button.


PyCButton.SetBitmap

int = SetBitmap(hBitmap)

Set the button's bitmap

Parameters

hBitmap=1 : int

Handle of the new bitmap


PyCButton.SetButtonStyle

int = SetButtonStyle(style, bRedraw )

Sets the style of the button.

Parameters

style : int

The new style for the button.

bRedraw=1 : int

Should the button be redrawn?


PyCButton.SetCheck

SetCheck(idCheck)

Sets or resets the state of a radio button or check box.

Parameters

idCheck : int

The ID of the button.


PyCButton.SetState

int = SetState(bHighlight)

Sets the state of the button.

Parameters

bHighlight : int

The new state for the button.

Comments

Highlighting affects the exterior of a button control. It has no effect on the check state of a radio button or check box.


PyCCmdTarget

PyCCmdTarget Object

An abstract command target class. Encapsulates an MFC CCmdTarget class

Methods

BeginWaitCursor
Displays the cursor as an hourglass.

EndWaitCursor
End a wait cursor.

HookCommand
Hook a command handler.

HookCommandUpdate
Hook a windows command update handler.

HookOleEvent
Hooks an OLE event.

HookNotify
Hook a control notification handler.

RestoreWaitCursor
Restores the appropriate hourglass cursor after the system cursor has changed.


PyCCmdTarget.BeginWaitCursor

BeginWaitCursor()

Displays the cursor as an hourglass. This can be used when you expect a command to take a noticeable time to execute (eg, when a document loads or saves itself to a file.).
The actions of BeginWaitCursor are not always effective outside of a single message handler as other actions, such as OnSetCursor handling, could change the cursor.
Call EndWaitCursor to restore the previous cursor.

MFC References

CWnd::BeginWaitCursor


PyCCmdTarget.EndWaitCursor

EndWaitCursor()

Ends a wait cursor. Should only be called after PyCWnd::BeginWaitCursor .


PyCCmdTarget.HookCommand

object = HookCommand(obHandler, id )

Hook a windows command handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled, or zero to handle all command messages.

Comments

obHandler will be called as the application receives command notification messages with the specified ID. Command notification messages are usually sent in response to menu or toolbar commands.
When updating a user interface element, Pythonwin will first check if a handler has been installed via PyCCmdTarget::HookCommandUpdate. If so, this alone determines the state of the interface object. If no Update handler exists, PythonWin will automatically enable a menu/toolbar item if a command handler exists The handler will be called with 2 arguments
* The command id being handled.
* The command notification code.
If the handler returns TRUE, then the command will be passed on to the default handler, otherwise the message will be consumed.
This method is best suited to handling messages from user interface elements, such as menus, toolbars, etc. To handle notification messages from a control, you should use PyCCmdTarget::HookNotify

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookCommandUpdate

object = HookCommandUpdate(obHandler, id )

Hook a windows command update handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled.

Comments

The handler object passed will be called as the application updates user interface elements with the specified ID. See PyCCmdTarget::HookCommand for a description of the rules used to determine command routing and updating.

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookNotify

object = HookNotify(obHandler, id )

Hook a windows command handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled, or zero to handle all command messages.

Comments

obHandler will be called as the application receives control notification messages. These may also be handled via PyCCmdTarget::HookCommand, but this method is specific to control notifications, and therefore provides more information.

The handler will be called with 2 arguments
A tuple describing standard notification information.
A tuple describing extra notification params, or an integer containing the address of the first byte of the extended information.
If the handler returns TRUE, then the command will be passed on to the default handler, otherwise the message will be consumed.

Certain notification codes are recognised internally, and these are converted to a Python tuple. If the extra information is not recognised, the address is passed. These addresses could be extracted using win32ui::GetBytes and the struct module, or using Sam Rushing's calldll/dynwin module. (It would be possible to extend Pythonwin so a program can install certain knowledge about handlers, but this has not been implemented.)

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookOleEvent

object = HookOleEvent()

Hook an OLE Event.

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.RestoreWaitCursor

RestoreWaitCursor()

Restores the appropriate hourglass cursor after the system cursor has changed.

Comments

Call this function to restore the appropriate hourglass cursor after the system cursor has changed (for example, after a message box has opened and then closed while in the middle of a lengthy operation).


PyCCmdUI

PyCCmdUI Object

A class for manipulating user-interface elements. Encapsulates an MFC CCmdUI class

Methods

Enable
Enables or disables the user-interface item for this command.

SetCheck
Sets the check state of the user-interface item for this command.

SetRadio
Like the SetCheck member function, but operates on radio groups.

SetText
Sets the text for the user-interface item for this command.

ContinueRouting
Tells the command-routing mechanism to continue routing the current message down the chain of handlers.

Properties

int m_nIndex

int m_nID


PyCCmdUI.ContinueRouting

ContinueRouting()

Tells the command-routing mechanism to continue routing the current message down the chain of handlers.


PyCCmdUI.Enable

Enable(bEnable)

Enables or disables the user-interface item for this command.

Parameters

bEnable=1 : int

TRUE if the item should be enabled, false otherwise.


PyCCmdUI.SetCheck

SetCheck(state)

Sets the check state of the user-interface item for this command.

Parameters

state=1 : int

0 for unchecked, 1 for checked, or 2 for indeterminate.


PyCCmdUI.SetRadio

SetRadio(bOn)

Like the SetCheck member function, but operates on radio groups.

Parameters

bOn=1 : int

TRUE if the item should be enabled, false otherwise.


PyCCmdUI.SetText

SetText(text)

Sets the text for the user-interface item for this command.

Parameters

text : string

The text for the interface element.


PyCColorDialog

PyCColorDialog Object

A class which encapsulates an MFC CColorDialog object. Derived from a PyCDialog object.

Methods

GetColor
Determines the selected color.

DoModal
Displays a dialog and allows the user to make a selection.

GetSavedCustomColors
Returns the saved custom colors.

SetCurrentColor
Sets the currently selected color.

SetCustomColors
Sets one or more custom colors

GetCustomColors
Gets the currently defined custom colors.


PyCColorDialog.DoModal

int = DoModal()

Displays a dialog and allows the user to make a selection.

MFC References

CColorDialog::DoModal


PyCColorDialog.GetColor

int = GetColor()

Determines the selected color.

MFC References

CColorDialog::GetColor


PyCColorDialog.GetCustomColors

(int,...) = GetCustomColors()

Gets the 16 currently defined custom colors


PyCColorDialog.GetSavedCustomColors

int = GetSavedCustomColors()

Returns the saved custom colors.

MFC References

CColorDialog::GetSavedCustomColors


PyCColorDialog.SetCurrentColor

SetCurrentColor(color)

Sets the currently selected color.

Parameters

color : int

The color to set.

MFC References

CColorDialog::SetCurrentColor


PyCColorDialog.SetCustomColors

SetCustomColors()

Sets one or more custom colors


PyCComboBox

PyCComboBox Object

A windows combo control. Encapsulates an MFC CComboBox class. Derived from a PyCControl object.

Methods

AddString
Add a string to the listbox portion of a combo box.

DeleteString
Delete a string to the listbox portion of a combo box.

Dir
Fill the listbox portion of a combo with a file specification.

GetCount
Get the count of items in the listbox portion of a combo box.

GetCurSel
Get the current selection in the listbox portion of a combo box.

GetEditSel
Gets the edit control selection from a combo box.

GetExtendedUI
Gets the ExtendedUI flag for a combo box.

GetItemData
Retrieves the application-specific object associated with a combobox entry

GetItemValue
Retrieves the application-specific value associated with a combobox entry

GetLBText
Gets the text from the edit control in a combo box.

GetLBTextLen
Gets the length of the text in the edit control of a combo box.

InsertString
Inserts a string into the listbox portion of a combo box.

LimitText
Limit the length of text in the edit control portion of a combo box.

ResetContent
Remove all items from the listbox portion of a combo box.

SelectString
Select a string in the listbox portion of a combo box.

SetCurSel
Sets the current selection in the listbox portion of a combo box.

SetEditSel
Sets the current selection in the edit control portion of a combo box.

SetExtendedUI
Sets the ExtendedUI flag for a combo box.

SetItemData
Sets the application-specific object associated with a combobox entry

SetItemValue
Sets the application-specific value associated with a combobox entry

ShowDropDown
Shows the listbox portion of a combo box.


PyCComboBox.AddString

int = AddString(object)

Adds a string to a combobox.

Parameters

object : any

Any object. If not a string, __str__, __repr__ or a default repr() will be used

MFC References

CComboBox::AddString

Return Value

The zero based index of the new string.


PyCComboBox.DeleteString

int = DeleteString(pos)

Deletes an item from a combobox.

Parameters

pos : int

The zero based index of the item to delete.

MFC References

CComboBox::DeleteString

Return Value

The count of the items remaining in the list.


PyCComboBox.Dir

int = Dir(attr, wild )

Fills the list portion of a combobox with a directory listing.

Parameters

attr : int

The attributes of the files to locate

wild : string

A file specification string - eg, *.*

MFC References

CComboBox::Dir

Return Value

The index of the last file name added to the list.


PyCComboBox.GetCount

int = GetCount()

Returns the count of items in the combobox.

MFC References

CListBox::GetCount

Return Value

Returns the number of items currently in the combobox.


PyCComboBox.GetCurSel

int = GetCurSel()

Returns the index of the currently selected item.

Comments

Should not be called for a multiple selection listbox.

MFC References

CComboBox::GetCurSel


PyCComboBox.GetEditSel

int = GetEditSel()

Returns the selection of the edit control portion of a combo box.

MFC References

CComboBox::GetEditSel

Return Value

A 32-bit value that contains the starting position in the low-order word and the position of the first nonselected character after the end of the selection in the high-order word. If this function is used on a combo box without an edit control, an exception is raised.


PyCComboBox.GetExtendedUI

int = GetExtendedUI()

Indicates if the combo has the extended interface.

MFC References

CComboBox::GetExtendedUI

Return Value

Nonzero if the combo box has the extended user interface; otherwise 0.


PyCComboBox.GetItemData

object = GetItemData(item)

Retrieves the application-specific object associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCComboBox.GetItemValue

int = GetItemValue(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCComboBox.GetLBText

string = GetLBText(index)

Gets the string from the list of a combo box.

Parameters

index : int

The index of the item to return the string for.

Return Value

The requested string. If index does not specify a valid index, no exception is raised.


PyCComboBox.GetLBTextLen

int = GetLBTextLen(index)

Returns the length of a string in the list of a combobox.

Parameters

index : int

The index of the item to return the length of.

MFC References

CComboBox::GetLBTextLen rdesc Returns the length of the string (in bytes), or raises an exception on error.


PyCComboBox.InsertString

int = InsertString(pos, object )

Insert a string into a combobox.

Parameters

pos : int

The zero based index in the combobox to insert the new string

object : any

The object to be added to the combobox

MFC References

CComboBox::InsertString

Return Value

The zero based index of the new string added.


PyCComboBox.LimitText

int = LimitText(max)

Limits the amount of text the edit portion of a combo box can hold.

Parameters

max : int

The maximum number of characters the user can enter. If zero, the size is set to (virtually) unlimited.

MFC References

CComboBox::LimitText


PyCComboBox.ResetContent

ResetContent()

Clear all the items from a combobox.

MFC References

CComboBox::ResetContent


PyCComboBox.SelectString

SelectString(after, string)

Searches for a combobox item that matches the specified string, and selects it.

Parameters

after : int

Contains the zero-based index of the item before the first item to be searched, or -1 for the entire combobox.

string : string

The string to search for.

MFC References

CComboBoxBox::SelectString

Return Value

The return value is always None - an exception is raised if the string can not be located.


PyCComboBox.SetCurSel

SetCurSel(index)

Selects an item in a combobox.

Parameters

index : int

The zero based index of the item to select.

MFC References

CComboBox::SetCurSel


PyCComboBox.SetEditSel

SetEditSel(start, end)

Sets the selection in the edit control portion of a combo box.

Parameters

start : int

Specifies the starting position. If the starting position is set to -1, then any existing selection is removed.

end : int

Specifies the ending position. If the ending position is set to -1, then all text from the starting position to the last character in the edit control is selected.

MFC References

PyCComboBox::SetEditSel

Return Value

The return value is always None - an exception is raised if the combo is a dropdown style, or does not have an edit control.


PyCComboBox.SetExtendedUI

SetExtendedUI(bExtended)

Selects the Extended UI mode for a combo box.

Parameters

bExtended=1 : int

Indicates if the combo should have the extended user interface.

Comments

A combo box with the Extended UI flag set can be identified in the following ways:~ Clicking the static control displays the list box only for combo boxes with the CBS_DROPDOWNLIST style.~ Pressing the DOWN ARROW key displays the list box (F4 is disabled).~ Scrolling in the static control is disabled when the item list is not visible (the arrow keys are disabled).

MFC References

CListBox::SetExtendedUI


PyCComboBox.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific object value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCComboBox.SetItemValue

int = SetItemValue(item, data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

data : int

New value for the data.


PyCComboBox.ShowDropDown

ShowDropDown(bShowIt)

Shows or hides the listbox portion of a combo box.

Parameters

bShowIt=1 : int

Indicates if the listbox should be shown or hidden.


PyCCommonDialog

PyCCommonDialog Object

An abstract class which encapsulates an MFC CCommonDialog object. Derived from a PyCDialog object.


PyCControl

PyCControl Object

A windows abstract control. Derived from a PyCWnd object.


PyCControlBar

PyCControlBar Object

A class which encapsulates an MFC CControlBar . Derived from a PyCWnd object.

Methods

CalcDynamicLayout
The framework calls this member function to calculate the dimensions of a dynamic toolbar.

CalcFixedLayout
Calculates the horizontal size of a control bar

EnableDocking
Specifies whether the control bar supports docking and the sides of its parent window.

EraseNonClient

GetBarStyle
Retrieves the control bar style settings.

GetCount
Returns the number of non-HWND elements in the control bar.

GetDockingFrame
Returns the frame window to which a control bar is docked.

IsFloating
Returns a nonzero value if the control bar in question is a floating control bar.

SetBarStyle
Modifies the control bar style settings.

ShowWindow
Shows the window, and recalculates the toolbar layout.

Properties

PyCFrameWnd dockSite
Current dock site, if dockable

PyCWnd dockBar
Current dock bar, if dockable

PyCDockContext dockContext
Used during dragging

int dwStyle
creation style (used for layout)

int dwDockStyle
indicates how bar can be docked


PyCControlBar.CalcDynamicLayout

int = CalcDynamicLayout(length, dwMode )

The framework calls this member function to calculate the dimensions of a dynamic toolbar.

Parameters

length : int

The requested dimension of the control bar, either horizontal or vertical, depending on dwMode.

dwMode : int

A combination of flags.


PyCControlBar.CalcFixedLayout

int = CalcFixedLayout(bStretch, bHorz )

Calculates the horizontal size of a control bar

Parameters

bStretch : int

Indicates whether the bar should be stretched to the size of the frame. The bStretch parameter is nonzero when the bar is not a docking bar (not available for docking) and is 0 when it is docked or floating (available for docking).

bHorz : int

Indicates that the bar is horizontally or vertically oriented.


PyCControlBar.EnableDocking

EnableDocking(style)

pecifies whether the control bar supports docking and the sides of its parent window.

Parameters

style : int

Enables a control bar to be docked.


PyCControlBar.EraseNonClient

EraseNonClient()


PyCControlBar.GetBarStyle

int = GetBarStyle()

Retrieves the control bar style settings.


PyCControlBar.GetCount

int = GetCount()

Returns the number of non-HWND elements in the control bar.


PyCControlBar.GetDockingFrame

PyCFrameWnd = GetDockingFrame()

Returns the frame window to which a control bar is docked.


PyCControlBar.IsFloating

int = IsFloating()

Returns a nonzero value if the control bar in question is a floating control bar.


PyCControlBar.SetBarStyle

SetBarStyle(style)

Modifies the control bar style settings.

Parameters

style : int

The new style


PyCControlBar.ShowWindow

int = ShowWindow()

Shows the toolbar, and recalculates the button layout.

Comments

This method is provided for convenience. For further details, see PyCWnd::ShowWindow and PyCFrameWnd::RecalcLayout

Return Value

The return value is that returned from PyCWnd::ShowWindow


PyCCtrlView

PyCCtrlView Object

A class which implementes a CCtrlView (ie, a view based on a dialog resource.

Methods

OnCommand
Calls the standard Python framework OnCommand handler


PyCCtrlView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCDC

PyCDC Object

A Device Context. Encapsulates an MFC CDC class.

Methods

AbortDoc
Aborts a print job

Arc
Draws an arc.

BeginPath
Opens a path bracket in the device context

BitBlt
Copies a bitmap

Chord
Draws a chord.

CreateCompatibleDC
Creates a memory DC compatible with this DC.

CreatePrinterDC
Creates a device context for a specific printer

DeleteDC
Deletes all resources associated with a device context.

DPtoLP
Convert from device points to logical points.

Draw3dRect
Draws a three-dimensional rectangle.

DrawFocusRect
Draws a rectangle in the style used to indicate the rectangle has focus

DrawFrameControl
Draws a frame control of the specified type and style.

DrawIcon
Draws an icon on the DC.

DrawText
Formats text in the given rectangle

Ellipse
Draws an Ellipse.

EndDoc
Finishes spooling the document and starts printing it

EndPage
Finishes a page on a printer DC

EndPath
Closes a path bracket and selects the path defined by the bracket into the specified device context

ExtTextOut
Writes text to the DC.

FillPath
Closes any open figures in the current path and fills the path's interior by using the current brush and polygon-filling mode.

FillRect
Fills a given rectangle with the specified brush

FillSolidRect
Fills the given rectangle with the specified solid color.

FrameRect
Draws a border around the rectangle specified by rect

GetBrushOrg
Retrieves the origin (in device units) of the brush currently selected for the device context.

GetClipBox
Retrives the current clipping region.

GetCurrentPosition
Retrieves the current position (in logical coordinates).

GetDeviceCaps
Retrieves current device capabilities.

GetHandleAttrib
Retrieves the handle of the attribute device context.

GetHandleOutput
Retrieves the handle of the output device context.

GetMapMode
Gets the mapping mode for the device context.

GetNearestColor
Returns the closest color a device can map.

GetPixel
Returns the value of a pixel at a location

GetSafeHdc
Returns the underlying windows handle for the DC object.

GetTextExtent
Calculates the size of the string.

GetTextExtentPoint
Alias for GetTextExtent - Calculates the size of the string.

GetTextFace
Retrieves the name of the current font.

GetTextMetrics
Retrieves the metrics for the current font.

GetViewportExt
Gets the viewport extent of the device context

GetViewportOrg
Gets the viewport origin of the device context

GetWindowExt
Gets the window extent of the device context

GetWindowOrg
Retrieves the x- and y-coordinates of the origin of the window associated with the device context.

IntersectClipRect
Creates a new clipping region by forming the intersection of the current region and the rectangle specified

IsPrinting
Returns 1 if the DC is currently printing, else 0

LineTo
Draws a line to a specified point.

LPtoDP
Convert from logical points to device points

MoveTo
Moves the current position to a specifed point.

OffsetWindowOrg
Modifies the coordinates of the window origin relative to the coordinates of the current window origin.

OffsetViewportOrg
Modifies the coordinates of the viewport origin relative to the coordinates of the current viewport origin

PatBlt
Creates a bit pattern on the device.

Pie
Draws a pie shape with specific starting and ending points in a rectangle

PolyBezier
Draws one or more Bezier splines.

Polygon
Draws an Polygon.

Polyline
Draws a Polyline.

RealizePalette
Maps palette entries in the current logical palette to the system palette.

Rectangle
Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.

RectVisible
Determines if a rectangle is currently visisble in the viewport.

RestoreDC
Restores a saved DC.

SaveDC
Saves a DC.

ScaleWindowExt
Modifies the window extents relative to the current values.

ScaleViewportExt
Modifies the viewport extents relative to the current values.

SelectClipRgn
Selects the given region as the current clipping region for the device context

SelectObject
Selects an object into the DC.

SelectObject
Selects the logical palette.

SetBkColor
Sets the background color.

SetBkMode
Sets the background mode.

SetBrushOrg
Specifies the origin that GDI will assign to the next brush that the application selects into the device context.

SetGraphicsMode
Sets the graphics mode for the specified device context

SetMapMode
Sets the device mapping mode.

SetPixel
Set a pixel to a color

SetPolyFillMode
Sets the polygon-filling mode.

SetROP2
Sets the current drawing mode.

SetTextAlign
Sets the text alignment.

SetTextColor
Sets the text foreground color.

SetWindowExt
Sets the extents of the window.

SetWindowOrg
Sets the window origin of the device context

SetViewportExt
Sets the extents of the window's viewport.

SetViewportOrg
Sets the viewport origin of the device context

SetWorldTransform
sets a two-dimensional linear transformation between world space and page space for the specified device context.

StartDoc
Starts spooling a document to a printer DC

StartPage
Starts a new page on a printer DC

StretchBlt
Copies a bitmap from the source device context to this device context.

StrokeAndFillPath
Closes any open figures in a path, strokes the outline of the path by using the current pen, and fills its interior by using the current brush. The device context must contain a closed path.

StrokePath
Renders the specified path by using the current pen.

TextOut
Writes text to the DC.


PyCDC.AbortDoc

AbortDoc()

Aborts a print job


PyCDC.Arc

Arc(rect, pointStart, pointEnd)

Draws an eliptical arc.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

pointStart : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's starting point (in logical units). This point does not have to lie exactly on the arc.

pointEnd : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's ending point (in logical units). This point does not have to lie exactly on the arc.

Comments

The arc drawn by using the function is a segment of the ellipse defined by the specified bounding rectangle. The actual starting point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified starting point intersects the ellipse. The actual ending point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified ending point intersects the ellipse. The arc is drawn in a counterclockwise direction. Since an arc is not a closed figure, it is not filled. Both the width and height of the rectangle must be greater than 2 units and less than 32,767 units.

MFC References

CDC::Arc

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.BeginPath

BeginPath()

Opens a path bracket in the device context


PyCDC.BitBlt

BitBlt(destPos, size, dc, srcPos, rop)

Copies a bitmap from the source device context to this device context.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

dc : PyCDC

Specifies the PyCDC object from which the bitmap will be copied. It must be None if rop specifies a raster operation that does not include a source.

srcPos : (xSrc, ySrc)-ints

Specifies the logical x,y coordinates of the upper-left corner of the source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::BitBlt


PyCDC.Chord

Chord(rect, pointStart, pointEnd)

Draws a chord.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

pointStart : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's starting point (in logical units). This point does not have to lie exactly on the arc.

pointEnd : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's ending point (in logical units). This point does not have to lie exactly on the arc.

Comments

Draws a chord (a closed figure bounded by the intersection of an ellipse and a line segment). The rect parameter specify the upper-left and lower-right corners, respectively, of a rectangle bounding the ellipse that is part of the chord. The pointStart and pointEnd parameters specify the endpoints of a line that intersects the ellipse. The chord is drawn by using the selected pen and filled by using the selected brush.

MFC References

CDC::Chord

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.CreateCompatibleDC

CreateCompatibleDC(dcFrom)

Creates a memory device context that is compatible with this DC.

Parameters

dcFrom=None : PyCDC

The source DC, or None to make a screen compatible DC.

Comments

Note that unlike the MFC version, this function calls the global CreateCompatibleDC function and returns a new PyCDC object.

MFC References

CDC::CreateCompatibleDC


PyCDC.CreatePrinterDC

CreatePrinterDC(printerName)

Creates a device context for a specific printer

Parameters

printerName=None : string

The printer name, or None for the default printer

MFC References

CDC::CreateDC


PyCDC.DPtoLP

(x,y) = DPtoLP(point)

Converts device units into logical units.

Parameters

point : (x,y)

The point to convert

Alternative Parameters

x

The x coordinate to convert.

y

The y coordinate to convert.

MFC References

CDC::DPtoLP

To Do

Should really handle list of (x,y) points

Return Value

The converted coordinates.


PyCDC.DeleteDC

DeleteDC()

Deletes all resources associated with a device context.

Comments

In general, do not call this function; the destructor will do it for you.
An application should not call DeleteDC if objects have been selected into the device context. Objects must first be selected out of the device context before it it is deleted.
An application must not delete a device context whose handle was obtained by calling CWnd::GetDC. Instead, it must call CWnd::ReleaseDC to free the device context.
The DeleteDC function is generally used to delete device contexts created with CreateDC, CreateIC, or CreateCompatibleDC.


PyCDC.Draw3dRect

Draw3dRect(rect, colorTopLeft, colorBotRight)

Draws a three-dimensional rectangle.

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

colorTopLeft : int

Specifies the color of the top and left sides of the three-dimensional rectangle.

colorBotRight : int

Specifies the color of the bottom and right sides of the three-dimensional rectangle.

MFC References

CDC::Draw3dRect


PyCDC.DrawFocusRect

DrawFocusRect(rect)

Draws a rectangle in the style used to indicate the rectangle has focus

Parameters

rect : (left, top, right, bottom)

The coordinates of the rectangle

MFC References

CDC::DrawFocusRect


PyCDC.DrawFrameControl

DrawFrameControl(rect, typ, state)

Draws a frame control of the specified type and style.

Parameters

rect : (left, top, right, bottom)

Specifies the bounding rectangle, in logical units.

typ : int

state : int

MFC References

CDC::DrawFrameControl


PyCDC.DrawIcon

DrawIcon(point, hIcon)

Draws an icon on the DC.

Parameters

point : (x,y)

The point coordinate to draw to.

hIcon : int

The handle of the icon to draw.

MFC References

CDC::DrawIcon


PyCDC.DrawText

s,rc,forat = DrawText()

Formats text in the given rectangle

Return Value

Height of text in pixels


PyCDC.Ellipse

Ellipse(rect)

Draws an Ellipse.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

Comments

The center of the ellipse is the center of the bounding rectangle specified by rect. The ellipse is drawn with the current pen, and its interior is filled with the current brush.

MFC References

CDC::Ellipse

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.EndDoc

EndDoc()

Finishes spooling the document and starts printing it


PyCDC.EndPage

EndPage()

Finishes a page on a printer DC


PyCDC.EndPath

EndPath()

Closes a path bracket and selects the path defined by the bracket into the specified device context


PyCDC.ExtTextOut

ExtTextOut(int, int, int, rect, string, tuple)

Writes text to the DC.

Parameters

int : x

The x coordinate to write the text to.

int : y

The y coordinate to write the text to.

int : nOptions

Specifies the rectangle type. This parameter can be one, both, or neither of ETO_CLIPPED and ETO_OPAQUE

rect : (left, top, right, bottom)

Specifies the text's bounding rectangle. (Can be None.)

string : text

The text to write.

tuple : (width1, width2, ...)

Optional array of values that indicate distance between origins of character cells.

MFC References

CDC::ExtTextOut

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.FillPath

FillPath()

Closes any open figures in the current path and fills the path's interior by using the current brush and polygon-filling mode. After its interior is filled, the path is discarded from the device context.


PyCDC.FillRect

FillRect(rect, brush)

Fills a given rectangle with the specified brush

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

brush : PyCBrush

Specifies the brush to use.

MFC References

CDC::FillRect


PyCDC.FillSolidRect

FillSolidRect(rect, color)

Fills the given rectangle with the specified solid color.

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

color : int

Specifies the color to use.

MFC References

CDC::FillSolidRect


PyCDC.FrameRect

FrameRect(rect, brush)

Draws a border around the rectangle specified by rect

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

brush : PyCBrush

Specifies the brush to use.

MFC References

CDC::FrameRect


PyCDC.GetBrushOrg

(int,int) = GetBrushOrg()

Retrieves the origin (in device units) of the brush currently selected for the device context.

MFC References

CDC::GetBrushOrg


PyCDC.GetClipBox

(left, top, right, bottom) = GetClipBox()

Retrieves the dimensions of the smallest bounding rectangle around the current clipping boundary.

MFC References

CDC::GetClipBox

Return Value

A tuple of integers specifying the rectangle.


PyCDC.GetCurrentPosition

(x, y) = GetCurrentPosition()

Retrieves the current position (in logical coordinates).


PyCDC.GetDeviceCaps

int = GetDeviceCaps(index)

Retrieves a capability of the device context.

Parameters

index : int

The information requested. See the win32api documentation for details.

MFC References

CDC::GetDeviceCaps

Return Value

The value of the requested capability


PyCDC.GetHandleAttrib

int = GetHandleAttrib()

Retrieves the handle of the attribute device context.


PyCDC.GetHandleOutput

int = GetHandleOutput()

Retrieves the handle of the output device context.


PyCDC.GetMapMode

int = GetMapMode()

Gets the mapping mode for the device context.

MFC References

CDC::GetMapMode


PyCDC.GetNearestColor

int = GetNearestColor(color)

Returns the closest color a device can map.

Parameters

color : int

Specifies the color to be matched.


PyCDC.GetPixel

GetPixel(x, y)

Gets a pixel at a local in a device context

Parameters

x : int

Horizontal coordinate.

y : int

Vertical coordinate.


PyCDC.GetSafeHdc

int = GetSafeHdc()

Returns the HDC of this DC object.

MFC References

CDC::GetSafeHdc


PyCDC.GetTextExtent

(x,y) = GetTextExtent(text)

Calculates the width and height of a line of text using the current font to determine the dimensions.

Parameters

text : string

The text to calculate for.

MFC References

CFC::GetTextExtent

Return Value

A tuple of integers with the size of the string, in logical units.


PyCDC.GetTextExtentPoint

(x,y) = GetTextExtentPoint(text)

An alias for PyCDC::GetTextExtent. GetTextExtentPoint is the preferred win32api name, but GetTextExtent is the MFC name.
Calculates the width and height of a line of text using the current font to determine the dimensions.

Parameters

text : string

The text to calculate for.

Return Value

A tuple of integers with the size of the string, in logical units.


PyCDC.GetTextFace

string = GetTextFace()

Returns typeface name of the current font.

MFC References

CDC::GetTextFace


PyCDC.GetTextMetrics

dict = GetTextMetrics()

Retrieves the metrics for the current font in this device context.

MFC References

CDC::GetTextMetrics

Return Value

A dictionary of integers, keyed by the following strings:
tmHeight
tmAscent
tmDescent
tmInternalLeading
tmExternalLeading
tmAveCharWidth
tmMaxCharWidth
tmWeight
tmItalic
tmUnderlined
tmStruckOut
tmFirstChar
tmLastChar
tmDefaultChar
tmBreakChar
tmPitchAndFamily
tmCharSet
tmOverhang
tmDigitizedAspectX
tmDigitizedAspectY


PyCDC.GetViewportExt

x, y = GetViewportExt()

Gets the viewport extent of the device context


PyCDC.GetViewportOrg

x, y = GetViewportOrg()

Gets the viewport origin of the device context


PyCDC.GetWindowExt

x, y = GetWindowExt()

Gets the window extent of the device context


PyCDC.GetWindowOrg

x, y = GetWindowOrg()

Retrieves the x- and y-coordinates of the origin of the window associated with the device context.


PyCDC.IntersectClipRect

IntersectClipRect(rect)

Creates a new clipping region by forming the intersection of the current region and the rectangle specified

Parameters

rect : (left, top, right, bottom)

Specifies the bounding rectangle, in logical units.

MFC References

CDC::IntersectClipRect

Return Value

region type as integer


PyCDC.IsPrinting

int = IsPrinting()

Returns 1 if the DC is currently printing, else 0


PyCDC.LPtoDP

(x,y) = LPtoDP(point)

Converts logical units into device units.

Parameters

point : (x,y)

The point coordinate to convert.

Alternative Parameters

x

The x coordinate to convert.

y

The y coordinate to convert.

MFC References

CDC::LPtoDP

Return Value

The converted coordinates.


PyCDC.LineTo

LineTo(point)

Draws a line to a specified point, using the currently selected pen.

Parameters

point : (x,y)

The point coordinate to draw to.

Alternative Parameters

x

The x coordinate to draw to.

y

The y coordinate to draw to.

MFC References

CDC::LineTo


PyCDC.MoveTo

(x,y) = MoveTo(point)

Moves the current position to a specified point.

Parameters

point : (x,y)

The point coordinate to move to.

Alternative Parameters

x

The x coordinate to move to.

y

The y coordinate to move to.

MFC References

CDC::MoveTo

Return Value

The previous position.


PyCDC.OffsetViewportOrg

x, y = OffsetViewportOrg(x,y)

Modifies the coordinates of the viewport origin relative to the coordinates of the current viewport origin

Parameters

x,y : int, int

The new origin offset.

Return Value

The previous viewport origin as a tuple (x,y)


PyCDC.OffsetWindowOrg

x, y = OffsetWindowOrg(x,y)

Modifies the coordinates of the window origin relative to the coordinates of the current window origin.

Parameters

x,y : int, int

The new origin offset.

Return Value

The previous origin as a tuple (x,y)


PyCDC.PatBlt

PatBlt(destPos, size, rop)

Creates a bit pattern on the device.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::BitBlt


PyCDC.Pie

Pie(x1, y1, x2, y2, x3, y3, x4, y4)

Draws a pie slice in a device context

Parameters

x1 : int

X coordinate of upper left corner

y1 : int

Y coordinate of upper left corner

x2 : int

X coordinate of lower right corner

y2 : int

Y coordinate of lower right corner

x3 : int

X coordinate of starting point of arc

y3 : int

Y coordinate of starting point of arc

x4 : int

X coordinate of ending point of arc

y4 : int

Y coordinate of ending point of arc


PyCDC.PolyBezier

PolyBezier()

Draws one or more Bezier splines.


PyCDC.Polygon

Polygon()

Draws an Polygon.


PyCDC.Polyline

Polyline(points)

Draws a Polyline.

Parameters

points : [(x, y), ...]

A sequence of points


PyCDC.RealizePalette

int = RealizePalette()

Maps palette entries in the current logical palette to the system palette.

Return Value

Indicates how many entries in the logical palette were mapped to different entries in the system palette. This represents the number of entries that this function remapped to accommodate changes in the system palette since the logical palette was last realized.


PyCDC.RectVisible

int = RectVisible(rect)

Determines whether any part of the given rectangle lies within the clipping region of the display context.

Parameters

rect : (left, top, right, bottom)

The coordinates of the reactangle to be checked.

MFC References

CDC::RectVisible

Return Value

Non zero if any part of the rectangle lies within the clipping region, else zero.


PyCDC.Rectangle

rc = Rectangle()

Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.


PyCDC.RestoreDC

RestoreDC(saved)

Restores the state of the device context.

Parameters

saved : int

The id of a previously saved device context. See PyCDC::SaveDC

MFC References

CDC::RestoreDC


PyCDC.SaveDC

int = SaveDC()

Saves the current state of the device context. Windows manages a stack of state information. The saved device context can later be restored by using CDC::RestoreDC

MFC References

CDC::SaveDC

Return Value

An integer identifying the context, which can be used by PyCDC::RestoreDC. An exception is raised if this function fails.


PyCDC.ScaleViewportExt

x, y = ScaleViewportExt()

Modifies the viewport extents relative to the current values.


PyCDC.ScaleWindowExt

x, y = ScaleWindowExt()

Modifies the window extents relative to the current values.


PyCDC.SelectClipRgn

obRgn = SelectClipRgn()

Selects the given region as the current clipping region for the device context

Return Value

The return value specifies the region's complexity (integer)


PyCDC.SelectObject

object = SelectObject(ob)

Selects an object into the device context.
Currently, only PyCFont, PyCBitMap , PyCBrush and PyCPen objects are supported.

Parameters

ob : object

The object to select.

MFC References

CDC::SelectObject

Return Value

The previously selected object. This will be the same type as the object parameter.


PyCDC.SetBkColor

int = SetBkColor(color)

Sets the current background color to the specified color.

Parameters

color : int

A windows color specification. See the win32api documentation for details.

Comments

If the background mode is OPAQUE, the system uses the background color to fill the gaps in styled lines, the gaps between hatched lines in brushes, and the background in character cells. The system also uses the background color when converting bitmaps between color and monochrome device contexts.

MFC References

CDC::SetBkColor

Return Value

The return value is the previous background color.


PyCDC.SetBkMode

int = SetBkMode(mode)

Sets the current background mode to the specified mode.

Parameters

mode : int

A background mode. May be either TRANSPARENT or OPAQUE.

Comments

Specifies the mode to be set. This parameter can be either OPAQUE or TRANSPARENT

MFC References

CDC::SetBkMode

Return Value

The return value is the previous background mode.


PyCDC.SetBrushOrg

(int, int) = SetBrushOrg(point)

Specifies the origin that GDI will assign to the next brush that the application selects into the device context.

Parameters

point : (x,y)

The new origin in device units.

MFC References

CDC::SetBrushOrg

Return Value

The previous origin in device units.


PyCDC.SetGraphicsMode

int = SetGraphicsMode(mode)

Sets the graphics mode for the specified device context

Parameters

mode : int

The new mode.


PyCDC.SetMapMode

int = SetMapMode(newMode)

Sets the mapping mode for the device context.

Parameters

newMode : int

The new mode. Can be one of MM_ANISOTROPIC, MM_HIENGLISH, MM_HIMETRIC, MM_ISOTROPIC, MM_LOENGLISH, MM_LOMETRIC, MM_TEXT, MM_TWIPS

MFC References

CDC::SetMapMode

Return Value

The previous mapping mode.


PyCDC.SetPixel

SetPixel(x, y, color)

Sets a pixel in a device context

Parameters

x : int

Horizontal coordinate.

y : int

Vertical coordinate.

color : int

The brush color.


PyCDC.SetPolyFillMode

(int) = SetPolyFillMode(point)

Sets the polygon-filling mode.

Parameters

point : (x,y)

The new origin in device units.

MFC References

CDC::SetPolyFillMode

Return Value

The previous PolyFillMode as integer

The previous PolyFillMode.


PyCDC.SetROP2

dict = SetROP2(mode)

Sets the current drawing mode.

Parameters

mode : int

The new drawing mode.

MFC References

CDC::SetROP2


PyCDC.SetTextAlign

int = SetTextAlign(newFlags)

Sets the text-alignment flags.

Parameters

newFlags : int

The new alignment flags. Can be a combination of (TA_CENTER, TA_LEFT, TA_RIGHT), (TA_BASELINE, TA_BOTTOM, TA_TOP) and (TA_NOUPDATECP, TA_UPDATECP)
The default is TA_LEFT|TA_TOP|TA_NOUPDATECP

MFC References

CDC::SetTextAlign

Return Value

The old alignment flags.


PyCDC.SetTextColor

int = SetTextColor(color)

Sets the text color to the specified color.

Parameters

color : int

A windows color specification. See the win32api documentation for details.

Comments

This text color is used when writing text to this device context and also when converting bitmaps between color and monochrome device contexts. If the device cannot represent the specified color, the system sets the text color to the nearest physical color. The background color for a character is specified by the SetBkColor and SetBkMode member functions.

MFC References

CDC::SetTextColor

Return Value

The return value is the previous text color.


PyCDC.SetViewportExt

(x,y) = SetViewportExt(size)

Sets the x,y extents of the viewport of the device context.

Parameters

size : (x,y)

The new size.

MFC References

CDC::SetViewportExt

Return Value

The previous extents of the viewport (in logical units).


PyCDC.SetViewportOrg

x, y = SetViewportOrg(x,y)

Sets the viewport origin of the device context

Parameters

x,y : int, int

The new origin.


PyCDC.SetWindowExt

(x,y) = SetWindowExt(size)

Sets the x,y extents of the window associated with the device context.

Parameters

size : (x,y)

The new size.

MFC References

CDC::SetWindowExt

Return Value

The previous extents of the window (in logical units).


PyCDC.SetWindowOrg

x, y = SetWindowOrg(x,y)

Sets the window origin of the device context

Parameters

x,y : int, int

The new origin.


PyCDC.SetWorldTransform

int = SetWorldTransform()

sets a two-dimensional linear transformation between world space and page space for the specified device context. This transformation can be used to scale, rotate, shear, or translate graphics output.


PyCDC.StartDoc

StartDoc(docName, outputFile)

Starts spooling a document to a printer DC

Parameters

docName : string

The document name

outputFile : string

The output file name. Use this to spool to a file. Omit to send to the printer.


PyCDC.StartPage

StartPage()

Starts a new page on a printer DC


PyCDC.StretchBlt

StretchBlt(destPos, size, dc, srcPos, size, rop)

Copies a bitmap from the source device context to this device context.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

dc : PyCDC

Specifies the PyCDC object from which the bitmap will be copied. It must be None if rop specifies a raster operation that does not include a source.

srcPos : (xSrc, ySrc)-ints

Specifies the logical x,y coordinates of the upper-left corner of the source bitmap.

size : (widthsrc, heightsrc)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::StretchBlt


PyCDC.StrokeAndFillPath

StrokeAndFillPath()

Closes any open figures in a path, strokes the outline of the path by using the current pen, and fills its interior by using the current brush. The device context must contain a closed path.


PyCDC.StrokePath

StrokePath()

Renders the specified path by using the current pen.


PyCDC.TextOut

TextOut(int, int, string)

Outputs text to the display context, using the currently selected font.

Parameters

int : x

The x coordinate to write the text to.

int : y

The y coordinate to write the text to.

string : text

The text to write.

MFC References

CDC::TextOut

Return Value

Always none. If the function fails, an exception is raised.


PyCDialog

PyCDialog Object

A class which encapsulates an MFC CDialog object. Derived from a PyCWnd object.

Methods

CreateWindow
Creates a modless window for the dialog.

DoModal
Creates a modal window for the dialog.

EndDialog
Closes a modal dialog.

GotoDlgCtrl
Sets focus to a specific control.

MapDialogRect
Converts the dialog-box units of a rectangle to screen units.

OnCancel
Calls the default MFC OnCancel handler.

OnOK
Calls the default MFC OnOK handler.

OnInitDialog
Calls the default MFC OnInitDialog handler. sentinel


PyCDialog.CreateWindow

CreateWindow(obParent)

Create a modeless window for the dialog box.

Parameters

obParent=None : PyCWnd

The parent window for the new window

MFC References

CDialog::CreateIndirect


PyCDialog.DoModal

int = DoModal()

Create a modal window for the dialog box.

MFC References

CDialog::DoModal

Return Value

The return value from the dialog. This is the value passed to PyCDialog::EndDialog.


PyCDialog.EndDialog

EndDialog(result)

Ends a modal dialog box.

Parameters

result : int

The value to be returned by the PyCDialog::DoModal method.

MFC References

CDialog::EndDialog


PyCDialog.GotoDlgCtrl

GotoDlgCtrl(control)

Moves the focus to the specified control in the dialog box.

Parameters

control : PyCWnd

The control to get the focus.


PyCDialog.MapDialogRect

(left, top, right, bottom) = MapDialogRect(rect)

Converts the dialog-box units of a rectangle to screen units.

Parameters

rect : (left, top, right, bottom)

The rect to be converted


PyCDialog.OnCancel

OnCancel()

Calls the default MFC OnCancel handler.

See Also

PyCDialog.OnCancel virtual method


PyCDialog.OnInitDialog

int = OnInitDialog()

Calls the default MFC OnInitDialog handler.

See Also

PyCDialog.OnInitDialog virtual method


PyCDialog.OnOK

OnOK()

Calls the default MFC OnOK handler.

See Also

PyCDialog.OnOK virtual method


PyCDialogBar

PyCDialogBar Object

A class which encapsulates an MFC CDialogBar . Derived from a PyCControlBar object.

Methods

CreateWindow
Creates the window for the PyCDialogBar object.


PyCDialogBar.CreateWindow

CreateWindow(parent, template, style, id)

Creates the window for the PyCDialogBar object.

Parameters

parent : PyCWnd

The parent window

template : string

The template to load the resource from

style : int

The style for the window

id : int

The ID of the window

Alternative Parameters

parent

The parent window

resourceId

The resource ID to load the resource from

style

The style for the window

id

The ID of the window


PyCDocTemplate

PyCDocTemplate Object

A document template class. Encapsulates an MFC CDocTemplate class

Methods

DoCreateDoc
Creates an underlying document object.

FindOpenDocument
Returns an existing document with the specified file name.

GetDocString
Retrieves a specific substring describing the document type.

GetDocumentList
Return a list of all open documents.

GetResourceID
Returns the resource ID in use.

GetSharedMenu
Returns the shared menu object for all frames using this template.

InitialUpdateFrame
Calls the default OnInitialFrame handler.

SetContainerInfo
Sets the resources to be used when an OLE 2 object is in-place activated.

SetDocStrings
Assigns the document strings for the template.

OpenDocumentFile
Opens a document file, creating a view and frame.


PyCDocTemplate.CreateNewDocument

PyCDocTemplate.CreateNewDocument Virtual

CreateNewDocument()

Called to create a new document object.


PyCDocTemplate.CreateNewFrame

PyCDocTemplate.CreateNewFrame Virtual

CreateNewFrame()

Called to create a new frame window.


PyCDocTemplate.DoCreateDoc

PyCDocument = DoCreateDoc(fileName)

Creates an underlying document object.

Parameters

fileName=None : string

The name of the file to load.


PyCDocTemplate.FindOpenDocument

PyCDocument = FindOpenDocument(fileName)

Returns an existing document with the specified file name.

Parameters

fileName : string

The fully qualified filename to search for.


PyCDocTemplate.GetDocString

string = GetDocString(docIndex)

Retrieves a specific substring describing the document type.

Parameters

docIndex : int

The document index. Must be one of the win32ui.CDocTemplate_* constants.

Comments

For more information on the doc strings, please see PyCDocTemplate::SetDocStrings


PyCDocTemplate.GetDocumentList

list = GetDocumentList()

Return a list of all open documents.


PyCDocTemplate.GetResourceID

GetResourceID()

Returns the resource ID in use.


PyCDocTemplate.GetSharedMenu

PyCMenu = GetSharedMenu()

Returns the shared menu object for all frames using this template.

MFC References

CWnd::m_hMenuShared


PyCDocTemplate.InitialUpdateFrame

InitialUpdateFrame(frame, doc, bMakeVisible)

Calls the default OnInitialFrame handler.

Parameters

frame=None : PyCFrameWnd

The frame window.

doc=None : PyCDocument

A document for the frame.

bMakeVisible=1 : int

Indicates of the frame should be shown.

See Also

PyCDocTemplate.InitialUpdateFrame virtual method


PyCDocTemplate.OpenDocumentFile

OpenDocumentFile(filename, bMakeVisible)

Opens a document file, creating a view and frame.

Parameters

filename : string

Name of file to open, or None

bMakeVisible=1 : int

Indicates if the document should be created visible.


PyCDocTemplate.SetContainerInfo

SetContainerInfo(id)

Sets the resources to be used when an OLE 2 object is in-place activated.

Parameters

id : int

The resource ID.


PyCDocTemplate.SetDocStrings

SetDocStrings(docStrings)

Assigns the document strings for the template.

Parameters

docStrings : string

The document strings.

Comments

The string must be a \\n seperated list of docstrings. The elements are:

elementName | Description
windowTitle | Title used for the window (only for SDI applications)
docName | Root for the default document name.
fileNewName | Name of the document type, as displayed in the "File/New" dialog
filterName | Description of the document type and a wildcard spec for the file open dialog.
filterExt | Extension for documents of this file type.
regFileTypeId | Internal Id of the document as registered in the registry. Used to associate the extension with the file type.
regFileTypeName | Name of the document, as stored in the reigstry. This is the name presented to the user.


PyCDockContext

PyCDockContext Object

A class which encapsulates an MFC CDockContext object

Methods

EndDrag

StartDrag

EndResize

StartResize

ToggleDocking

Properties

x,y ptLast

left, top, right, bottom rectLast

cx, cy sizeLast

int bDitherLast

left, top, right, bottom rectDragHorz

left, top, right, bottom rectDragVert

left, top, right, bottom rectFrameDragHorz

left, top, right, bottom rectFrameDragVert

int dwDockStyle
allowable dock styles for bar

int dwOverDockStyle
style of dock that rect is over

int dwStyle
style of control bar

int bFlip
if shift key is down

int bForceFrame
if ctrl key is down CDC* m_pDC; // where to draw during drag

int bDragging

int nHitTest

int uMRUDockID

left, top, right, bottom rectMRUDockPos

int dwMRUFloatStyle

x,y ptMRUFloatPos
Sentinel


PyCDockContext.EndDrag

int = EndDrag()


PyCDockContext.EndResize

int = EndResize()


PyCDockContext.StartDrag

int = StartDrag(pt)

Parameters

pt : int, int


PyCDockContext.StartResize

int = StartResize(hittest, pt )

Parameters

hittest : int

pt : int, int


PyCDockContext.ToggleDocking

int = ToggleDocking()


PyCDocument

PyCDocument Object

A document class. Encapsulates an MFC CDocument class

Methods

DeleteContents
Call the MFC DeleteContents method.

DoSave
Save the file. If necessary, prompt for file name.

DoFileSave
Check file attributes, and save the file.

GetDocTemplate
Returns the PyCDocTemplate for the document.

GetAllViews
Returns a list of all views for the current document.

GetFirstView
Returns the first view object attached to this document.

GetPathName
Returns the full path name of the current document.

GetTitle
Returns the title of the current document.

IsModified
Return a flag indicating if the document has been modified.

OnChangedViewList
Informs the document when a view is added or removed.

OnCloseDocument
Call the MFC OnCloseDocument handler.

OnNewDocument
Call the MFC OnNewDocument handler.

OnOpenDocument
Call the MFC OnOpenDocument handler.

OnSaveDocument
Call the MFC OnSaveDocument handler.

SetModifiedFlag
Set the "dirty" flag for the document.

SaveModified
Call the underlying MFC method.

SetPathName
Set the full path name for the document.

SetTitle
Set the title of the document.

UpdateAllViews
Informs each view when a document changes. sentinel


PyCDocument.DeleteContents

DeleteContents()

Call the MFC DeleteContents method. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.DeleteContents virtual method

MFC References

CDocument::DeleteContents


PyCDocument.DoFileSave

DoFileSave()

Checks the file attributes. If the file is read only, a new name is prompted, else the file is saved (by calling DoSave)

See Also

PyCDocument.DoFileSave virtual method

Undocumented MFC References

CDocument::DoFileSave


PyCDocument.DoSave

DoSave(fileName, bReplace)

Calls the underlying MFC DoSave method.

Parameters

fileName : string

The name of the file to save to.

bReplace=1 : int

Should an existing file be silently replaced?.

Comments

If invalid or no filename, will prompt for a name, else will perform the actual saving of the document.

See Also

PyCDocument.DoSave virtual method

Undocumented MFC References

CDocument::DoSave


PyCDocument.GetAllViews

[PyCView,...] = GetAllViews()

Returns a list of all views for the current document.

MFC References

CDocument::GetFirstViewPosition

CDocument::GetNextView


PyCDocument.GetDocTemplate

PyCDocTemplate = GetDocTemplate()

Returns the template for the document.

MFC References

CDocument::GetDocTemplate


PyCDocument.GetFirstView

PyCView = GetFirstView()

Returns the first view object attached to this document.

Comments

For more info, see PyCDocument::GetAllViews shouldnt be possible.

MFC References

CDocument::GetFirstViewPosition

CDocument::GetNextView


PyCDocument.GetPathName

string = GetPathName()

Returns the full path name of the current document. The string will be empty if no path name has been set.

MFC References

CDocument::GetPathName


PyCDocument.GetTitle

string = GetTitle()

Returns the title of the current document. This will often be the file name portion of the path name.

MFC References

CDocument::GetTitle


PyCDocument.IsModified

int = IsModified()

Return a flag indicating if the document has been modified.

MFC References

CDocument::IsModified


PyCDocument.OnChangedViewList

OnChangedViewList()

Informs the document when a view is added or removed.


PyCDocument.OnCloseDocument

OnCloseDocument()

Call the MFC OnCloseDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnCloseDocument virtual method

MFC References

CDocument::OnCloseDocument


PyCDocument.OnNewDocument

OnNewDocument()

Call the MFC OnNewDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnNewDocument virtual method

MFC References

CDocument::OnNewDocument


PyCDocument.OnOpenDocument

OnOpenDocument(pathName)

Call the MFC OnOpenDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

Parameters

pathName : string

The full path of the file to open.

MFC References

CDocument::OnOpenDocument


PyCDocument.OnSaveDocument

OnSaveDocument(pathName)

Call the MFC OnSaveDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

Parameters

pathName : string

The full path of the file to save.

MFC References

CDocument::OnSaveDocument


PyCDocument.SaveModified

int = SaveModified()

Call the underlying MFC method.

See Also

PyCDocument.SaveModified virtual method

MFC References

CDocument::SaveModified

Return Value

Nonzero if it is safe to continue and close the document; 0 if the document should not be closed.


PyCDocument.SetModifiedFlag

SetModifiedFlag(bModified)

Set the "dirty" flag for the document.

Parameters

bModified=1 : int

Set dirty flag

MFC References

CDocument::SetModifiedFlag


PyCDocument.SetPathName

SetPathName(path)

Set the full path name for the document.

Parameters

path : string

The full path of the file.

MFC References

CDocument::SetPathName


PyCDocument.SetTitle

SetTitle(title)

Set the title of the document (ie, the name to appear in the window caption for the document.

Parameters

title : string

The new title.

MFC References

CDocument::SetTitle


PyCDocument.UpdateAllViews

UpdateAllViews(sender, hint)

Informs each view when a document changes.

Parameters

sender : PyCView

The view who initiated the update

hint=None : object

A hint for the update.

MFC References

CDocument::UpdateAllViews


PyCEdit

PyCEdit Object

A windows edit control. Encapsulates an MFC CEdit class. Derived from a PyCControl object.

Methods

CreateWindow
Creates the window for a new edit object.

Clear
Clears all text from an edit control.

Copy
Copy the selection to the clipboard.

Cut
Cut the selection, and place it in the clipboard.

FmtLines
Change the formatting options for the edit control

GetFirstVisibleLine
Returns zero-based index of the topmost visible line.

GetSel
Returns the selection.

GetLine
Returns a specified line.

GetLineCount
Returns the number of lines in an edit control.

LimitText
Sets max length of text that user can enter

LineFromChar
Returns the line number of a given character.

LineIndex
Returns the line index

LineScroll
Scroll the control vertically and horizontally

Paste
Pastes the contents of the clipboard into the edit control.

ReplaceSel
Replace the selection with the specified text.

SetReadOnly
Set the read only status of an edit control.

SetSel
Changes the selection in an edit control. sentinel


PyCEdit.Clear

int = Clear()

Clears all text in an edit control.

MFC References

CEdit::Clear


PyCEdit.Copy

Copy()

Copys the current selection to the clipboard.

MFC References

CEdit::Copy


PyCEdit.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the window for a new Edit object.

Parameters

style : int

The style for the Edit. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the Edit.

parent : PyCWnd

The parent window of the Edit. Usually a PyCDialog.

id : int

The Edits control ID.


PyCEdit.Cut

Cut()

Cuts the current selection to the clipboard.

MFC References

CEdit::Cut


PyCEdit.FmtLines

int = FmtLines(bAddEOL)

Sets the formatting options for the control.

Parameters

bAddEOL : int

Specifies whether soft line-break characters are to be inserted. A value of TRUE inserts the characters; a value of FALSE removes them.

MFC References

CEdit::FmtLines

Return Value

Nonzero if any formatting occurs; otherwise 0.


PyCEdit.GetFirstVisibleLine

int = GetFirstVisibleLine()

Returns zero-based index of the topmost visible line.

MFC References

CEdit::GetFirstVisibleLine

Return Value

The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.


PyCEdit.GetLine

int = GetLine(lineNo)

Returns the text in a specified line.

Parameters

lineNo=current : int

Contains the zero-based index value for the desired line.

Comments

This function is not an MFC wrapper.


PyCEdit.GetLineCount

int = GetLineCount()

Gets the number of lines in an edit control.

MFC References

CEdit::GetLineCount

Return Value

The number of lines in the buffer. If the control is empty, the return value is 1.


PyCEdit.GetSel

(start, end) = GetSel()

Returns the start and end of the current selection.

MFC References

CEdit::GetSel

Return Value

The return tuple is (the first character in the current selection, first nonselected character past the end of the current selection)


PyCEdit.LimitText

LimitText(nChars)

Sets max length of text that user can enter

Parameters

nChars=0 : int

Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.

MFC References

CEdit::LimitText


PyCEdit.LineFromChar

int = LineFromChar(charNo)

Returns the line number of the specified character.

Parameters

charNo=-1 : int

Contains the zero-based index value for the desired character in the text of the edit control, or -1. If -1, then it specifies the current line.

MFC References

CEdit::LineFromChar

Return Value

The zero-based line number of the line containing the character index specified by charNo. If charNo is -1, the number of the line that contains the first character of the selection is returned. If there is no selection, the current line number is returned.


PyCEdit.LineIndex

int = LineIndex(lineNo)

Retrieves the character index of a line within a multiple-line edit control.

Parameters

lineNo=-1 : int

Contains the index value for the desired line in the text of the edit control, or contains -1. If -1, then it specifies the current line.

Comments

This method only works on multi-linr edit controls.

MFC References

CEdit::LineIndex

Return Value

The character index of the line specified in lineNo, or -1 if the specified line number is greater then the number of lines in the edit control.


PyCEdit.LineScroll

int = LineScroll(nLines, nChars )

Scroll the control vertically and horizontally

Parameters

nLines : int

Specifies the number of lines to scroll vertically.

nChars=0 : int

Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.

Comments

This method only works on multi-linr edit controls.

MFC References

CEdit::LineScroll


PyCEdit.Paste

Paste()

Pastes the contents of the clipboard into the control.

MFC References

CEdit::Paste


PyCEdit.ReplaceSel

ReplaceSel(text)

Replaces the selection with the specified text.

Parameters

text : string

The text to replace the selection with.

MFC References

CEdit::ReplaceSel


PyCEdit.SetReadOnly

SetReadOnly(bReadOnly)

Sets or clears the read-only status of the listbox.

Parameters

bReadOnly=1 : int

The read-only state to set.

MFC References

CEdit::SetReadOnly


PyCEdit.SetSel

SetSel(start, end, bNoScroll)

Sets the selection in the edit control.

Parameters

start : int

Specifies the starting position. If start is 0 and end is -1, all the text in the edit control is selected. If start is -1, any current selection is removed.

end=start : int

Specifies the ending position.

bNoScroll=0 : int

Indicates whether the caret should be scrolled into view. If 0, the caret is scrolled into view. If 1, the caret is not scrolled into view.

Alternative Parameters

start,end)

As for normal start, end args.

bNoScroll

Indicates whether the caret should be scrolled into view. If 0, the caret is scrolled into view. If 1, the caret is not scrolled into view.

MFC References

CEdit::SetSel


PyCEditView

PyCEditView Object

A class which implementes a CView of a text file. Derived from PyCView and PyCEdit objects.

Methods

IsModified
Indicates if the view's document is modified.

LoadFile
Loads a named file into the view.

SetModifiedFlag
Sets the view's document modified flag.

GetEditCtrl
Returns the underlying PyCEdit object

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

SaveFile
Saves the view to a named file.

OnCommand
Calls the standard Python framework OnCommand handler


PyCEditView.GetEditCtrl

PyCEditCtrl = GetEditCtrl()

returns the underlying edit control object.


PyCEditView.IsModified

int = IsModified()

Indicates if the view's document has the modified flag set.


PyCEditView.LoadFile

LoadFile(fileName)

Loads a file into the view.

Parameters

fileName : string

The name of the file to be loaded.


PyCEditView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCEditView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCEditView.SaveFile

SaveFile(fileName)

Saves the view to a file.

Parameters

fileName : string

The name of the file to be written.


PyCEditView.SetModifiedFlag

SetModifiedFlag(bModified)

Sets the modified flag for the view's document.

Parameters

bModified=1 : int

The modified state to set.


PyCFileDialog

PyCFileDialog Object

A class which encapsulates an MFC CFileDialog object. Derived from a PyCDialog object.

Methods

GetPathName
Retrieves the path name.

GetFileName
Retrieves the file name.

GetFileExt
Retrieves the file extension.

GetFileTitle
Retrieves the file title.

GetPathNames
Retrieves the list of path names from the file dialog.

GetReadOnlyPref
Retrieves the read-only preference.

SetOFNTitle
Sets the title for the dialog.

SetOFNInitialDir
Sets the initial directory for the dialog.


PyCFileDialog.GetFileExt

string = GetFileExt()

Retrives the file extension from the file dialog.

MFC References

CFileDialog::GetFileExt


PyCFileDialog.GetFileName

string = GetFileName()

Retrives the file name from the file dialog.

MFC References

CFileDialog::GetFileName


PyCFileDialog.GetFileTitle

string = GetFileTitle()

Retrives the file title from the file dialog.

MFC References

CFileDialog::GetFileTitle


PyCFileDialog.GetPathName

string = GetPathName()

Retrives the path name from the file dialog.

MFC References

CFileDialog::GetPathName


PyCFileDialog.GetPathNames

string = GetPathNames()

Retrieves the list of path names from the file dialog.

Comments

This method is useful when a multi-select dialog is used.

MFC References

CFileDialog::GetPathNames


PyCFileDialog.GetReadOnlyPref

int = GetReadOnlyPref()

Retrives the value of the "Read Only" checkbox on the file dialog.

MFC References

CFileDialog::GetReadOnlyPref


PyCFileDialog.SetOFNInitialDir

SetOFNInitialDir(title)

Sets the initial directory for the dialog.

Parameters

title : string

The initial directory for the dialog box. May be None.


PyCFileDialog.SetOFNTitle

SetOFNTitle(title)

Sets the Title for the dialog.

Parameters

title : string

The title for the dialog box. May be None.


PyCFont

PyCFont Object

A windows font object. Encapsulates an MFC CFont class. Derived from a PyCGDIObject.


PyCFontDialog

PyCFontDialog Object

A class which encapsulates an MFC CFontDialog object. Derived from a PyCDialog object.

Methods

DoModal
Displays a dialog and allows the user to make a selection.

GetCurrentFont
Returns a dictionary describing the current font.

GetCharFormat
Returns the font selection in a CHARFORMAT tuple.

GetColor
Determines the color of the selected font.

GetFaceName
Returns the face name of the selected font.

GetStyleName
Returns the style name of the selected font.

GetSize
Returns he font's size, in tenths of a point.

GetWeight
Returns the font's weight.

IsStrikeOut
Determines whether the font is displayed with strikeout.

IsUnderline
Determines whether the font is displayed with underline.

IsBold
Determines whether the font is displayed bold.

IsItalic
Determines whether the font is displayed with italic.


PyCFontDialog.DoModal

int = DoModal()

Displays a dialog and allows the user to make a selection.

MFC References

CFontDialog::DoModal


PyCFontDialog.GetCharFormat

tuple = GetCharFormat()

Returns the font selection in a CHARFORMAT tuple.

MFC References

CFontDialog::GetCharFormat


PyCFontDialog.GetColor

int = GetColor()

Determines the color of the selected font.

MFC References

CFontDialog::GetColor


PyCFontDialog.GetCurrentFont

dict = GetCurrentFont()

Returns a dictionary describing the current font.

MFC References

CFontDialog::GetCurrentFont


PyCFontDialog.GetFaceName

string = GetFaceName()

Returns the face name of the selected font.

MFC References

CFontDialog::GetFaceName


PyCFontDialog.GetSize

int = GetSize()

Returns he font's size, in tenths of a point.

MFC References

CFontDialog::GetSize


PyCFontDialog.GetStyleName

string = GetStyleName()

Returns the style name of the selected font.

MFC References

CFontDialog::GetStyleName


PyCFontDialog.GetWeight

int = GetWeight()

Returns the font's weight.

MFC References

CFontDialog::GetWeight


PyCFontDialog.IsBold

int = IsBold()

Determines whether the font is displayed bold.

MFC References

CFontDialog::IsBold


PyCFontDialog.IsItalic

int = IsItalic()

Determines whether the font is displayed with italic.

MFC References

CFontDialog::IsItalic


PyCFontDialog.IsStrikeOut

int = IsStrikeOut()

Determines whether the font is displayed with strikeout.

MFC References

CFontDialog::IsStrikeOut


PyCFontDialog.IsUnderline

int = IsUnderline()

Determines whether the font is displayed with underline.

MFC References

CFontDialog::IsUnderline


PyCFormView

PyCFormView Object

A class which implementes a CFormView (ie, a view based on a dialog resource.

Methods

OnCommand
Calls the standard Python framework OnCommand handler


PyCFormView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCFrameWnd

PyCFrameWnd Object

A windows frame window. Encapsulates an MFC CFrameWnd class. Derived from a PyCWnd object.

Methods

BeginModalState
Sets the frame window to modal.

CreateWindow
Creates the underlying window for the object.

EndModalState
Ends the frame window's modal state. Enables all of the windows disabled by PyCFrameWnd::BeginModalState.

DockControlBar
Docks a control bar.

EnableDocking
Enable dockable control bars in a frame window

FloatControlBar
Floats a control bar.

GetActiveDocument
Returns the currently active document

GetControlBar
Retrieves the specified control bar.

GetMessageString
Retrieves message corresponding to a command ID.

GetMessageBar
Retrieves the message bar for the frame.

IsTracking
Determines if splitter bar is currently being moved.

InModalState
Returns a value indicating whether or not a frame window is in a modal state.

LoadAccelTable
Loads an accelerator table.

LoadFrame
Creates the MDI Window's frame

LoadBarState
Loads a control bars settings

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

SaveBarState
Saves a control bars settings

ShowControlBar
Shows a control bar.

RecalcLayout
Called by the framework when the standard control bars are toggled on or off or when the frame window is resized.

GetActiveView
Retrieves the active view.

OnBarCheck
Changes the state of the specified controlbar.

OnUpdateControlBarMenu
Checks the state of a menu item

SetActiveView
Sets the active view for a frame.


PyCFrameWnd.BeginModalState

BeginModalState()

Sets the frame window to modal.


PyCFrameWnd.CreateWindow

tuple = CreateWindow(wndClass, title , style , rect , PyCWnd , createContext , pszMenuName , styleEx )

Creates the actual window for the PyCFrameWnd object.

Parameters

wndClass : string

The window class name, or None

title : string

The window title

style=WS_VISIBLE | WS_OVERLAPPEDWINDOW : int

The window style

rect=None : int, int, int, int

The default rectangle

PyCWnd=None : parent

The parent window

createContext=None : tuple

A tuple representing a CREATECONTEXT structure.

pszMenuName : string

The string id for the menu.

styleEx : int

The extended style of the window being created.

MFC References

CFrameWnd::Create


PyCFrameWnd.DockControlBar

DockControlBar(controlBar, dockBarId, int, int, int, int)

Docks a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

dockBarId=0 : int

Determines which sides of the frame window to consider for docking.

int, int, int, int=0,0,0,0 : left, top, right, bottom

Determines, in screen coordinates, where the control bar will be docked in the nonclient area of the destination frame window.

MFC References

CFrameWnd::DockControlBar


PyCFrameWnd.EnableDocking

EnableDocking(style)

Enable dockable control bars in a frame window

Parameters

style : int

Specifies which sides of the frame window can serve as docking sites for control bars.

Comments

By default, control bars will be docked to a side of the frame window in the following order: top, bottom, left, right.


PyCFrameWnd.EndModalState

EndModalState()

Ends the frame window's modal state. Enables all of the windows disabled by PyCFrameWnd::BeginModalState.


PyCFrameWnd.FloatControlBar

FloatControlBar(controlBar, int, int, style)

Floats a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

int, int : x,y

The location, in screen coordinates, where the top left corner of the control bar will be placed.

style=CBRS_ALIGN_TOP : int

Determines which sides of the frame window to consider for docking.

MFC References

CFrameWnd::FloatControlBar


PyCFrameWnd.GetActiveDocument

PyCDocument = GetActiveDocument()

Gets the currently active document, else None

MFC References

CFrameWnd::GetActiveDocument


PyCFrameWnd.GetActiveView

PyCView = GetActiveView()

Retrieves the active view.


PyCFrameWnd.GetControlBar

PyCControlBar = GetControlBar(id)

Retrieves the specified control bar.

Parameters

id : int

The ID of the toolbar to be retrieved


PyCFrameWnd.GetMessageBar

PyCWnd = GetMessageBar()

Retrieves the message bar for the frame.


PyCFrameWnd.GetMessageString

string = GetMessageString(id)

Retrieves message corresponding to a command ID.

Parameters

id : int

The ID to be retrieved

See Also

PyCMDIChildWnd.GetMessageString virtual method


PyCFrameWnd.InModalState

int = InModalState()

Returns a value indicating whether or not a frame window is in a modal state.


PyCFrameWnd.IsTracking

int = IsTracking()

Determines if splitter bar is currently being moved.


PyCFrameWnd.LoadAccelTable

LoadAccelTable()

Loads an accelerator table.


PyCFrameWnd.LoadBarState

LoadBarState(profileName)

Loads a control bars settings

Parameters

profileName : string

Name of a section in the initialization file or a key in the Windows registry where state information is stored.

MFC References

CFrameWnd::LoadBarState


PyCFrameWnd.LoadFrame

LoadFrame(idResource, style, wndParent, context)

Loads a Windows frame window and associated resources

Parameters

idResource=IDR_PYTHONTYPE : int

The Id of the resources (menu, icon, etc) for this window

style=-1 : long

The window style. Note -1 implies win32con.WS_OVERLAPPEDWINDOW|win32con.FWS_ADDTOTITLE

wndParent=None : PyCWnd

The parent of the window, or None.

context=None : object

An object passed to the OnCreateClient for the frame,

MFC References

CFrameWnd::LoadFrame


PyCFrameWnd.OnBarCheck

int = OnBarCheck(id)

Changes the state of the specified controlbar.

Parameters

id : int

The control ID of the control bar.


PyCFrameWnd.OnUpdateControlBarMenu

int = OnUpdateControlBarMenu(cmdUI)

Checks the state of a menu item

Parameters

cmdUI : PyCCmdUI

A cmdui object


PyCFrameWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCFrameWnd.RecalcLayout

RecalcLayout(bNotify)

Called by the framework when the standard control bars are toggled on or off or when the frame window is resized.

Parameters

bNotify=1 : int

Notify flag

MFC References

CFrameWnd::RecalcLayout


PyCFrameWnd.SaveBarState

SaveBarState(profileName)

Saves a control bars settings

Parameters

profileName : string

Name of a section in the initialization file or a key in the Windows registry where state information is stored.

MFC References

CFrameWnd::SaveBarState


PyCFrameWnd.SetActiveView

SetActiveView(view, bNotify)

Sets the active view for a frame.

Parameters

view : PyCView

The view to set active.

bNotify=1 : int

Specifies whether the view is to be notified of activation. If TRUE, OnActivateView is called for the new view; if FALSE, it is not.


PyCFrameWnd.ShowControlBar

ShowControlBar(controlBar, bShow, bDelay)

Shows a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

bShow : int

Show or hide flag.

bDelay : int

If TRUE, delay showing the control bar. If FALSE, show the control bar immediately.

MFC References

CFrameWnd::ShowControlBar


PyCGdiObject

PyCGdiObject Object

A class which encapsulates an MFC CGdiObject.


PyCImageList

PyCImageList Object

A Python type encapsulating an MFC CImageList class.

Methods

Add
Adds an icon to the image list.

Destroy
Destroys the underlying MFC imagelist object.

DeleteImageList
Deletes an image list.

GetBkColor
Retrieves the background color of an Image List.

GetSafeHandle
Retrieves the HIMAGELIST for the object

GetImageCount
Retrieves the number of images in an image list.

GetImageInfo
Retrieves information about an image.

SetBkColor
Sets the background color for an Image List.


PyCImageList.Add

int = Add(bitmap, bitmapMask)

Adds an image to the list.

Parameters

bitmap, bitmapMask : (int,int)

2 Bitmaps to use (primary and mask)

Alternative Parameters

bitmap

Bitmap to use

color

Color to use for the mask.

Alternative Parameters

hIcon

Handle of an icon to add.

Return Value

Zero-based index of the first new image.


PyCImageList.DeleteImageList

DeleteImageList()

Deletes an image list.

Comments

This frees all resources associated with an image list. No further operations on the object will be allowed.


PyCImageList.Destroy

Destroy()

Destroys the underlying CImageList

Comments

This method actually calls delete() on the CImageList - you should ensure that no controls still require access to this list.


PyCImageList.GetBkColor

int = GetBkColor()

Retrieves the background color of an Image List.


PyCImageList.GetImageCount

int = GetImageCount()

Retrieves the number of images in an image list.


PyCImageList.GetImageInfo

iiii(iiii) = GetImageInfo(index)

Retrieves information about an image.

Parameters

index : int

Index of image.

Return Value

The return info is a tuple describing an IMAGELIST structure.


PyCImageList.GetSafeHandle

int = GetSafeHandle()

Retrieves the HIMAGELIST for the object


PyCImageList.SetBkColor

SetBkColor(color)

Sets the background color for an Image List.

Parameters

color : int

The new background color.


PyCListBox

PyCListBox Object

A windows listbox control. Encapsulates an MFC CListBox class. Derived from a PyCControl object.

Methods

AddString
Add a string to the listbox.

DeleteString
Delete a string from the listbox.

Dir
Fill a listbox with a file specification.

GetCaretIndex
Get the index of the item with the focus rectangle.

GetCount
Get the count of items in the listbox.

GetCurSel
Get the current selection in a single selection listbox.

GetItemData
Retrieves the application-specific object associated with a listbox entry

GetItemValue
Retrieves the application-specific value associated with a listbox entry

GetSel
Get the selected items in a multiple selection listbox.

GetSelCount
Get the number of selected items in a multtiple selection listbox.

GetSelItems
Get the index of the selected items in a multiple selection listbox.

GetSelTextItems
Get the text of the selected items in a multiple selection listbox.

GetTopIndex
Get the index of the topmost item.

GetText
Get the text associated with an item.

GetTextLen
Get the length of an item

InsertString
Insert a string into the listbox.

ResetContent
Remove all items from a listbox.

SetCaretIndex
Set the focus rectange to a specified item.

SelectString
Select an item, based on a string.

SelItemRange
Select a range of items in a multiple selection listbox.

SetCurSel
Set the current selection in a single selection listbox.

SetItemData
Sets the application-specific object associated with a listbox entry

SetItemValue
Sets the application-specific value associated with a listbox entry

SetSel
Set the selection.

SetTabStops
Set the tab stops for a listbox.

SetTopIndex
Set the top most visible item in a listbox.


PyCListBox.AddString

int = AddString(object)

Adds a string to a listbox.

Parameters

object : any

Any object. If not a string, __str__, __repr__ or a default repr() will be used

MFC References

CListBox::AddString

Return Value

The zero based index of the new string.


PyCListBox.DeleteString

int = DeleteString(pos)

Deletes an item from a listbox.

Parameters

pos : int

The zero based index of the item to delete.

MFC References

CListBox::DeleteString

Return Value

The count of the items remaining in the list.


PyCListBox.Dir

int = Dir(attr, wild )

Fills a listbox with a directory listing.

Parameters

attr : int

The attributes of the files to locate

wild : string

A file specification string - eg, *.*

MFC References

CListBox::Dir

Return Value

The index of the last file name added to the list.


PyCListBox.GetCaretIndex

int = GetCaretIndex()

Returns the index of the item which has focus.

Return Value

The zero-based index of the item that has the focus rectangle in a list box. If the list box is a single-selection list box, the return value is the index of the item that is selected, if any.


PyCListBox.GetCount

int = GetCount()

Returns the count of items in the listbox.

MFC References

CListBox::GetCount

Return Value

Returns the number of items currently in the listbox.


PyCListBox.GetCurSel

int = GetCurSel()

Returns the index of the currently selected item.

Comments

Should not be called for a multiple selection listbox.

MFC References

CListBox::GetCurSel


PyCListBox.GetItemData

object = GetItemData(item)

Retrieves the application-specific object associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListBox.GetItemValue

int = GetItemValue(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListBox.GetSel

int = GetSel(index)

Returns the selection state of a specified item.

Parameters

index : int

The index of the item to return the state for.

MFC References

CListBox::GetSel

Return Value

A +ve number if the item is selected, else zero.


PyCListBox.GetSelCount

int = GetSelCount()

Returns the number of selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount


PyCListBox.GetSelItems

list = GetSelItems()

Returns a list of the indexes of the currently selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount

CListBox::GetSelItems


PyCListBox.GetSelTextItems

list = GetSelTextItems()

Returns a list of the strings of the currently selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount

CListBox::GetSelItems

CListBox::GetText


PyCListBox.GetText

string = GetText(index)

Returns the string for a specified item.

Parameters

index : int

The index of the item to retrieve the text of


PyCListBox.GetTextLen

int = GetTextLen(index)

Returns the length of the string for a specified item.

Parameters

index : int

The index of the item to retrieve the length of the text.

MFC References

CListBox::GetTextLen


PyCListBox.GetTopIndex

int = GetTopIndex()

Returns the index of the top most visible item.

MFC References

CListBox::GetTopIndex

Return Value

The zero based index of the top most visible item.


PyCListBox.InsertString

int = InsertString(pos, object )

Insert a string into a listbox.

Parameters

pos : int

The zero based index in the listbox to insert the new string

object : any

The object to be added to the listbox

MFC References

CListBox::InsertString

Return Value

The zero based index of the new string added.


PyCListBox.ResetContent

ResetContent()

Clear all the items from a listbox.

MFC References

CListBox::ResetContent


PyCListBox.SelItemRange

SelItemRange(bSel, start, end)

Selects an item range.

Parameters

bSel : int

Should the selection specified be set or cleared?

start : int

The zero based index of the first item to select.

end : int

The zero based index of the last item to select.


PyCListBox.SelectString

SelectString(after, string)

Searches for a list-box item that matches the specified string, and selects it.

Parameters

after : int

Contains the zero-based index of the item before the first item to be searched, or -1 for the entire listbox.

string : string

The string to search for.

MFC References

CListBox::SelectString

Return Value

The return value is always None - an exception is raised if the string can not be located.


PyCListBox.SetCaretIndex

SetCaretIndex(index, bScroll)

Sets the focus rectange to a specified item.

Parameters

index : int

The zero based index of the item.

bScroll=1 : int

Should the listbox scroll to the item?

MFC References

CListBox::SetCaretIndex


PyCListBox.SetCurSel

SetCurSel(index)

Selects an item in a single selection listbox.

Parameters

index : int

The zero based index of the item to select.

MFC References

CListBox::SetCurSel


PyCListBox.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific object value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCListBox.SetItemValue

int = SetItemValue(item, data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

data : int

New value for the data.


PyCListBox.SetSel

SetSel(index, bSel)

Selects an item in a multiple selection listbox.

Parameters

index : int

The zero based index of the item to select.

bSel=1 : int

Should the item be selected or deselected?

MFC References

CListBox::SetSel


PyCListBox.SetTabStops

SetTabStops(eachTabStop)

Sets the tab stops for a listbox.

Parameters

eachTabStop : int

The position for each tab stop.

Alternative Parameters

tabStops

Each individual tab stop.


PyCListBox.SetTopIndex

SetTopIndex(index)

Sets the top index (top most visible item) of the listbox.

Parameters

index : int

The zero based index of the item to place at the top of the list.

MFC References

CListBox::SetTopIndex


PyCListCtrl

PyCListCtrl Object

A class which encapsulates an MFC CListCtrl object. Derived from a PyCWnd object.

Methods

Arrange
Aligns items on a grid.

CreateWindow
Creates the actual window for the object.

DeleteAllItems
Deletes all items from the list.

DeleteItem
Deletes the specified item.

GetTextColor
Retrieves the text color of a list view control.

SetTextColor
Sets the text color of a list view control.

GetBkColor
Retrieves the background color of the control.

SetBkColor
Sets the background color of the control.

GetItem
Retrieves the details of an items attributes.

GetItemCount
Retrieves the number of items in a list view control.

GetItemRect
Retrieves the bounding rectangle of a list view item.

GetEditControl
Retrieves the handle of the edit control used to edit the specified list view item.

EditLabel
Edits a specified list view item in-place.

EnsureVisible
Ensures that a list view item is visible in its list view control.

CreateDragImage
Creates a dragging bitmap for the specified list view item.

GetImageList
Retrieves the current image list.

GetNextItem
Searches for a list view item with specified properties and with specified relationship to a given item.

InsertColumn
Inserts a column into a list control when in report view.

InsertItem
Inserts an item into the list.

SetImageList
Assigns an image list to a list view control.

GetColumn
Retrieves the details of a column in the control.

GetTextBkColor
Retrieves the text background color of a list view control.

SetTextBkColor
Sets the text background color of a list view control.

GetTopIndex
Retrieves the index of the topmost visible item.

GetCountPerPage
Calculates the number of items that can fit vertically in a list view control.

GetSelectedCount
Retrieves the number of selected items in the list view control.

SetItem
Sets some of all of an items attributes.

SetItemState
Changes the state of an item in a list view control.

GetItemState
Retrieves the state of a list view item.

SetItemData
Sets the item's application-specific value.

GetItemData
Retrieves the application-specific value associated with an item.

SetItemCount
Prepares a list view control for adding a large number of items.

GetItemCount
Retrieves the number of items in a list view control.

SetItemText
Changes the text of a list view item or subitem.

GetItemText
Retrieves the text of a list view item or subitem.

RedrawItems
Redraws a range of items

Update
Forces the control to repaint a specified item.

SetColumn
Sets the state of a column in a list control when in report view.

DeleteColumn
Deletes the specified column from the list control.

GetColumnWidth
Gets the width of the specified column in the list control.

SetColumnWidth
Sets the width of the specified column in the list control.

GetStringWidth
Gets the necessary column width to fully display this text in a column.

HitTest
Determines which list view item, if any, is at a specified position.

GetItemPosition
Determines the position of the specified item.


PyCListCtrl.Arrange

Arrange(code)

Aligns items on a grid.

Parameters

code : int

Specifies the alignment style for the items


PyCListCtrl.CreateDragImage

PyCImageList,(x,y) = CreateDragImage(item)

Creates a dragging bitmap for the specified list view item.

Parameters

item : int

The index of the item to edit.


PyCListCtrl.CreateWindow

CreateWindow(style, rect, PyCWnd, id)

Creates the actual window for the object.

Parameters

style : int

The window style

rect : int, int, int, int

The default rectangle

PyCWnd : parent

The parent window

id : int

The control ID

MFC References

CListCtrl::Create


PyCListCtrl.DeleteAllItems

DeleteAllItems()

Deletes all items from the list.


PyCListCtrl.DeleteColumn

int = DeleteColumn(first)

Deletes the specified column from the list control.

Parameters

first : int

Index of the column to be removed.


PyCListCtrl.DeleteItem

DeleteItem(item)

Deletes the specified item.

Parameters

item : int

The item to delete.


PyCListCtrl.EditLabel

PyCEdit = EditLabel(item)

Edits a specified list view item in-place.

Parameters

item : int

The index of item to edit.


PyCListCtrl.EnsureVisible

int = EnsureVisible(item, bPartialOK )

Ensures that a list view item is visible in its list view control.

Parameters

item : int

The index of item to edit.

bPartialOK : int

Specifies whether partial visibility is acceptable.


PyCListCtrl.GetBkColor

int = GetBkColor()

Retrieves the background color of the control.


PyCListCtrl.GetColumn

PyCListCtrl::LV_COLUMN tuple = GetColumn(column)

Retrieves the details of a column in the control.

Parameters

column : int

The index of the column whose attributes are to be retrieved.


PyCListCtrl.GetColumnWidth

int = GetColumnWidth(first)

Gets the width of the specified column in the list control.

Parameters

first : int

Index of the column whose width is to be retrieved.


PyCListCtrl.GetCountPerPage

int = GetCountPerPage()

Calculates the number of items that can fit vertically in a list view control.


PyCListCtrl.GetEditControl

PyCEdit = GetEditControl()

Retrieves the handle of the edit control used to edit the specified list view item.


PyCListCtrl.GetImageList

PyCImageList = GetImageList(nImageList)

Retrieves the current image list.

Parameters

nImageList : int

Value specifying which image list to retrieve. It can be one of:
- commctrl.LVSIL_NORMAL Image list with large icons.
- commctrl.LVSIL_SMALL Image list with small icons.
- commctrl.LVSIL_STATE Image list with state images.


PyCListCtrl.GetItem

PyCListCtrl::LV_ITEM tuple = GetItem(item, sub )

Retrieves the details of an items attributes.

Parameters

item : int

The index of the item whose attributes are to be retrieved.

sub : int

Specifies the subitem whose text is to be retrieved.


PyCListCtrl.GetItemCount

int = GetItemCount()

Retrieves the number of items in a list view control.


PyCListCtrl.GetItemData

object = GetItemData(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListCtrl.GetItemPosition

(int, int) = GetItemPosition(item)

Determines the position of the specified item.

Parameters

item : int

The item to determine the position for.


PyCListCtrl.GetItemRect

(int, int, int, int) = GetItemRect(item, bTextOnly )

Retrieves the bounding rectangle of a list view item.

Parameters

item : int

Index of the item whose Data is to be set.

bTextOnly : int

f this parameter is nonzero, the bounding rectangle includes only the text of the item. Otherwise it includes the entire line that the item occupies in the list view control.


PyCListCtrl.GetItemState

int = GetItemState(item, mask )

Retrieves the state of a list view item.

Parameters

item : int

The index of the item whose position is to be retrieved.

mask : int

Mask specifying which of the item's state flags to return.


PyCListCtrl.GetItemText

int = GetItemText(item, sub )

Retrieves the text of a list view item or subitem.

Parameters

item : int

The index of the item whose text is to be retrieved.

sub : int

Specifies the subitem whose text is to be retrieved.


PyCListCtrl.GetNextItem

int = GetNextItem(item, flags )

Searches for a list view item with specified properties and with specified relationship to a given item.

Parameters

item : int

Index of the item to begin the searching with, or -1 to find the first item that matches the specified flags. The specified item itself is excluded from the search.

flags : int

Geometric relation of the requested item to the specified item, and the state of the requested item. The geometric relation can be one of these values:
LVNI_ABOVE
LVNI_ALL
LVNI_BELOW
LVNI_TOLEFT
LVNI_TORIGHT
The state can be zero, or it can be one or more of these values:
LVNI_DROPHILITED
LVNI_FOCUSED
LVNI_HIDDEN
LVNI_MARKED
LVNI_SELECTED
If an item does not have all of the specified state flags set, the search continues with the next item.

Return Value

Returns an integer index, or raises a win32ui.error exception if not item can be found.


PyCListCtrl.GetSelectedCount

int = GetSelectedCount()

Retrieves the number of selected items in the list view control.


PyCListCtrl.GetStringWidth

int = GetStringWidth(first)

Gets the necessary column width to fully display this text in a column.

Parameters

first : int

String that contains the text whose width is to be determined.

Comments

Doesn't take the size of an included Image in account, only the size of the text is determined.


PyCListCtrl.GetTextBkColor

int = GetTextBkColor()

Retrieves the text background color of a list view control.


PyCListCtrl.GetTextColor

int = GetTextColor()

Retrieves the text color of a list view control.


PyCListCtrl.GetTopIndex

int = GetTopIndex()

Retrieves the index of the topmost visible item.


PyCListCtrl.HitTest

(int, int, int) = HitTest(x,y)

Determines which list view item, if any, is at a specified position.

Parameters

x,y : point

The point to test.

Return Value

The result is a tuple of (flags, item, subItem). flags may be a combination of the following values:

Value | Description
commctrl.LVHT_ABOVE | The position is above the control's client area.
commctrl.LVHT_BELOW | The position is below the control's client area.
commctrl.LVHT_NOWHERE | The position is inside the list view control's client window, but it is not over a list item.
commctrl.LVHT_ONITEMICON | The position is over a list view item's icon.
commctrl.LVHT_ONITEMLABEL | The position is over a list view item's text.
commctrl.LVHT_ONITEMSTATEICON | The position is over the state image of a list view item.
commctrl.LVHT_TOLEFT | The position is to the left of the list view control's client area.
commctrl.LVHT_TORIGHT | The position is to the right of the list view control's client area.


PyCListCtrl.InsertColumn

int = InsertColumn(colNo, item )

Inserts a column into a list control when in report view.

Parameters

colNo : int

The new column number

item : PyCListCtrl::LV_COLUMN tuple

A tuple describing the new column.


PyCListCtrl.InsertItem

int = InsertItem(item)

Inserts an item into the list.

Parameters

item : PyCListCtrl::LV_ITEM tuple

A tuple describing the new item.

Alternative Parameters

item

The index of the item.

text

The text of the item.

image

The index of the image to use.

Alternative Parameters

item

The index of the item.

text

The text of the item.


PyCListCtrl.RedrawItems

int = RedrawItems(first, first )

Forces a listview to repaint a range of items.

Parameters

first : int

Index of the first item to be repainted.

first : int

Index of the last item to be repainted.

Comments

The specified items are not actually repainted until the list view window receives a WM_PAINT message. To repaint immediately, call the Windows UpdateWindow function after using this function.


PyCListCtrl.SetBkColor

SetBkColor(color)

Sets the background color of the control.

Parameters

color : int

The new background color.


PyCListCtrl.SetColumn

int = SetColumn(colNo, item )

Changes column state in a list control when in report view.

Parameters

colNo : int

The to be modified column number

item : PyCListCtrl::LV_COLUMN tuple

A tuple describing the modified column.


PyCListCtrl.SetColumnWidth

int = SetColumnWidth(first, first )

Sets the width of the specified column in the list control.

Parameters

first : int

Index of the column to be changed.

first : int

New width of the column.


PyCListCtrl.SetImageList

int = SetImageList(imageList, imageType )

Assigns an image list to a list view control.

Parameters

imageList : PyCImageList

The Image List to use.

imageType : int

Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE


PyCListCtrl.SetItem

int = SetItem(item)

Sets some of all of an items attributes.

Parameters

item : PyCListCtrl::LV_ITEM tuple

A tuple describing the new item.


PyCListCtrl.SetItemCount

SetItemCount(count)

Prepares a list view control for adding a large number of items.

Parameters

count : int

Number of items that the control will ultimately contain.

Comments

By calling this function before adding a large number of items, you enable a list view control to reallocate its internal data structures only once rather than every time you add an item.


PyCListCtrl.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCListCtrl.SetItemState

int = SetItemState(item, state , mask )

Changes the state of an item in a list view control.

Parameters

item : int

Index of the item whose state is to be set.

state : int

New values for the state bits.

mask : int

Mask specifying which state bits to change.


PyCListCtrl.SetItemText

int = SetItemText(item, sub , text )

Changes the text of a list view item or subitem.

Parameters

item : int

Index of the item whose text is to be set.

sub : int

Index of the subitem, or zero to set the item label.

text : string

String that contains the new item text.


PyCListCtrl.SetTextBkColor

SetTextBkColor(color)

Sets the text background color of a list view control.

Parameters

color : int

The new background color.


PyCListCtrl.SetTextColor

SetTextColor(color)

Sets the text color of a list view control.

Parameters

color : int

The new color.


PyCListCtrl.Update

Update(item)

Forces the control to repaint a specified item.

Parameters

item : int

The new color.


PyCListView

PyCListView Object

A class which implementes a CListView. Derived from PyCView and PyCListCtrl objects.

Methods

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

GetListCtrl
Returns the underlying list control object.

OnCommand
Calls the standard Python framework OnCommand handler


PyCListView.GetListCtrl

PyCListCtrl = GetListCtrl()

Returns the underlying list control object.


PyCListView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCListView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCMDIChildWnd

PyCMDIChildWnd Object

A windows frame window. Encapsulates an MFC CMDIChildWindow class

Methods

ActivateFrame
Calls the underlying MFC ActivateFrame method.

CreateWindow
Creates the actual window for the PyCWnd object.

GetMDIFrame
Returns the MDI parent frame

MDIActivate
Activates the MDI frame independent of the main frame.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PreTranslateMessage
Calls the underlying MFC PreTranslateMessage method.

OnCommand
Calls the standard Python framework OnCommand handler

OnClose
Calls the standard Python framework OnClose handler


PyCMDIChildWnd.ActivateFrame

ActivateFrame(cmdShow)

Calls the underlying MFC ActivateFrame method.

Parameters

cmdShow=-1 : int

The status of the window.

See Also

PyCMDIChildWnd.ActivateFrame virtual method


PyCMDIChildWnd.CreateWindow

tuple = CreateWindow(wndClass, title , style , rect , PyCWnd , createContext )

Creates the actual window for the PyCWnd object.

Parameters

wndClass : string

The window class name, or None

title : string

The window title

style=WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW : int

The window style

rect=None : int, int, int, int

The default rectangle

PyCWnd=None : parent

The parent window

createContext=None : tuple

A tuple representing a CREATECONTEXT structure.

Comments

You do not need to call this method if you use the MFC Document/View framework.


PyCMDIChildWnd.GetMDIFrame

GetMDIFrame()

Returns the MDI parent frame


PyCMDIChildWnd.MDIActivate

MDIActivate(cmdShow)

Activates the MDI frame independent of the main frame.

Parameters

cmdShow=-1 : int

The status of the window.

See Also

PyCWnd.OnMDIActivate virtual method


PyCMDIChildWnd.OnClose

OnClose()

Calls the standard Python framework OnClose handler

See Also

PyCWnd.OnClose virtual method


PyCMDIChildWnd.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCMDIChildWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCMDIChildWnd.PreTranslateMessage

PreTranslateMessage()

Calls the base PreTranslateMessage handler

See Also

PyCWnd.PreTranslateMessage virtual method


PyCMDIFrameWnd

PyCMDIFrameWnd Object

A main application frame window. Encapsulates an MFC CMDIFrameWnd class

Methods

GetMDIClient
Returns the MDI client window

MDIGetActive
Retrieves the current active MDI child window, along with a flag indicating whether the child window is maximized.

MDIActivate
Activate an MDI child window

MDINext
Activates the next MDI window

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PreTranslateMessage
Calls the underlying MFC PreTranslateMessage method.

OnCommand
Calls the standard Python framework OnCommand handler

OnContextHelp
Calls the underlying MFC OnContextHelp method.

OnClose
Calls the standard Python framework OnClose handler


PyCMDIFrameWnd.GetMDIClient

PyCMDIFrameWnd = GetMDIClient()

Returns the MDI client window


PyCMDIFrameWnd.MDIActivate

PyCMDIFrameWnd = MDIActivate(window)

Activate an MDI child window

Parameters

window : PyCWnd

The window to activate.


PyCMDIFrameWnd.MDIGetActive

(PyCMDIChildWnd, int) = MDIGetActive()

Retrieves the current active MDI child window, along with a flag indicating whether the child window is maximized.


PyCMDIFrameWnd.MDINext

MDINext(fNext)

Activates the next MDI window

Parameters

fNext=0 : int

Indicates if the next (0) or previous (non-zero) window is requested.

Comments

Unlike MFC, this version supports the fNext param in the WM_MDINEXT message.


PyCMDIFrameWnd.OnClose

OnClose()

Calls the standard Python framework OnClose handler


PyCMDIFrameWnd.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCMDIFrameWnd.OnContextHelp

None = OnContextHelp()

Calls the underlying MFC OnContextHelp method.


PyCMDIFrameWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCMDIFrameWnd.PreTranslateMessage

PreTranslateMessage()

Calls the base PreTranslateMessage handler

See Also

PyCWnd.PreTranslateMessage virtual method


PyCMenu

PyCMenu Object

A windows menu. Encapsulates an MFC CMenu class

Methods

AppendMenu
Appends a new item to the end of a menu. Python can specify the state of the menu item by setting values in nFlags.

DeleteMenu
Deletes the specified menu item.

EnableMenuItem
Enables, disables, or dims a menu item.

GetHandle
Returns the menu object's underlying hMenu.

GetMenuItemCount
Determines the number of items in a menu.

GetMenuItemID
Returns the item ID for the specified item in a pop-up menu.

GetMenuString
Returns the string for a specified menu item.

GetSubMenu
Returns a submenu.

InsertMenu
Inserts an item into a menu.

ModifyMenu
Modify an item in a menu.

TrackPopupMenu
Creates a popup menu anywhere on the screen.


PyCMenu.AppendMenu

AppendMenu(flags, id, value)

Appends a new item to the end of a menu. Python can specify the state of the menu item by setting values in nFlags.

Parameters

flags : int

Specifies information about the state of the new menu item when it is added to the menu. May be a combination of the win32con.MF_* values.

id=0 : int

Specifies either the command ID of the new menu item.

value=None : string/None

Specifies the content of the new menu item. If used, flags must contain win32con.MF_STRING.


PyCMenu.DeleteMenu

string = DeleteMenu(id, flags )

Deletes the specified menu item.

Parameters

id : int

The id of the item being deleted.

flags : int

Specifies how the id parameter is interpreted. It must be one of win32con.MF_BYCOMMAND or win32con.MF_BYPOSITION.


PyCMenu.EnableMenuItem

int = EnableMenuItem(id, flags )

Enables, disables, or dims a menu item.

Parameters

id : int

Specifies the command ID of the menu item. This parameter can specify pop-up menu items as well as standard menu items.

flags : int

Specifies the action to take. It can be a combination of MF_DISABLED, MF_ENABLED, or MF_GRAYED, with MF_BYCOMMAND or MF_BYPOSITION

Comments

The PyCMenu::CreateMenu , PyCMenu::InsertMenu, PyCMenu::ModifyMenu, and PyCMenu::LoadMenuIndirect member functions can also set the state (enabled, disabled, or dimmed) of a menu item.


PyCMenu.GetHandle

int = GetHandle()

Returns the menu object's underlying hMenu.


PyCMenu.GetMenuItemCount

int = GetMenuItemCount()

Determines the number of items in a menu.

Return Value

The number of items in the menu if the function is successful; otherwise -1.


PyCMenu.GetMenuItemID

int = GetMenuItemID(pos)

Returns the item ID for the specified item in a pop-up menu.

Parameters

pos : int

The position (zero-based) of the menu item whose ID is being retrieved.

Comments

If the specified item is a pop-up menu (as opposed to an item within the pop-up menu), the return value is -1. If nPos corresponds to a SEPARATOR menu item, the return value is 0.


PyCMenu.GetMenuString

string = GetMenuString(id, flags )

Returns the string for a specified menu item.

Parameters

id : int

The id of the item being requested.

flags=win32con.MF_BYCOMMAND : int

Specifies how the id parameter is interpreted. It must be one of win32con.MF_BYCOMMAND or win32con.MF_BYPOSITION.


PyCMenu.GetSubMenu

PyCMenu = GetSubMenu(pos)

Returns a submenu.

Parameters

pos : int

The position (zero-based) of the menu item being retrieved.


PyCMenu.InsertMenu

InsertMenu(pos, flags, id, value)

Inserts an item into a menu.

Parameters

pos : int

The position (zero-based) the item should be inserted.

flags : int

Flags for the new item.

id=0 : int

The ID for the new item.

value=None : string/None

A string for the menu item.

Alternative Parameters

pos

The position (zero-based) the item should be inserted.

flags

Flags for the new item.

id

The ID for the new item.

value

A string for the menu item.


PyCMenu.ModifyMenu

ModifyMenu(pos, flags, id, value)

Modify an item in a menu.

Parameters

pos : int

The position (zero-based) the item to be changed.

flags : int

Flags for the item.

id=0 : int

The ID for the item.

value=None : string/None

A string for the menu item.


PyCMenu.TrackPopupMenu

TrackPopupMenu((x,y), flags, owner)

Creates a popup menu anywhere on the screen.

Parameters

(x,y) : (int, int)

The position for the menu..

flags=win32con.TPM_LEFTALIGN|win32con.TPM_LEFTBUTTON|win32con.TPM_RIGHTBUTTON : int

Flags for the menu.

owner=(main application frame) : PyCWnd

The owner of the menu.

Comments

The TrackPopupMenu function displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu. The floating pop-up menu can appear anywhere on the screen.

Return Value

If the underlying MFC function fails, but TPM_RETURNCMD is set in the flags parameter, then None is returned instead of the normal exception.


PyCOleClientItem

PyCOleClientItem Object

An OLE client item class. Encapsulates an MFC COleClientItem class

Methods

CreateNewItem
Creates an embedded item.

Close
Closes the item.

DoVerb
Executes the specified verb.

Draw
Draws the OLE item into the specified bounding rectangle using the specified device context.

GetActiveView
Obtains the active view for the item

GetDocument
Obtains the current document for the item

GetInPlaceWindow
Obtains the window in which the item has been opened for in-place editing.

GetItemState
Obtains the OLE item's current state

GetObject
Returns the COM object to the item. This is the m_lpObject variable in MFC.

GetStorage
Returns the COM object used for storage

OnActivate
Calls the underlying MFC handler.

OnChange
Calls the underlying MFC handler.

OnChangeItemPosition
Calls the underlying MFC method.

OnDeactivateUI
Calls the underlying MFC method.

Run
Runs the application associated with this item.

SetItemRects
Sets the bounding rectangle or the visible rectangle of the OLE item.


PyCOleClientItem.Close

Close()

Closes the item


PyCOleClientItem.CreateNewItem

CreateNewItem()

Creates an embedded item.


PyCOleClientItem.DoVerb

DoVerb()

Executes the specified verb.


PyCOleClientItem.Draw

Draw()

Draws the OLE item into the specified bounding rectangle using the specified device context.


PyCOleClientItem.GetActiveView

PyCView = GetActiveView()

Obtains the active view for the item


PyCOleClientItem.GetDocument

PyCDocument = GetDocument()

Obtains the current document for the item


PyCOleClientItem.GetInPlaceWindow

PyCWnd = GetInPlaceWindow()

Obtains the window in which the item has been opened for in-place editing.


PyCOleClientItem.GetItemState

GetItemState()

Obtains the OLE item's current state


PyCOleClientItem.GetObject

PyIUnknown = GetObject()

Returns the COM object to the item. This is the m_lpObject variable in MFC.


PyCOleClientItem.GetStorage

GetStorage()

Returns the COM object used for storage


PyCOleClientItem.OnActivate

OnActivate()

Calls the underlying MFC method.


PyCOleClientItem.OnChange

OnChange()

Calls the underlying MFC method.


PyCOleClientItem.OnChangeItemPosition

int = OnChangeItemPosition()

Calls the underlying MFC method.

Return Value

The result is a BOOL indicating if the function succeeded. No exception is thrown.


PyCOleClientItem.OnDeactivateUI

int = OnDeactivateUI()

Calls the underlying MFC method.


PyCOleClientItem.Run

Run()

Runs the application associated with this item.


PyCOleClientItem.SetItemRects

SetItemRects()

Sets the bounding rectangle or the visible rectangle of the OLE item.


PyCOleDialog

PyCOleDialog Object

An abstract class which encapsulates an MFC COleDialog object. Derived from a PyCCommonDialog object.


PyCOleDocument

PyCOleDocument Object

An OLE document class. Encapsulates an MFC COleDocument class

Methods

EnableCompoundFile
Call this function if you want to store the document using the compound-file format

GetStartPosition
Obtains the position of the first item in the document.

GetNextItem
Call this function repeatedly to access each of the items in your document.

GetInPlaceActiveItem
Obtains the OLE item that is currently activated in place in the frame window containing the view identified by obWnd. sentinel


PyCOleDocument.EnableCompoundFile

EnableCompoundFile(bEnable)

Call this function if you want to store the document using the compound-file format.

Parameters

bEnable=1 : int

Specifies whether compound file support is enabled or disabled.


PyCOleDocument.GetInPlaceActiveItem

PyCOleClientItem = GetInPlaceActiveItem(wnd)

Obtains the OLE item that is currently activated in place in the frame window containing the view identified by obWnd.

Parameters

wnd : PyCWnd

The window.


PyCOleDocument.GetNextItem

(POSITION, PyCOleClientItem) = GetNextItem(pos)

Call this function repeatedly to access each of the items in your document.

Parameters

pos : POSITION

The position to iterate from.


PyCOleDocument.GetStartPosition

POSITION = GetStartPosition()

Obtains the position of the first item in the document.


PyCOleInsertDialog

PyCOleInsertDialog Object

An OLE 'Insert Object' dialog. Encapsulates an MFC COleInsertDialog class

Methods

GetClassID
Returns the CLSID associated with the selected item

GetSelectionType
Returns the type of selection made

GetPathName
Returns the full path to the file selected in the dialog box


PyCOleInsertDialog.GetClassID

CLSID = GetClassID()

Returns the CLSID associated with the selected item


PyCOleInsertDialog.GetPathName

CLSID = GetPathName()

Returns the full path to the file selected in the dialog box

Comments

Do not call this if the selection type is createNewItem,


PyCOleInsertDialog.GetSelectionType

CLSID = GetSelectionType()

Returns the type of selection made


PyCPrintDialog

PyCPrintDialog Object

An object which encapsulates an MFC CPrintDialog object.


PyCPrintDialog.OnCancel

PyCPrintDialog.OnCancel Virtual

OnCancel()

Called by the MFC architecture when the user selects the Cancel button.

Comments

The procedure is expected to dismiss the window with the PyCPrintDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCPrintDialog::OnCancel .

See Also

PyCDialog::OnCancel


PyCPrintDialog.OnOK

PyCPrintDialog.OnOK Virtual

OnOK()

Called by the MFC architecture when the user selects the OK button.

Comments

The procedure is expected to dismiss the window with the PyCPrintDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCPrintDialog::OnOK .

See Also

PyCDialogDialog::OnOK


PyCPrintInfo

PyCPrintInfo Object

Encapsulates an MFC CPrintInfo class, its member CPrintDialog class, and the PRINTDLG structure member of the CPrintDialog.

Methods

DocObject
A flag indicating whether the document being printed is a DocObject.

GetDwFlags
A flags specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

SetDwFlags
Set a flag specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

GetDocOffsetPage
Get the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

SetDocOffsetPage
Set the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

SetPrintDialog
Set a pointer to the CPrintDialog object used to display the Print dialog box for the print job.

GetDirect
TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

SetDirect
Sets to TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

GetPreview
A flag indicating whether the document is being previewed.

SetPreview
Set whether the document is being previewed.

GetContinuePrinting
A flag indicating whether the framework should continue the print loop.

SetContinuePrinting
Set whether the framework should continue the print loop.

GetCurPage
Get the number of the current page.

SetCurPage
Set the number of the current page.

GetNumPreviewPages
Get the number of pages displayed in preview mode.

SetNumPreviewPages
Set the number of pages displayed in preview mode.

GetUserData
Get a user-created structure.

SetUserData
Set a user-created structure.

GetDraw
Get the usable drawing area of the page in logical coordinates.

SetDraw
Set the usable drawing area of the page in logical coordinates.

GetPageDesc
Get the format string used to display the page numbers during print preview

SetPageDesc
Set the format string used to display the page numbers during print preview

GetMinPage
Get the number of the first page of the document.

SetMinPage
Set the number of the first page of the document.

GetMaxPage
Get the number of the last page of the document.

SetMaxPage
Set the number of the last page of the document.

GetOffsetPage
Get the number of pages preceding the first page of a DocObject item being printed in a combined DocObject print job.

GetFromPage
The number of the first page to be printed.

GetToPage
The number of the last page to be printed.

SetHDC
Sets the printer DC compatible with the users choices, call after the print dialog DoModal finishes.

CreatePrinterDC
Handle to the newly created printer device context, call only after DoModal finishes.

DoModal
Call DoModal on the dialog.

GetCopies
The number of copies requested, call only after DoModal finishes.

GetDefaults
Retrieves device defaults without displaying a dialog box.

FreeDefaults
After a call to GetDefaults, and you are through with the CPrintDialog object, this call deletes the printer DC and calls GlobalFree function on the handles.

GetDeviceName
The name of the currently selected printer, call only after DoModal finishes.

GetDriverName
The name of the currently selected printer device driver, call only after DoModal finishes.

GetDlgFromPage
Retrieves the starting page of the print range.

GetDlgToPage
Retrieves the ending page of the print range.

GetPortName
The name of the currently selected printer port, call only after DoModal finishes.

GetPrinterDC
A handle to the printer device context if successful; otherwise NULL. If the bPrintSetupOnly parameter of the CPrintDialog constructor was FALSE (indicating that the Print dialog box is displayed), then GetPrinterDC returns a handle to the printer device context. You must call the WindowsDeleteDC function to delete the device context when you are done using it.

PrintAll
Nonzero if all pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

PrintCollate
Nonzero if the user selects the collate check box in the dialog box; otherwise 0, call only after DoModal finishes.

PrintRange
Nonzero if only a range of pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

PrintSelection
Nonzero if only the selected items are to be printed; otherwise 0., call only after DoModal finishes

GetHDC
Identifies a device context or an information context, depending on whether the Flags member specifies the PD_RETURNDC or PC_RETURNIC flag. If neither flag is specified, the value of this member is undefined. If both flags are specified, PD_RETURNDC has priority.

GetFlags
A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input.

SetFlags
A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input.

SetFromPage
The number of the first page to be printed.

SetToPage
The number of the first page to be printed.

GetPRINTDLGMinPage
Get the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

SetPRINTDLGMinPage
Set the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

GetPRINTDLGCopies
Gets the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of the DEVMODE structure contains the initial value.

SetPRINTDLGCopies
Sets the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of the DEVMODE structure contains the initial value.


PyCPrintInfo.CreatePrinterDC

CreatePrinterDC()

Handle to the newly created printer device context, call only after DoModal finishes.

MFC References

CPrintDialog::CreatePrinterDC


PyCPrintInfo.DoModal

DoModal()

Call DoModal on the dialog.

MFC References

CPrintDialog::DoModal


PyCPrintInfo.DocObject

DocObject()

Return true if the document being printed is a DocObject.

MFC References

CPrintInfo::m_bDocObject


PyCPrintInfo.FreeDefaults

FreeDefaults()

After a call to GetDefaults, and you are through with the CPrintDialog object, this call deletes the printer DC and calls GlobalFree function on the handles.

MFC References

CPrintDialog::GetDefaults


PyCPrintInfo.GetContinuePrinting

GetContinuePrinting()

A flag indicating whether the framework should continue the print loop.

MFC References

CPrintInfo::m_bContinuePrinting


PyCPrintInfo.GetCopies

GetCopies()

The number of copies requested, call only after DoModal finishes.

MFC References

CPrintDialog::GetCopies


PyCPrintInfo.GetCurPage

GetCurPage()

Get the number of the current page.

MFC References

CPrintInfo::m_nCurPage


PyCPrintInfo.GetDefaults

GetDefaults()

Nonzero if the function was successful; otherwise 0. Call this function to retrieve the device defaults of the default printer without displaying a dialog box. The retrieved values are placed in the m_pd structure. In some cases, a call to this function will call the constructor for CPrintDialog with bPrintSetupOnly set to FALSE. In these cases, a printer DC and hDevNames and hDevMode (two handles located in the m_pd data member) are automatically allocated. If the constructor for CPrintDialog was called with bPrintSetupOnly set to FALSE, this function will not only return hDevNames and hDevMode (located in m_pd.hDevNames and m_pd.hDevMode) to the caller, but will also return a printer DC in m_pd.hDC. It is the responsibility of the caller to delete the printer DC and call the WindowsGlobalFree function on the handles when you are finished with the CPrintDialog object.

MFC References

CPrintDialog::GetDefaults


PyCPrintInfo.GetDeviceName

GetDeviceName()

The name of the currently selected printer, call only after DoModal finishes.

MFC References

CPrintDialog::GetDeviceName


PyCPrintInfo.GetDirect

GetDirect()

TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

MFC References

CPrintInfo::m_bDirect


PyCPrintInfo.GetDlgFromPage

GetDlgFromPage()

Retrieves the starting page of the print range.

MFC References

CPrintDialog::GetDlgFromPage


PyCPrintInfo.GetDlgToPage

GetDlgToPage()

Retrieves the ending page of the print range.

MFC References

CPrintDialog::GetDlgToPage


PyCPrintInfo.GetDocOffsetPage

GetDocOffsetPage()

Get the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

MFC References

CPrintInfo::m_nOffsetPage


PyCPrintInfo.GetDraw

GetDraw()

Get the usable drawing area of the page in logical coordinates.

MFC References

CPrintInfo::m_rectDraw


PyCPrintInfo.GetDriverName

GetDriverName()

The name of the currently selected printer device driver, call only after DoModal finishes.

MFC References

CPrintDialog::GetDriverName


PyCPrintInfo.GetDwFlags

GetDwFlags()

A flags specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

MFC References

CPrintInfo::m_dwFlags


PyCPrintInfo.GetFlags

GetFlags()

A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input. This member can be a combination of the following flags: PD_ALLPAGES, PD_COLLATE, PD_DISABLEPRINTTOFILE, PD_ENABLEPRINTHOOK, PD_ENABLEPRINTTEMPLATE, PD_ENABLEPRINTTEMPLATEHANDLE, PD_ENABLESETUPHOOK, PD_ENABLESETUPTEMPLATE, PD_ENABLESETUPTEMPLATEHANDLE, PD_HIDEPRINTTOFILE, PD_NONETWORKBUTTON, PD_NOPAGENUMS, PD_NOSELECTION, PD_NOWARNING, PD_PAGENUMS, PD_PRINTSETUP, PD_PRINTTOFILE, PD_RETURNDC, PD_RETURNDEFAULT, PD_RETURNIC, PD_SELECTION, PD_SHOWHELP, PD_USEDEVMODECOPIES, PD_USEDEVMODECOPIESANDCOLLATE.

MFC References

PRINTDLG::Flags


PyCPrintInfo.GetFromPage

GetFromPage()

The number of the first page to be printed.

MFC References

CPrintInfo::GetFromPage


PyCPrintInfo.GetHDC

GetHDC()

Identifies a device context or an information context, depending on whether the Flags member specifies the PD_RETURNDC or PC_RETURNIC flag. If neither flag is specified, the value of this member is undefined. If both flags are specified, PD_RETURNDC has priority.

MFC References

PRINTDLG::hDC


PyCPrintInfo.GetMaxPage

GetMaxPage()

Get the number of the last page of the document.

MFC References

CPrintInfo::GetMaxPage


PyCPrintInfo.GetMinPage

GetMinPage()

Get the number of the first page of the document.

MFC References

CPrintInfo::GetMinPage


PyCPrintInfo.GetNumPreviewPages

GetNumPreviewPages()

Get the number of pages displayed in preview mode.

MFC References

CPrintInfo::m_nNumPreviewPages


PyCPrintInfo.GetOffsetPage

GetOffsetPage()

Get the number of pages preceding the first page of a DocObject item being printed in a combined DocObject print job. This currently does NOT work, as, if I include the symbol pInfo->GetOffsetPage(), the link fails to find its definition. Allways returns 0.

MFC References

CPrintInfo::GetOffsetPage


PyCPrintInfo.GetPRINTDLGCopies

GetPRINTDLGCopies()

Get the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of theDEVMODE structure contains the initial value. When PrintDlg returns, nCopies contains the actual number of copies to print. This value depends on whether the application or the printer driver is responsible for printing multiple copies. If the PD_USEDEVMODECOPIESANDCOLLATE flag is set in the Flags member, nCopies is always 1 on return, and the printer driver is responsible for printing multiple copies. If the flag is not set, the application is responsible for printing the number of copies specified by nCopies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.

MFC References

PRINTDLG::nCopies


PyCPrintInfo.GetPRINTDLGMinPage

GetPRINTDLGMinPage()

Get the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

MFC References

PRINTDLG::nMinPage


PyCPrintInfo.GetPageDesc

GetPageDesc()

Get the format string used to display the page numbers during print preview

MFC References

CPrintInfo::m_strPageDesc


PyCPrintInfo.GetPortName

GetPortName()

The name of the currently selected printer port, call only after DoModal finishes.

MFC References

CPrintDialog::GetPortName


PyCPrintInfo.GetPreview

GetPreview()

A flag indicating whether the document is being previewed.

MFC References

CPrintInfo::m_bPreview


PyCPrintInfo.GetPrinterDC

GetPrinterDC()

A handle to the printer device context if successful; otherwise NULL. If the bPrintSetupOnly parameter of the CPrintDialog constructor was FALSE (indicating that the Print dialog box is displayed), then GetPrinterDC returns a handle to the printer device context. You must call the WindowsDeleteDC function to delete the device context when you are done using it.

MFC References

CPrintDialog::GetPrinterDC


PyCPrintInfo.GetToPage

GetToPage()

The number of the last page to be printed.

MFC References

CPrintInfo::GetToPage


PyCPrintInfo.GetUserData

GetUserData()

Get a user-created structure.

MFC References

CPrintInfo::m_lpUserData


PyCPrintInfo.PrintAll

PrintAll()

Nonzero if all pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintAll


PyCPrintInfo.PrintCollate

PrintCollate()

Nonzero if the user selects the collate check box in the dialog box; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintCollate


PyCPrintInfo.PrintRange

PrintRange()

Nonzero if only a range of pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintRange


PyCPrintInfo.PrintSelection

PrintSelection()

Nonzero if only the selected items are to be printed; otherwise 0., call only after DoModal finishes

MFC References

CPrintDialog::PrintSelection


PyCPrintInfo.SetContinuePrinting

SetContinuePrinting()

Set whether the framework should continue the print loop.

MFC References

CPrintInfo::m_bContinuePrinting


PyCPrintInfo.SetCurPage

SetCurPage()

Set the number of the current page.

MFC References

CPrintInfo::m_nCurPage


PyCPrintInfo.SetDirect

SetDirect()

Sets to TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

MFC References

CPrintInfo::m_bDirect


PyCPrintInfo.SetDocOffsetPage

SetDocOffsetPage()

Set the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

MFC References

CPrintInfo::m_nOffsetPage


PyCPrintInfo.SetDraw

SetDraw()

Set the usable drawing area of the page in logical coordinates.

MFC References

CPrintInfo::m_rectDraw


PyCPrintInfo.SetDwFlags

SetDwFlags()

Set a flag specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

MFC References

CPrintInfo::m_dwFlags


PyCPrintInfo.SetFlags

SetFlags()

A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input. This member can be a combination of the following flags: PD_ALLPAGES, PD_COLLATE, PD_DISABLEPRINTTOFILE, PD_ENABLEPRINTHOOK, PD_ENABLEPRINTTEMPLATE, PD_ENABLEPRINTTEMPLATEHANDLE, PD_ENABLESETUPHOOK, PD_ENABLESETUPTEMPLATE, PD_ENABLESETUPTEMPLATEHANDLE, PD_HIDEPRINTTOFILE, PD_NONETWORKBUTTON, PD_NOPAGENUMS, PD_NOSELECTION, PD_NOWARNING, PD_PAGENUMS, PD_PRINTSETUP, PD_PRINTTOFILE, PD_RETURNDC, PD_RETURNDEFAULT, PD_RETURNIC, PD_SELECTION, PD_SHOWHELP, PD_USEDEVMODECOPIES, PD_USEDEVMODECOPIESANDCOLLATE.

MFC References

PRINTDLG::Flags


PyCPrintInfo.SetFromPage

SetFromPage()

The number of the first page to be printed.

MFC References

PRINTDLG::nFromPage


PyCPrintInfo.SetHDC

SetHDC(hdc)

Sets the printer DC compatible with the users choices, call after the print dialog DoModal finishes.

Parameters

hdc : int

The DC.

MFC References

CPrintInfo::m_pPD

CPrintDialog::m_pd.hDC


PyCPrintInfo.SetMaxPage

SetMaxPage()

Set the number of the last page of the document.

MFC References

CPrintInfo::SetMaxPage


PyCPrintInfo.SetMinPage

SetMinPage()

Set the number of the first page of the document.

MFC References

CPrintInfo::SetMinPage


PyCPrintInfo.SetNumPreviewPages

SetNumPreviewPages()

Set the number of pages displayed in preview mode.

MFC References

CPrintInfo::m_nNumPreviewPages


PyCPrintInfo.SetPRINTDLGCopies

SetPRINTDLGCopies()

Set the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of theDEVMODE structure contains the initial value. When PrintDlg returns, nCopies contains the actual number of copies to print. This value depends on whether the application or the printer driver is responsible for printing multiple copies. If the PD_USEDEVMODECOPIESANDCOLLATE flag is set in the Flags member, nCopies is always 1 on return, and the printer driver is responsible for printing multiple copies. If the flag is not set, the application is responsible for printing the number of copies specified by nCopies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.

MFC References

PRINTDLG::nCopies


PyCPrintInfo.SetPRINTDLGMinPage

SetPRINTDLGMinPage()

Set the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

MFC References

PRINTDLG::nMinPage


PyCPrintInfo.SetPageDesc

SetPageDesc()

Set the format string used to display the page numbers during print preview

MFC References

CPrintInfo::m_strPageDesc


PyCPrintInfo.SetPreview

SetPreview()

Set whether the document is being previewed.

MFC References

CPrintInfo::m_bPreview


PyCPrintInfo.SetPrintDialog

SetPrintDialog()

Set a pointer to the CPrintDialog object used to display the Print dialog box for the print job.

MFC References

CPrintInfo::m_pPD


PyCPrintInfo.SetToPage

SetToPage()

The number of the last page to be printed.

MFC References

PRINTDLG::nToPage


PyCPrintInfo.SetUserData

SetUserData()

Set a user-created structure.

MFC References

CPrintInfo::m_lpUserData


PyCProgressCtrl

PyCProgressCtrl Object

A windows progress bar control. Encapsulates an MFC CProgressCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

SetRange
Sets the lower and upper bounds for the progress bar.

SetPos
Set the control's position

OffsetPos
Advances the progress bar control's current position by the increment specified.

SetStep
Specifies the step increment for a progress bar control.

StepIt
Advances the current position for a progress bar control by the step increment. Returns previous position.


PyCProgressCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCProgressCtrl.OffsetPos

int = OffsetPos(nPos)

Advances the progress bar control's current position by the increment specified

Parameters

nPos=1 : int

Amount to advance the position.


PyCProgressCtrl.SetPos

int = SetPos(nPos)

Set the control's position

Parameters

nPos=1 : int

New position of the progress bar control.


PyCProgressCtrl.SetRange

SetRange(nLower, nUpper)

Set the control's bounds

Parameters

nLower=1 : int

Specifies the lower limit of the range (default is zero).

nUpper=1 : int

Specifies the upper limit of the range (default is 100).


PyCProgressCtrl.SetStep

int = SetStep(nStep)

Specifies the step increment for a progress bar control.

Parameters

nStep=1 : int

New step increment.


PyCProgressCtrl.StepIt

int = StepIt()

Advances the current position for a progress bar control by the step increment. Returns previous position.


PyCPropertyPage

PyCPropertyPage Object

A class which encapsulates an MFC CPropertyPage object. Derived from a PyCDialog object.

Methods

CancelToClose
Changes the Cancel button to Close.

OnCancel
Calls the default MFC OnCancel handler.

OnOK
Calls the default MFC OnOK handler.

OnApply
Calls the default MFC OnApply handler.

OnReset
Calls the default MFC OnReset handler.

OnQueryCancel
Calls the default MFC OnQueryCancel handler.

OnWizardBack
Calls the default MFC OnWizardBack handler.

OnWizardNext
Calls the default MFC OnWizardNext handler.

OnWizardFinish
Calls the default MFC OnWizardFinish handler.

OnSetActive
Calls the default MFC OnSetActive handler.

OnKillActive
Calls the default MFC OnKillActive handler.

SetModified
Sets the modified flag (for the Apply button).

SetPSPBit
Sets (or clears) a bit in m_psp.dwFlags.


PyCPropertyPage.CancelToClose

CancelToClose()

Changes the Cancel button to Close.


PyCPropertyPage.OnApply

OnApply()

Calls the default MFC OnApply handler.

See Also

PyCPropertyPage.OnApply virtual method


PyCPropertyPage.OnCancel

OnCancel()

Calls the default MFC OnCancel handler.

See Also

PyCDialog.OnCancel virtual method


PyCPropertyPage.OnKillActive

int = OnKillActive()

Calls the default MFC OnKillActive handler.

See Also

PyCPropertyPage.OnKillActive virtual method

PyCPropertyPage.OnKillActive virtual method

Return Value

The result is true if the page should be deselected. Typically this result should be passed to the original OnSetActive handler.


PyCPropertyPage.OnOK

OnOK()

Calls the default MFC OnOK handler.

See Also

PyCDialog.OnOK virtual method


PyCPropertyPage.OnQueryCancel

OnQueryCancel()

Calls the default MFC OnQueryCancel handler.

See Also

PyCPropertyPage.OnQueryCancel virtual method


PyCPropertyPage.OnReset

OnReset()

Calls the default MFC OnReset handler.

See Also

PyCPropertyPage.OnReset virtual method


PyCPropertyPage.OnSetActive

int = OnSetActive()

Calls the default MFC OnSetActive handler.

See Also

PyCPropertyPage.OnSetActive virtual method

PyCPropertyPage.OnSetActive virtual method

Return Value

The result is true if the page should be made active. Typically this result should be passed to the original OnSetActive handler.


PyCPropertyPage.OnWizardBack

OnWizardBack()

Calls the default MFC OnWizardBack handler.

See Also

PyCPropertyPage.OnWizardBack virtual method


PyCPropertyPage.OnWizardFinish

OnWizardFinish()

Calls the default MFC OnWizardFinish handler.

See Also

PyCPropertyPage.OnWizardFinish virtual method


PyCPropertyPage.OnWizardNext

OnWizardNext()

Calls the default MFC OnWizardNext handler.

See Also

PyCPropertyPage.OnWizardNext virtual method


PyCPropertyPage.SetModified

SetModified(bChanged)

Sets the modified flag.

Parameters

bChanged=1 : int

A flag to indicate the new modified state.


PyCPropertyPage.SetPSPBit

SetPSPBit(bitMask, bitValue)

Sets or clears a bit in m_psp.dwFlags

Parameters

bitMask : int

The PSP_* bit mask constant

bitValue : int

1 to set, 0 to clear


PyCPropertySheet

PyCPropertySheet Object

A class which encapsulates an MFC CPropertySheet object. Derived from a PyCWnd object.

Methods

AddPage
Adds the supplied page with the rightmost tab in the property sheet.

CreateWindow
Displays the property sheet as a modeless dialog.

DoModal
Displays the property sheet as a modal dialog.

EnableStackedTabs
Enables or disables stacked tabs.

EndDialog
Closes the dialog, with the specified result.

GetActiveIndex
Retrieves the index of the active page of the property sheet.

GetActivePage
Returns the currently active property page.

GetPage
Returns the specified property page.

GetPageIndex
Retrieves the index of the specified page of the property sheet.

GetPageCount
Returns the number of pages.

GetTabCtrl
Returns the tab control used by the sheet.

OnInitDialog
Calls the default MFC OnInitDialog handler.

PressButton
Simulates the choice of the specified button in a property sheet.

RemovePage
Removes the specified page from the sheet.

SetActivePage
Programmatically sets the active page object.

SetTitle
Sets the caption for the property sheet.

SetFinishText
Sets the text for the Finish button

SetWizardMode
Enables the wizard mode

SetWizardButtons
Enables the wizard buttons

SetPSHBit
Sets (or clears) a bit in m_psh.dwFlags.


PyCPropertySheet.AddPage

AddPage(page)

Adds the supplied page with the rightmost tab in the property sheet.

Parameters

page : PyCPropertyPage

The page to be added.

Comments

Add pages to the property sheet in the left-to-right order you want them to appear.

MFC References

PyCPropertySheet::AddPage


PyCPropertySheet.CreateWindow

CreateWindow(parent, style, exStyle)

Displays the property sheet as a modeless dialog.

Parameters

parent=None : PyCWnd

The parent of the dialog.

style=WS_SYSMENU|WS_POPUP|WS_CAPTION|DS_MODALFRAME|WS_VISIBLE : int

The style for the window.

exStyle=WS_EX_DLGMODALFRAME : int

The extended style for the window.


PyCPropertySheet.DoModal

int = DoModal()

Displays the property sheet as a modal dialog.


PyCPropertySheet.EnableStackedTabs

PyCPropertyPage = EnableStackedTabs(stacked)

Enables or disables stacked tabs.

Parameters

stacked : int

A boolean flag


PyCPropertySheet.EndDialog

EndDialog(result)

Closes the dialog, with the specified result.

Parameters

result : int

The result to be returned by DoModal.


PyCPropertySheet.GetActiveIndex

int = GetActiveIndex()

Retrieves the index of the active page of the property sheet.


PyCPropertySheet.GetActivePage

PyCPropertyPage = GetActivePage()

Returns the currently active property page.

MFC References

PyCPropertySheet::GetActivePage


PyCPropertySheet.GetPage

PyCPropertyPage = GetPage(pageNo)

Returns the specified property page.

Parameters

pageNo : int

The index of the page toretrieve.

MFC References

PyCPropertySheet::GetPage


PyCPropertySheet.GetPageCount

int = GetPageCount()

Returns the number of pages.


PyCPropertySheet.GetPageIndex

int = GetPageIndex(page)

Retrieves the index of the specified page of the property sheet.

Parameters

page : PyCPropertyPage

The page.


PyCPropertySheet.GetTabCtrl

PyCTabCtrl = GetTabCtrl()

Returns the tab control used by the sheet.


PyCPropertySheet.OnInitDialog

int = OnInitDialog()

Calls the default MFC OnInitDialog handler.

See Also

PyCPropertySheet.OnInitDialog virtual method


PyCPropertySheet.PressButton

PressButton(button)

Simulates the choice of the specified button in a property sheet.

Parameters

button : int

The button to press


PyCPropertySheet.RemovePage

RemovePage(offset)

Removes the specified page from the sheet.

Parameters

offset : int

The page number to remove

Alternative Parameters

page

The page to remove


PyCPropertySheet.SetActivePage

SetActivePage(page)

Programmatically sets the active page object.

Parameters

page : PyCPropertyPage

The page.


PyCPropertySheet.SetFinishText

SetFinishText(text)

Sets the text for the Finish button

Parameters

text : string

The next for the button


PyCPropertySheet.SetPSHBit

SetPSHBit(bitMask, bitValue)

Sets or clears a bit in m_psh.dwFlags

Parameters

bitMask : int

The PSH_* bit mask constant

bitValue : int

1 to set, 0 to clear


PyCPropertySheet.SetTitle

SetTitle(title)

Sets the caption for the property sheet.

Parameters

title : string

The new caption


PyCPropertySheet.SetWizardButtons

SetWizardButtons(flags)

Enables the wizard buttons

Parameters

flags : int

The wizard flags


PyCPropertySheet.SetWizardMode

SetWizardMode()

Enables the wizard mode


PyCRect

PyCRect Object

A Python interface the the MFC CRect class.

Items

[0] int : left

[1] int : top

[2] int : right

[3] int : bottom


PyCRgn

PyCRgn Object

An object encapsulating an MFC PyCRgn class.


PyCRgn.CombineRgn

int = CombineRgn()

Creates a new GDI region by combining two existing regions. The regions are combined as specified by nCombineMode Return Values: success or failure flag (BOOL)


PyCRgn.CopyRgn

int = CopyRgn()

Copies the region defined by pRgnSrc into the CRgn object Return Values: success or failure flag (BOOL)


PyCRgn.CreateRectRgn

int = CreateRectRgn()

Initializes a region to a rectangle Return Values: success or failure flag (BOOL)


PyCRgn.DeleteObject

int = DeleteObject()

Deletes the attached Windows GDI Rgn object from memory by freeing all system storage associated with the Windows GDI object Return Values: None


PyCRgn.GetRgnBox

int = GetRgnBox()

Retrieves the coordinates of the bounding rectangle of the CRgn object Return Values: the bounding rectangle as a tuple (l,t,r,b)


PyCRgn.GetSafeHandle

int = GetSafeHandle()

A HANDLE to the attached Windows GDI object; otherwise NULL if no object is attached Return Values: the handle of the CRgn object


PyCRichEditCtrl

PyCRichEditCtrl Object

A windows Rich Text edit control. Encapsulates an MFC CRichEditCtrl class. Derived from a PyCControl object.

Methods

Clear
Clears all text from an edit control.

Copy
Copy the selection to the clipboard.

CreateWindow
Creates a rich edit control.

Cut
Cut the selection, and place it in the clipboard.

FindText
Finds text in the control

GetCharPos
Returns te location of the top-left corner of the specified character.

GetDefaultCharFormat
Returns the current default character formatting attributes in this PyCRichEditCtrl object.

GetEventMask
Returns the current event mask.

GetSelectionCharFormat
Returns the character formatting attributes of the current selection in this PyCRichEditCtrl object.

GetFirstVisibleLine
Returns zero-based index of the topmost visible line.

GetParaFormat
Returns the formatting of the current paragraph.

GetSel
Returns the selection.

GetSelText
Returns the currently selected text

GetTextLength
Returns the length of the text in the control.

GetLine
Returns a specified line.

GetModify
Determines if the control has been modified.

GetLineCount
Returns the number of lines in an edit control.

LimitText
Sets max length of text that user can enter

LineFromChar
Returns the line number of a given character.

LineIndex
Returns the line index

LineScroll
Scroll the control vertically and horizontally

Paste
Pastes the contents of the clipboard into the edit control.

ReplaceSel
Replace the selection with the specified text.

SetBackgroundColor
Sets the background color for the control.

SetDefaultCharFormat
Sets the current default character formatting attributes in this PyCRichEditCtrl object.

SetEventMask
Sets the event motification mask.

SetSelectionCharFormat
Sets the character formatting attributes for the selection in this PyCRichEditCtrl object.

SetModify
Sets the modified flag.

SetOptions
Sets options for the control.

SetParaFormat
Sets the paragraph formatting.

SetReadOnly
Set the read only status of an edit control.

SetSel
Changes the selection in an edit control.

SetSelAndCharFormat
Sets the selection and the char format.

SetTargetDevice
Sets the target device for the control

StreamIn
Invokes a callback to stream data into the control.

StreamOut
Invokes a callback to stream data out of the control.


PyCRichEditCtrl.Clear

int = Clear()

Clears all text in an edit control.

MFC References

CRichEditCtrl::Clear


PyCRichEditCtrl.Copy

Copy()

Copys the current selection to the clipboard.

MFC References

CRichEditCtrl::Copy


PyCRichEditCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates a rich edit control window.

Parameters

style : int

The control style

rect : int,int,int,int

The position of the control

parent : PyCWnd

The parent window. Must not be None

id : int

The control ID


PyCRichEditCtrl.Cut

Cut()

Cuts the current selection to the clipboard.

MFC References

CRichEditCtrl::Cut


PyCRichEditCtrl.FindText

int, (start, end) = FindText(charPos)

Finds text in the control

Parameters

charPos : int

The character position


PyCRichEditCtrl.GetCharPos

(tuple) = GetCharPos(charPos)

Returns the location of the top-left corner of the character specified by charPos.

Parameters

charPos : int

The character position

Return Value

The return value is a win32ui::CHARFORMAT tuple


PyCRichEditCtrl.GetDefaultCharFormat

(tuple) = GetDefaultCharFormat()

Returns the current default character formatting attributes in this PyCRichEditCtrl object.

MFC References

CRichEditCtrl::GetDefaultCharFormat

Return Value

The return value is a win32ui::CHARFORMAT tuple


PyCRichEditCtrl.GetEventMask

int = GetEventMask()

Returns the current event mask.

MFC References

CRichEditCtrl::GetEventMask


PyCRichEditCtrl.GetFirstVisibleLine

int = GetFirstVisibleLine()

Returns zero-based index of the topmost visible line.

MFC References

CRichEditCtrl::GetFirstVisibleLine

Return Value

The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.


PyCRichEditCtrl.GetLine

int = GetLine(lineNo)

Returns the text in a specified line.

Parameters

lineNo=current : int

Contains the zero-based index value for the desired line.

Comments

This function is not an MFC wrapper.


PyCRichEditCtrl.GetLineCount

int = GetLineCount()

Gets the number of lines in an edit control.

MFC References

CRichEditCtrl::GetLineCount

Return Value

The number of lines in the buffer. If the control is empty, the return value is 1.


PyCRichEditCtrl.GetModify

int = GetModify()

Nonzero if the text in this control has been modified; otherwise 0.

MFC References

CRichEditCtrl::GetModify


PyCRichEditCtrl.GetParaFormat

(tuple) = GetParaFormat()

Returns the current paragraph formatting attributes.

MFC References

CRichEditCtrl::GetParaFormat

Return Value

The return value is a win32ui::PARAFORMAT tuple


PyCRichEditCtrl.GetSel

(start, end) = GetSel()

Returns the start and end of the current selection.

MFC References

CRichEditCtrl::GetSel

Return Value

The return tuple is (the first character in the current selection, first nonselected character past the end of the current selection)


PyCRichEditCtrl.GetSelText

string = GetSelText()

Returns the currently selected text


PyCRichEditCtrl.GetSelectionCharFormat

(tuple) = GetSelectionCharFormat()

Returns the character formatting of the selection.

MFC References

CRichEditCtrl::GetSelectionCharFormat


PyCRichEditCtrl.GetTextLength

int = GetTextLength()

Returns the length of the text in the control.

MFC References

CRichEditCtrl::GetTextLength


PyCRichEditCtrl.LimitText

LimitText(nChars)

Sets max length of text that user can enter

Parameters

nChars=0 : int

Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.

MFC References

CRichEditCtrl::LimitText


PyCRichEditCtrl.LineFromChar

int = LineFromChar(charNo)

Returns the line number of the specified character.

Parameters

charNo=-1 : int

Contains the zero-based index value for the desired character in the text of the edit control, or -1. If -1, then it specifies the current line.

MFC References

CRichEditCtrl::LineFromChar

Return Value

The zero-based line number of the line containing the character index specified by charNo. If charNo is -1, the number of the line that contains the first character of the selection is returned. If there is no selection, the current line number is returned.


PyCRichEditCtrl.LineIndex

int = LineIndex(lineNo)

Retrieves the character index of a line within a multiple-line edit control.

Parameters

lineNo=-1 : int

Contains the index value for the desired line in the text of the edit control, or contains -1. If -1, then it specifies the current line.

Comments

This method only works on multi-linr edit controls.

MFC References

CRichEditCtrl::LineIndex

Return Value

The character index of the line specified in lineNo, or -1 if the specified line number is greater then the number of lines in the edit control.


PyCRichEditCtrl.LineScroll

int = LineScroll(nLines, nChars )

Scroll the control vertically and horizontally

Parameters

nLines : int

Specifies the number of lines to scroll vertically.

nChars=0 : int

Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.

Comments

This method only works on multi-linr edit controls.

MFC References

CRichEditCtrl::LineScroll


PyCRichEditCtrl.Paste

Paste()

Pastes the contents of the clipboard into the control.

MFC References

CRichEditCtrl::Paste


PyCRichEditCtrl.ReplaceSel

ReplaceSel(text)

Replaces the selection with the specified text.

Parameters

text : string

The text to replace the selection with.

MFC References

CRichEditCtrl::ReplaceSel


PyCRichEditCtrl.SetBackgroundColor

int = SetBackgroundColor(bSysColor, cr )

Sets the background color for the control.

Parameters

bSysColor : int

Indicates if the background color should be set to the system value. If this value is TRUE, cr is ignored.

cr=0 : int

The requested background color. Used only if bSysColor is FALSE.

MFC References

CRichEditCtrl::SetEventMask

Return Value

The return value is the previous background color.


PyCRichEditCtrl.SetDefaultCharFormat

SetDefaultCharFormat(charFormat)

Sets the current default character formatting attributes in this PyCRichEditCtrl object.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetDefaultCharFornmat


PyCRichEditCtrl.SetEventMask

int = SetEventMask(eventMask)

Sets the event motification mask.

Parameters

eventMask : int

The new event mask. Must be one of the win32con.ENM_* flags.

MFC References

CRichEditCtrl::SetEventMask

Return Value

The return value is the previous event mask.


PyCRichEditCtrl.SetModify

SetModify(modified)

Sets the modified flag for this control

Parameters

modified=1 : int

Indicates the new value for the modified flag.

MFC References

CRichEditCtrl::SetModify


PyCRichEditCtrl.SetOptions

SetOptions(op, flags)

Sets options for the control.

Parameters

op : int

Indicates the operation. Must be one of the win32con.ECOOP_* flags.

flags : int

Indicates the options. Must be one a combination of win32con.ECO_* flags.

MFC References

CRichEditCtrl::SetOptions


PyCRichEditCtrl.SetParaFormat

int = SetParaFormat(paraFormat)

Sets the paragraph formatting

Parameters

paraFormat : tuple

A charformat tuple. See win32ui::PARAFORMAT tuple for details.

MFC References

CRichEditCtrl::SetParaFormat

Return Value

This function seems to return occasionally return failure, but the formatting is applied. Therefore an exception is not raised on failure, but the BOOL return code is passed back.


PyCRichEditCtrl.SetReadOnly

SetReadOnly(bReadOnly)

Sets or clears the read-only status of the listbox.

Parameters

bReadOnly=1 : int

The read-only state to set.

MFC References

CRichEditCtrl::SetReadOnly


PyCRichEditCtrl.SetSel

SetSel(start, end)

Sets the selection in the edit control.

Parameters

start : int

Specifies the starting position. If start is 0 and end is -1, all the text in the edit control is selected. If start is -1, any current selection is removed.

end=start : int

Specifies the ending position.

Alternative Parameters

start,end)

As for normal start, end args.

MFC References

CRichEditCtrl::SetSel


PyCRichEditCtrl.SetSelAndCharFormat

SetSelAndCharFormat(charFormat)

Sets the selection and char format.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

Comments

Highly optimised for speed for color editors.

MFC References

CRichEditCtrl::SetSelectionCharFormat

CRichEditCtrl::SetSel


PyCRichEditCtrl.SetSelectionCharFormat

SetSelectionCharFormat(charFormat)

Sets the current selections character formatting attributes.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetSelectionCharFormat


PyCRichEditCtrl.SetTargetDevice

SetTargetDevice(dc, lineWidth)

Sets the target device for the control

Parameters

dc : PyCDC

The new DC - may be None

lineWidth : int

Line width to use for formatting.

MFC References

CRichEditCtrl::SetTargetDevice


PyCRichEditCtrl.StreamIn

(int,int) = StreamIn(format, method )

Invokes a callback to stream data into the control.

Parameters

format : int

The format. One of the win32con.SF_* flags (SF_TEXT,SF_RTF)

method : object

A callable object (eg, a method or function) This method is called with a single integer param, which is the maximum number of bytes to fetch. The method should return a zero length string, or None to finish the operation, and a string otherwise.

MFC References

CRichEditCtrl::StreamIn

Return Value

The return value is a tuple of (no bytes written, error code)


PyCRichEditCtrl.StreamOut

(int, int) = StreamOut(format, method )

Invokes a callback to stream data into the control.

Parameters

format : int

The format. One of the win32con.SF_* flags (SF_TEXT,SF_RTF) and may also combine SFF_SELECTION.

method : object

A callable object (eg, a method or function) This method is called with a string parameter. It should return an integer, zero to abort, non zero otherwise.

MFC References

CRichEditCtrl::StreamOut

Return Value

The return value is a tuple of (no bytes written, error code)


PyCRichEditDoc

PyCRichEditDoc Object

A class which implements a CRichEditView object. Derived from PyCDocument.

Methods

OnCloseDocument
Call the MFC OnCloseDocument handler.


PyCRichEditDoc.OnCloseDocument

OnCloseDocument()

Call the MFC OnCloseDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnCloseDocument virtual method

MFC References

CRichEditDoc::OnCloseDocument


PyCRichEditDocTemplate

PyCRichEditDocTemplate Object

A document template class for OLE functionality. Encapsulates an MFC CDocTemplate class

Methods

DoCreateRichEditDoc
Creates an underlying document object.


PyCRichEditDocTemplate.DoCreateRichEditDoc

PyCRichEditDoc = DoCreateRichEditDoc(fileName)

Creates an underlying document object.

Parameters

fileName=None : string

The name of the file to load.


PyCRichEditView

PyCRichEditView Object

A class which implementes a CRichEditView. Derived from PyCRichEditView and PyCRichEditCtrl.

Methods

GetRichEditCtrl
Returns the underlying rich edit control object.

SetWordWrap
Sets the wordwrap state for the control.

WrapChanged
Calls the underlying WrapChanged method.

SaveTextFile
Saves the control to a text file


PyCRichEditView.GetRichEditCtrl

PyCRichEditCtrl = GetRichEditCtrl()

Returns the underlying rich edit control object.


PyCRichEditView.SaveTextFile

None = SaveTextFile()

Saves the contents of the control as a test file

Comments

Theere is no equivilent MFC method. This is implemented in this module for performance reasons.


PyCRichEditView.SetWordWrap

None = SetWordWrap(wordWrap)

Sets the wordwrap state for the control.

Parameters

wordWrap : int

The new word-wrap state.

MFC References

CRichEditCtrl::m_nWordWrap


PyCRichEditView.WrapChanged

None = WrapChanged()

Calls the underlying WrapChanged method.

MFC References

CRichEditCtrl::WrapChanged


PyCScrollView

PyCScrollView Object

A class which implements a generic CScrollView. Derived from a PyCView object.

Methods

GetDeviceScrollPosition
Return the position of the scroll bars (device units).

GetDC
Get the views current PyCDC

GetScrollPosition
Return the position of the scroll bars (logical units).

GetTotalSize
Return the total size of the views.

OnCommand
Calls the standard Python framework OnCommand handler

ResizeParentToFit
Call ResizeParentToFit to let the size of your view dictate the size of its frame window.

SetScaleToFitSize
Scales the viewport size to the current window size automatically.

ScrollToPosition
Scroll to a specified point.

SetScrollSizes
Set the scrolling sizes.

UpdateBars
Update the scroll bar state.


PyCScrollView.GetDC

PyCDC = GetDC()

Gets the view's current DC.


PyCScrollView.GetDeviceScrollPosition

(x,y) = GetDeviceScrollPosition()

Returns the positon of the scroll bars in device units.


PyCScrollView.GetScrollPosition

(x,y) = GetScrollPosition()

Returns the current position of the scroll bars (in logical units).


PyCScrollView.GetTotalSize

(x,y) = GetTotalSize()

Returns the total size of the view in logical units.


PyCScrollView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCScrollView.ResizeParentToFit

tuple = ResizeParentToFit(bShrinkOnly)

Lets the size of a view dictate the size of its frame window.

Parameters

bShrinkOnly=1 : int

The kind of resizing to perform. The default value, TRUE, shrinks the frame window if appropriate.

Comments

This is recommended only for views in MDI child frame windows.
Use ResizeParentToFit in the OnInitialUpdate handler function of your View class.
You must ensure the parent's PyCFrameWnd::RecalcLayout is called before using this method.


PyCScrollView.ScrollToPosition

ScrollToPosition(position)

Scrolls to a given point in the view.

Parameters

position : (x,y)

The position to scroll to.


PyCScrollView.SetScaleToFitSize

SetScaleToFitSize(size)

Scales the viewport size to the current window size automatically.

Parameters

size : (x,y)

The horizontal and vertical sizes to which the view is to be scaled. The scroll view's size is measured in logical units.


PyCScrollView.SetScrollSizes

SetScrollSizes(mapMode, sizeTotal, sizePage, sizePage)

Sets the sizes of the scroll bars

Parameters

mapMode : int

The mapping mode for this view.

sizeTotal : (x,y)

The total size of the view. Sizes are in logical units. Both x and y must be greater than zero.

sizePage=win32ui.rectDefault : (x,y)

The number of untils to scroll in response to a page-down command.

sizePage=win32ui.rectDefault : (x,y)

The number of untils to scroll in response to a line-down command.


PyCScrollView.UpdateBars

UpdateBars()

Update the scroll bars state


PyCSliderCtrl

PyCSliderCtrl Object

A windows Slider bar control. Encapsulates an MFC CSliderCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new Slider bar object.

GetLineSize
Get the control's line size

SetLineSize
Set the control's line size

GetPageSize
Get the control's Page size

SetPageSize
Set the control's Page size

GetRangeMax
Get the control's maximum

GetRangeMin
Get the control's minimum

GetRange
Get the control's minimum and maximum

GetRangeMax
Set the control's maximum

GetRangeMin
Set the control's minimum

SetRange
Set the control's minimum and maximum

GetSelection
Get the selection start and end positions

SetSelection
Set the selection start and end positions

GetChannelRect
Get the control's channel rect

GetThumbRect
Get the control's thumb rect

GetPos
Get the control's position

SetPos
Set the control's position

GetNumTics
Get the number of tics in the control

GetTicArray
Get the array of tic positions

GetTic
Get the position of the specified tic

GetTicPos
Get the position of the specified tic in client coordinates

SetTic
Set a tick at the position

SetTicFreq
Set the tic mark frequency

ClearSel
Clear any control selection

VerifyPos
Verify the positon between min and max

ClearTics
Clear any tic marks from the control


PyCSliderCtrl.ClearSel

int = ClearSel(bRedraw)

Clear the selection

Parameters

bRedraw=1 : int

Redraw the control?


PyCSliderCtrl.ClearTics

int = ClearTics(bRedraw)

Clear the control's tic marks

Parameters

bRedraw=1 : int

Redraw the control?


PyCSliderCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCSliderCtrl.GetChannelRect

int = GetChannelRect()

Get the control's channel rectangle


PyCSliderCtrl.GetLineSize

int = GetLineSize()

Get the control's position


PyCSliderCtrl.GetNumTics

int = GetNumTics()

Get number of tics in the slider


PyCSliderCtrl.GetPageSize

int = GetPageSize()

Get the control's position


PyCSliderCtrl.GetPos

int = GetPos()

Get the control's position


PyCSliderCtrl.GetRange

int = GetRange()

Get the control's min and max


PyCSliderCtrl.GetRangeMax

int = GetRangeMax()

Get the control's Maximum


PyCSliderCtrl.GetRangeMin

int = GetRangeMin()

Get the control's Minimum


PyCSliderCtrl.GetSelection

int = GetSelection()

Get the control's selection start and end positions


PyCSliderCtrl.GetThumbRect

int = GetThumbRect()

Get the control's thumb rectangle


PyCSliderCtrl.GetTic

int = GetTic(nTic)

Get the position of the specified tic number

Parameters

nTic=1 : int

Zero based index of the tic mark


PyCSliderCtrl.GetTicArray

int = GetTicArray()

Get a tuple of slider tic positions


PyCSliderCtrl.GetTicPos

int = GetTicPos(nTic)

Get the position of the specified tic number in client coordinates

Parameters

nTic=1 : int

Zero based index of the tic mark


PyCSliderCtrl.SetLineSize

int = SetLineSize(nLineSize)

Set the control's line size. Returns the previous line size.

Parameters

nLineSize=1 : int

New line size of the Slider bar control


PyCSliderCtrl.SetPageSize

int = SetPageSize(nPageSize)

Set the control's page size Returns the previous page size.

Parameters

nPageSize=1 : int

New page size of the Slider bar control.


PyCSliderCtrl.SetPos

int = SetPos(nPos)

Set the control's position

Parameters

nPos=1 : int

New position of the Slider bar control.


PyCSliderCtrl.SetRange

int = SetRange(nRangeMin, nRangeMax , bRedraw )

Set the control's min and max

Parameters

nRangeMin=1 : int

New minimum of the Slider bar control.

nRangeMax=1 : int

New maximum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCSliderCtrl.SetSelection

int = SetSelection(nRangeMin, nRangeMax )

Set the control's selection start and end positions

Parameters

nRangeMin=1 : int

New start of the Slider's selection.

nRangeMax=1 : int

New end of the Slider's selection.


PyCSliderCtrl.SetTic

int = SetTic(nTic)

Set a tic at the specified position

Parameters

nTic=1 : int

Position of the desired tic mark


PyCSliderCtrl.SetTicFreq

int = SetTicFreq(nFreq)

Set the tic frequency

Parameters

nFreq=1 : int

Frequency of tic marks


PyCSliderCtrl.VerifyPos

int = VerifyPos()

Verify the position is between configured min and max


PyCSpinButtonCtrl

PyCSpinButtonCtrl Object

A windows spin button control. Encapsulates an MFC CSpinButtonCtrl object.

Methods

GetPos
Obtains the current position for a spin button control.

SetPos
Sets the current position for a spin button control.

SetRange
Sets the upper and lower limits (range) for a spin button control.

SetRange32
Sets the upper and lower limits (range) for a spin button control.


PyCSpinButtonCtrl.GetPos

int = GetPos()

Obtains the current position for a spin button control.


PyCSpinButtonCtrl.SetPos

int = SetPos(pos)

Sets the current position for a spin button control.

Parameters

pos : int

The new position.

Return Value

The result is the previous position.


PyCSpinButtonCtrl.SetRange

int = SetRange()

Sets the upper and lower limits (range) for a spin button control.


PyCSpinButtonCtrl.SetRange32

int = SetRange32()

Sets the 32 bit upper and lower limits (range) for a spin button control.


PyCSplitterWnd

PyCSplitterWnd Object

A class which encapsulates an MFC CSplitterWnd . Derived from a PyCWnd object.

Methods

GetPane
Returns the PyCWnd object associated with a splitter window pane.

CreateView
Creates a view in a splitter window

CreateStatic
Creates a static splitter window.

SetColumnInfo
Sets a new minimum height and ideal height for a column

SetRowInfo
Sets a new minimum height and ideal height for a row.

IdFromRowCol
Gets the child window ID for the specified child.

DoKeyboardSplit


PyCSplitterWnd.CreateStatic

CreateStatic(parent, rows, cols, style, id)

Creates a static splitter window.

Parameters

parent : PyCFrameWnd or PyCSplitter

The parent window.

rows : int

The number of rows in the splitter.

cols : int

The number of columns in the splitter.

style=WS_CHILD | WS_VISIBLE : int

Specifies the window style

id=AFX_IDW_PANE_FIRST : int

The child window ID of the window. The ID can be AFX_IDW_PANE_FIRST unless the splitter window is nested inside another splitter window.

Comments

A static splitter window is a splitter where the number of panes are fixed at window creation time. Currently this is the only splitter window supported by win32ui.

MFC References

CSplitterWnd::CreateStatic


PyCSplitterWnd.CreateView

CreateView(view, row, col, width, height)

Creates a view in a splitter window

Parameters

view : PyCView

The view to place in the splitter pane.

row : int

The row in the splitter to place the view.

col : int

The column in the splitter to place the view.

width, height : (int, int)

The initial size of the new view.

MFC References

CSplitterWnd::CreateView exception set.


PyCSplitterWnd.DoKeyboardSplit

int = DoKeyboardSplit()


PyCSplitterWnd.GetPane

PyCWnd = GetPane(row, col )

Returns the PyCView associated with the specified pane.

Parameters

row : int

The row in the splitter.

col : int

The column in the splitter.

Comments

Theoretically the return value can be a PyCWnd object, but currently it will always be a PyCView or derived object.


PyCSplitterWnd.IdFromRowCol

IdFromRowCol(row, col)

Gets the child window ID for the specified child.

Parameters

row : int

The row in the splitter.

col : int

The col in the splitter


PyCSplitterWnd.SetColumnInfo

SetColumnInfo(column, ideal, min)

Sets a new minimum height and ideal height for a column

Parameters

column : int

The column in the splitter.

ideal : int

Specifies an ideal height for the splitter window column in pixels.

min : int

Specifies a minimum height for the splitter window column in pixels.


PyCSplitterWnd.SetRowInfo

SetRowInfo(row, ideal, min)

Sets a new minimum height and ideal height for a row.

Parameters

row : int

The row in the splitter.

ideal : int

Specifies an ideal height for the splitter window row in pixels.

min : int

Specifies a minimum height for the splitter window row in pixels.


PyCStatusBar

PyCStatusBar Object

A class which encapsulates an MFC CStatusBar . Derived from a PyCControlBar object.

Methods

SetIndicators
Sets each indicator's ID.


PyCStatusBar.SetIndicators

SetIndicators(indicators)

Sets each indicator's ID.

Parameters

indicators : tuple

A tuple containing the ID's of the indicators.


PyCStatusBarCtrl

PyCStatusBarCtrl Object

A windows progress bar control. Encapsulates an MFC CStatusBarCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

GetBorders
Retrieve the status bar control's current widths of the horizontal and vertical borders and of the space between rectangles.

GetParts
Retrieve coordinates of the parts in a status bar control.

GetRect
Retrieves the bounding rectangle of a part in a status bar control.

GetText
Retrieves the text of a part in a status bar control.

GetTextAttr
Retrieves the text attributes of a part in a status bar control.

GetTextLength
Retrieves the length of the text in a part in a status bar control.

SetMinHeight
Set the minimum height of a status bar control's drawing area.

SetParts
Sets the number of parts in a status bar control and the coordinate of the right edge of each part.

SetText
Set the text in the given part of a status bar control.


PyCStatusBarCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCStatusBarCtrl.GetBorders

(width, height, spacing) = GetBorders()

Retrieve the status bar control's current widths of the horizontal and vertical borders and of the space between rectangles.


PyCStatusBarCtrl.GetParts

(int) = GetParts(nParts)

Retrieve coordinates of the parts in a status bar control.

Parameters

nParts : int

The number of coordinates to retrieve

Comments

This function, as designed in MFC, returns both the *number* of parts, and, through an OUT parameter, an array of ints giving the coordinates of the parts. There is also an IN parameter saying how many coordinates to give back. Here, we're explicitly changing the semantics a bit.

GetParts() -> Tuple of all coordinates
GetParts(n) -> Tuple of the first n coordinates (or all coordinates, if fewer than n)

So, in Python, you can't simultaneously find out how many coordinates there are, and retrieve a subset of them. In a reasonable universe, there would have been GetParts() -> int, and GetCoords() -> List. This means that I need to call the MFC method twice; once to find out how many there are, and another time to get them.


PyCStatusBarCtrl.GetRect

(left, top, right, bottom) = GetRect(nPane)

Retrieves the bounding rectangle of a part in a status bar control.

Parameters

nPane : int

Zero-based index of the part whose bounding rectangle is to be retrieved.


PyCStatusBarCtrl.GetText

text = GetText(nPane)

Retrieve the text from the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.GetTextAttr

int = GetTextAttr(nPane)

Retrieve the attributes of the text in the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.GetTextLength

int = GetTextLength(nPane)

Retrieve the length the text in the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.SetMinHeight

SetMinHeight(nHeight)

Set the minimum height of a status bar control's drawing area.

Parameters

nHeight : int

Minimum height


PyCStatusBarCtrl.SetParts

SetParts(coord)

Sets the number of parts in a status bar control and the coordinate of the right edge of each part.

Parameters

coord : int...

Coordinates of each part


PyCStatusBarCtrl.SetText

SetText(text, nPane, nType)

Set the text in the given part of a status bar control.

Parameters

text : string

The text to display

nPane : int

Zero-based index of the part to set.

nType : int

Type of drawing operation.

Comments

The drawing type can be set to one of:~ 0 - The text is drawn with a border to appear lower than the plane of the status bar.~ win32con.SBT_NOBORDERS - The text is drawn without borders.~ win32con.SBT_OWNERDRAW - The text is drawn by the parent window.~ win32con.SBT_POPOUT - The text is drawn with a border to appear higher than the plane of the status bar.


PyCTabCtrl

PyCTabCtrl Object

A class which encapsulates an MFC CTabCtrl object. Derived from a PyCWnd object.

Methods

GetCurSel
Gets the current selection of a tab control.

GetItemCountl
Returns the number of tabs in the control.

SetCurSel
Sets the current selection of a tab control.


PyCTabCtrl.GetCurSel

int = GetCurSel()

Gets the current selection of a tab control.

Return Value

The zero-based index of the currently selected item, or -1 if no selection.


PyCTabCtrl.GetItemCountl

int = GetItemCountl()

Returns the number of tabs in the control.


PyCTabCtrl.SetCurSel

int = SetCurSel(index)

Sets the current selection of a tab control.

Parameters

index : int

The index of the tab to set current.

Return Value

The zero-based index of the previously selected item.


PyCToolBar

PyCToolBar Object

A class which encapsulates an MFC CToolBar . Derived from a PyCControlBar object.

Methods

GetButtonStyle
Retrieves the style for a button.

GetButtonText
Gets the text for a button.

GetItemID
Returns the command ID of a button or separator at the given index.

SetButtonInfo
Gets the associated tooltip control

GetToolBarCtrl
Returns the tool bar control object associated with the tool bar

LoadBitmap
Loads the bitmap containing bitmap-button images.

LoadToolBar
Loads a toolbar from a Toolbar resource.

SetBarStyle
Sets toolbar's (CBRS_xxx) part of style

SetBitmap
Sets a bitmapped image.

SetButtonInfo
Sets the button's command ID, style, and image number.

SetButtons
Sets button styles and an index of button images within the bitmap.

SetButtonStyle
Sets the style for a button

SetHeight
Sets the height of the toolbar.

SetSizes
Sets the sizes for the toolbar items.

SetButtonInfo
Sets the tooltips control


PyCToolBar.GetButtonStyle

GetButtonStyle(index)

Retrieves the style for a button.

Parameters

index : int

Index of the item whose style is to be retrieved.


PyCToolBar.GetButtonText

string = GetButtonText(index)

Gets the text for a button.

Parameters

index : int

Index of the item whose text is to be retrieved.


PyCToolBar.GetItemID

GetItemID(index)

Returns the command ID of a button or separator at the given index.

Parameters

index : int

Index of the item whose ID is to be retrieved.


PyCToolBar.GetToolBarCtrl

PyCToolBarCtrl = GetToolBarCtrl()

Gets the toolbar control object for the toolbar


PyCToolBar.LoadBitmap

LoadBitmap(id)

Loads the bitmap containing bitmap-button images.

Parameters

id : int

The bitmap ID.

Alternative Parameters

id

The bitmap ID.

Comments

The bitmap should contain one image for each toolbar button. If the images are not of the standard size (16 pixels wide and 15 pixels high), call PyCToolBar::SetSizes to set the button sizes and their images.


PyCToolBar.LoadToolBar

LoadToolBar(id)

Loads a toolbar from a toolbar resource.

Parameters

id : int

The bitmap ID.

Alternative Parameters

id

The bitmap ID.

Comments

The bitmap should contain one image for each toolbar button. If the images are not of the standard size (16 pixels wide and 15 pixels high), call PyCToolBar::SetSizes to set the button sizes and their images.


PyCToolBar.SetBarStyle

SetBarStyle(style)

Sets the toolbar part of style

Parameters

style : long

The toolbar style to set.


PyCToolBar.SetBitmap

SetBitmap(hBitmap)

Sets a bitmapped image.

Parameters

hBitmap : int

The handle to a bitmap resource.

Comments

Call this method to set the bitmap image for the toolbar. For example, call SetBitmap to change the bitmapped image after the user takes an action on a document that changes the action of a button.


PyCToolBar.SetButtonInfo

SetButtonInfo(index, ID, style, imageIx)

Sets the button's command ID, style, and image number.

Parameters

index : int

Index of the button or separator whose information is to be set.

ID : int

The value to which the button's command ID is set.

style : int

The new button style

imageIx : int

New index for the button's image within the bitmap


PyCToolBar.SetButtonStyle

SetButtonStyle(index, style)

Sets the style for a button.

Parameters

index : int

Index of the item whose style is to be set

style : int

The new style


PyCToolBar.SetButtons

SetButtons(buttons)

Sets button styles and an index of button images within the bitmap.

Parameters

buttons : tuple

A tuple containing the ID's of the buttons.

Alternative Parameters

numButtons

The number of buttons to pre-allocate. If this option is used, then PyCToolBar::PySetButtonInfo must be used.


PyCToolBar.SetHeight

SetHeight(height)

Sets the height of the toolbar.

Parameters

height : int

The height in pixels of the toolbar.


PyCToolBar.SetSizes

SetSizes(sizeButton, sizeButton)

Sets the size of each button.

Parameters

sizeButton : (cx, cy)

The size of each button.

sizeButton : (cx, cy)

The size of each bitmap.


PyCToolBarCtrl

PyCToolBarCtrl Object

A class which encapsulates an MFC CToolBarCtrl . Derived from a PyCWnd object. Created using PyCToolBar::GetToolBarCtrl

Methods

AddBitmap
Add one or more button images to the list of button images

AddButtons
Add one or more buttons

AddStrings
Add one or more strings

AutoSize
Resize the entire toolbar

CheckButton
Check or clear a button

CommandToIndex
Retrieve the zero-based index for the button associated with the specified command identifier.

CreateWindow
Create the actual control

Customize
Display the customize toolbar dialog box

DeleteButton
Delete a button from the toolbar control

EnableButton
Enable or disable a toolbar control button.

GetBitmapFlags
Retrieve the bitmap flags from the toolbar.

GetButton
Retrieve information about the specified button in a toolbar control.

GetButtonCount
Retrieve a count of the buttons currently in the toolbar control.

GetItemRect
Retrieve the bounding rectangle of a button in a toolbar control.

GetRows
Retrieve the number of rows of buttons currently displayed

HideButton
Hide or show the specified button in a toolbar control.

Indeterminate
Hide or show the specified button in a toolbar control.

InsertButton
Insert a button into a toolbar control.

IsButtonChecked
See if a button is checked.

IsButtonEnabled
See if a button is enabled.

IsButtonHidden
See if a button is checked.

IsButtonIndeterminate
See if a button is Indeterminate.

IsButtonPressed
See if a button is pressed.

PressButton
Mark or unmark the specified button as pressed.

SetBitmapSize
Set the size of the actual bitmapped images to be added to a toolbar control.

SetButtonSize
Set the size of the actual buttons to be added to a toolbar control.

SetCmdID
Set the command identifier which will be sent to the owner window when the specified button is pressed.

SetRows
Ask the toolbar control to resize itself to the requested number of rows.


PyCToolBarCtrl.AddBitmap

int = AddBitmap(numButtons, bitmap )

Add one or more button images to the list of button images

Parameters

numButtons : int

Number of button images in the bitmap.

bitmap : PyBitmap

Bitmap containing button or buttons to be added

MFC References

CToolBarCtrl::AddBitmap


PyCToolBarCtrl.AddButtons

int = AddButtons()

Add one or more buttons to the toolbar

MFC References

CToolBarCtrl::AddButtons


PyCToolBarCtrl.AddStrings

int = AddStrings(strings)

Add one or more strings to the toolbar

Parameters

strings : string...

Strings to add. Can give more than one string.

MFC References

CToolBarCtrl::AddStrings


PyCToolBarCtrl.AutoSize

AutoSize()

Resize the entire toolbar control

MFC References

CToolBarCtrl::AutoSize


PyCToolBarCtrl.CheckButton

int = CheckButton(nID, bCheck )

Check or clear a given button in a toolbar control

Parameters

nID : int

Command identifier of the button to check or clear.

bCheck=1 : int

1 to check, 0 to clear the button

MFC References

CToolBarCtrl::CheckButton


PyCToolBarCtrl.CommandToIndex

int = CommandToIndex(nID)

Retrieve the zero-based index for the button associated with the specified command identifier.

Parameters

nID : int

Command identifier of the button you want to find.

MFC References

CToolBarCtrl::CommandToIndex


PyCToolBarCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the window for a new toolbar object

Parameters

style : int

The style for the button. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the button.

parent : PyCWnd

The parent window of the button. Usually a PyCDialog.

id : int

The buttons control ID.

MFC References

CToolBarCtrl::Create


PyCToolBarCtrl.Customize

Customize()

Display the Customize Toolbar dialog box.

MFC References

CToolBarCtrl::Customize


PyCToolBarCtrl.DeleteButton

DeleteButton(nID)

Delete a button from the toolbar control.

Parameters

nID : int

ID of the button to delete.

MFC References

CToolBarCtrl::DeleteButton


PyCToolBarCtrl.EnableButton

EnableButton(nID, bEnable)

Enable or disable a toolbar control button.

Parameters

nID : int

ID of the button to enable or disable.

bEnable=1 : int

1 to enable, 0 to disable

MFC References

CToolBarCtrl::EnableButton


PyCToolBarCtrl.GetBitmapFlags

int = GetBitmapFlags()

retrieve the bitmap flags from the toolbar.

MFC References

CToolBarCtrl::GetBitmapFlags


PyCToolBarCtrl.GetButton

PyCToolBarCtrl::TBBUTTON = GetButton(nID)

Retrieve information about the specified button in a toolbar control.

Parameters

nID : int

ID of the button to retrieve.

MFC References

CToolBarCtrl::GetButton


PyCToolBarCtrl.GetButtonCount

int = GetButtonCount()

Retrieve a count of the buttons currently in the toolbar control.

MFC References

CToolBarCtrl::GetButtonCount


PyCToolBarCtrl.GetItemRect

left, top, right, bottom = GetItemRect(nID)

Retrieve the bounding rectangle of a button in a toolbar control.

Parameters

nID : int

ID of the button.

MFC References

CToolBarCtrl::GetItemRect


PyCToolBarCtrl.GetRows

left, top, right, bottom = GetRows()

Retrieve the number of rows of buttons currently displayed

MFC References

CToolBarCtrl::GetRows


PyCToolBarCtrl.HideButton

HideButton(nID, bEnable)

Hide or show the specified button in a toolbar control.

Parameters

nID : int

ID of the button to hide.

bEnable=1 : int

1 to hide, 0 to show.

MFC References

CToolBarCtrl::HideButton


PyCToolBarCtrl.Indeterminate

Indeterminate(nID, bEnable)

Mark or unmark the specified button as indeterminate

Parameters

nID : int

ID of the button to mark.

bEnable=1 : int

1 to hide, 0 to show.

MFC References

CToolBarCtrl::Indeterminate


PyCToolBarCtrl.InsertButton

int = InsertButton(nID, button )

Insert a button in a toolbar control.

Parameters

nID : int

Zero-based index of a button. This function inserts the new button to the left of this button.

button : PyCToolBarCtrl::TBBUTTON

Bitmap containing button to be inserted

Comments

The image and/or string whose index you provide must have previously been added to the toolbar control's list using PyCToolBarCtrl::AddBitmap, PyCToolBarCtrl::AddString , and/or PyCToolBarCtrl::AddStrings.

MFC References

CToolBarCtrl::InsertButton


PyCToolBarCtrl.IsButtonChecked

int = IsButtonChecked(nID)

Determine whether the specified button in a toolbar control is checked.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonChecked


PyCToolBarCtrl.IsButtonEnabled

int = IsButtonEnabled(nID)

Determine whether the specified button in a toolbar control is enabled.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonEnabled


PyCToolBarCtrl.IsButtonHidden

int = IsButtonHidden(nID)

Determine whether the specified button in a toolbar control is hidden.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonHidden


PyCToolBarCtrl.IsButtonIndeterminate

int = IsButtonIndeterminate(nID)

Determine whether the specified button in a toolbar control is indeterminate.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonIndeterminate


PyCToolBarCtrl.IsButtonPressed

int = IsButtonPressed(nID)

Determine whether the specified button in a toolbar control is pressed.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonPressed


PyCToolBarCtrl.PressButton

PressButton(nID, bEnable)

Mark or unmark the specified button as pressed.

Parameters

nID : int

ID of the button to mark.

bEnable=1 : int

1 to mark, 0 to unmark.

MFC References

CToolBarCtrl::PressButton


PyCToolBarCtrl.SetBitmapSize

SetBitmapSize(width, height)

Set the size of the actual bitmapped images to be added to a toolbar control.

Parameters

width=16 : int

Width of bitmap images.

height=15 : int

Height of bitmap images.

Alternative Parameters

width

Width of bitmap images.

height

Height of bitmap images.

MFC References

CToolBarCtrl::SetBitmapSize


PyCToolBarCtrl.SetButtonSize

SetButtonSize(width, height)

Set the size of the buttons to be added to a toolbar control.

Parameters

width=16 : int

Width of buttons

height=15 : int

Height of buttons

Alternative Parameters

width

Width of bitmap images.

height

Height of bitmap images.

MFC References

CToolBarCtrl::SetButtonSize


PyCToolBarCtrl.SetCmdID

SetCmdID(nIndex, nID)

Set the command identifier which will be sent to the owner window when the specified button is pressed.

Parameters

nIndex : int

The zero-based index of the button whose command ID is to be set.

nID : int

The command ID to set the selected button to.

MFC References

CToolBarCtrl::SetCmdID


PyCToolBarCtrl.SetRows

left, top, right, bottom = SetRows(nRows, bLarger )

Ask the toolbar control to resize itself to the requested number of rows.

Parameters

nRows : int

Requested number of rows.

bLarger : int

Tells whether to use more rows or fewer rows if the toolbar cannot be resized to the requested number of rows.

MFC References

CToolBarCtrl::SetRows


PyCToolTipCtrl

PyCToolTipCtrl Object

A windows tooltip control. Encapsulates an MFC CToolTipCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

UpdateTipText
Update the tool tip text for a control's tools

AddTool
Adds a tool to tooltip control.


PyCToolTipCtrl.AddTool

AddTool(wnd, text, rect, id)

Adds a tool to tooltip control.

Parameters

wnd : PyCWnd

The window of the tool.

text : string

The text for the tool.

rect=None : int, int, int, int

The default rectangle

id : int

The id of the tool


PyCToolTipCtrl.CreateWindow

CreateWindow(parent, style)

Creates the actual control.

Parameters

parent : PyCWnd

The parent window of the control.

style : int

The style for the control.


PyCToolTipCtrl.UpdateTipText

UpdateTipText(text, wnd, id)

Update the tool tip text for a control's tools

Parameters

text : string

The text for the tool.

wnd : PyCWnd

The window of the tool.

id : int

The id of the tool


PyCTreeCtrl

PyCTreeCtrl Object

A class which encapsulates an MFC CTreeCtrl object. Derived from a PyCWnd object.

Methods

CreateWindow
Creates the actual window for the object.

GetCount
Retrieves the number of tree items associated with a tree view control.

GetIndent
Retrieves the offset (in pixels) of a tree view item from its parent.

SetIndent
Sets the offset (in pixels) of a tree view item from its parent.

GetImageList
Retrieves the current image list.

SetImageList
Assigns an image list to a list view control.

GetNextItem
Retrieves the next item.

ItemHasChildren
Returns nonzero if the specified item has child items.

GetChildItem
Retrieves the child item of the specified tree view item.

GetNextSiblingItem
Retrieves the next sibling of the specified tree view item.

GetPrevSiblingItem
Retrieves the previous sibling of the specified tree view item.

GetParentItem
Retrieves the parent item of the specified tree view item.

GetFirstVisibleItem
Retrieves the first visible item of the specified tree view item.

GetNextVisibleItem
Retrieves the next visible item of the specified tree view item.

GetNextVisibleItem
Retrieves the previous visible item of the specified tree view item.

GetSelectedItem
Retrieves the currently selected tree view item.

GetDropHilightItem
Retrieves the target of a drag-and-drop operation.

GetRootItem
Retrieves the root of the specified tree view item.

GetItem
Retrieves the details of an items attributes.

SetItem
Sets some of all of an items attributes.

GetItemState
Retrieves the state of an item.

SetItemState
Sets the state of an item.

GetItemState
Retrieves the index of an items image.

SetItemState
Sets the state of an item.

SetItemText
Changes the text of a list view item or subitem.

GetItemText
Retrieves the text of a list view item or subitem.

GetItemState
Retrieves the object associated with an item.

SetItemState
Sets the object associated with an item.

GetItemRect
Retrieves the bounding rectangle of a tree view item.

GetEditControl
Retrieves the handle of the edit control used to edit the specified tree view item.

GetVisibleCount
Retrieves the number of visible tree items associated with a tree view control.

InsertItem
Inserts an item into the list.

DeleteItem
Deletes an item from the list.

DeleteAllItems
Deletes all items from the list.

Expand
Expands, or collapses, the child items of the specified tree view item.

Select
Selects, scrolls into view, or redraws a specified tree view item.

SelectItem
Selects a specified tree view item.

SelectDropTarget
Redraws the tree item as the target of a drag-and-drop operation.

SelectSetFirstVisible
Selects a specified tree view item as the first visible item.

EditLabel
Edits a specified tree view item in-place.

CreateDragImage
Creates a dragging bitmap for the specified tree view item.

SortChildren
Sorts the children of a given parent item.

EnsureVisible
Ensures that a tree view item is visible in its tree view control.

HitTest
Determines which tree view item, if any, is at a specified position.

Comments

Sam Rushing has found the following tidbits:
You can implement dynamic collapsing and expanding of events for large collections yourself - see KB Q130697
The MFC docs tell you to use TVE_COLLAPSERESET in order to throw away the child items when collapsing a node. They neglect to tell you a very important tidbit: that you need to combine the flag with TVE_COLLAPSE. This is pointed out in the docs for TreeView_Expand(), but not in those for CTreeCtrl::Expand.


PyCTreeCtrl.CreateDragImage

PyCImageList = CreateDragImage(item)

Creates a dragging bitmap for the specified tree view item.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.CreateWindow

CreateWindow(style, rect, PyCWnd, id)

Creates the actual window for the object.

Parameters

style : int

The window style

rect : int, int, int, int

The default rectangle

PyCWnd : parent

The parent window

id : int

The control ID

MFC References

CTreeCtrl::Create


PyCTreeCtrl.DeleteAllItems

object = DeleteAllItems()

Deletes all items in the control


PyCTreeCtrl.DeleteItem

DeleteItem(item)

Deletes the specified item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.EditLabel

PyCEdit = EditLabel(item)

Edits a specified tree view item in-place.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.EnsureVisible

int = EnsureVisible(item)

Ensures that a tree view item is visible in its tree view control.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.Expand

Expand(item, code)

Expands, or collapses, the child items of the specified tree view item.

Parameters

item : HTREEITEM

The specified item

code : int

The action to take


PyCTreeCtrl.GetChildItem

HTREEITEM = GetChildItem(item)

Retrieves the first child item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetCount

int = GetCount()

Retrieves the number of tree items associated with a tree view control.


PyCTreeCtrl.GetDropHilightItem

HTREEITEM = GetDropHilightItem()

Retrieves the target of a drag-and-drop operation.


PyCTreeCtrl.GetEditControl

PyCEdit = GetEditControl()

Retrieves the handle of the edit control used to edit the specified tree view item.


PyCTreeCtrl.GetFirstVisibleItem

HTREEITEM = GetFirstVisibleItem()

Retrieves the first visible item of the tree view control.


PyCTreeCtrl.GetImageList

PyCImageList = GetImageList(nImageList)

Retrieves the current image list.

Parameters

nImageList : int

Value specifying which image list to retrieve. It can be one of:
- commctrl.LVSIL_NORMAL Image list with large icons.
- commctrl.LVSIL_SMALL Image list with small icons.
- commctrl.LVSIL_STATE Image list with state images.


PyCTreeCtrl.GetIndent

int = GetIndent()

Retrieves the offset (in pixels) of a tree view item from its parent.


PyCTreeCtrl.GetItem

PyCTreeCtrl::TV_ITEM tuple = GetItem(item, mask )

Retrieves the details of an items attributes.

Parameters

item : HTREEITEM

The item whose attributes are to be retrieved.

mask=(all flags set) : int

The requested attributes.


PyCTreeCtrl.GetItemRect

(int, int, int, int) = GetItemRect(item, bTextOnly )

Retrieves the bounding rectangle of a tree view item.

Parameters

item : HTREEITEM

The item whose Data is to be set.

bTextOnly : int

f this parameter is nonzero, the bounding rectangle includes only the text of the item. Otherwise it includes the entire line that the item occupies in the tree view control.


PyCTreeCtrl.GetItemState

(int,int) = GetItemState(item, stateMask )

Retrieves the state and mask of an item.

Parameters

item : HTREEITEM

The specified item

stateMask : int

The mask for the result.


PyCTreeCtrl.GetItemText

int = GetItemText(item)

Retrieves the text of a list view item or subitem.

Parameters

item : HTREEITEM

The item whose text is to be retrieved.


PyCTreeCtrl.GetNextItem

HTREEITEM = GetNextItem(item, code )

Retrieves the next item.

Parameters

item : HTREEITEM

The specified item

code : int

Specifies the relationship of the item to fetch.


PyCTreeCtrl.GetNextSiblingItem

HTREEITEM = GetNextSiblingItem(item)

Retrieves the next sibling of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetNextVisibleItem

HTREEITEM = GetNextVisibleItem(item)

Retrieves the next visible item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetParentItem

HTREEITEM = GetParentItem(item)

Retrieves the parent item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetPrevSiblingItem

HTREEITEM = GetPrevSiblingItem(item)

Retrieves the previous sibling of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetRootItem

HTREEITEM = GetRootItem()

Retrieves the root of the specified tree view item.


PyCTreeCtrl.GetSelectedItem

HTREEITEM = GetSelectedItem()

Retrieves the currently selected tree view item.


PyCTreeCtrl.GetVisibleCount

int = GetVisibleCount()

Retrieves the number of visible tree items associated with a tree view control.


PyCTreeCtrl.HitTest

(int, int) = HitTest(x,y)

Determines which tree view item, if any, is at a specified position.

Parameters

x,y : point

The point to test.

Return Value

The result is a tuple of (flags, hItem). flags may be a combination of the following values:

Value | Description
commctrl.TVHT_ABOVE | Above the client area.
commctrl.TVHT_BELOW | Below the client area.
commctrl.TVHT_NOWHERE | In the client area, but below the last item.
commctrl.TVHT_ONITEM | On the bitmap or label associated with an item.
commctrl.TVHT_ONITEMBUTTON | On the button associated with an item.
commctrl.TVHT_ONITEMICON | On the bitmap associated with an item.
commctrl.TVHT_ONITEMINDENT | In the indentation associated with an item.
commctrl.TVHT_ONITEMLABEL | On the label (string) associated with an item.
commctrl.TVHT_ONITEMRIGHT | In the area to the right of an item.
commctrl.TVHT_ONITEMSTATEICON | On the state icon for a tree view item that is in a user-defined state.
commctrl.TVHT_TOLEFT | To the left of the client area.
commctrl.TVHT_TORIGHT | To the right of the client area.


PyCTreeCtrl.InsertItem

int = InsertItem(hParent, hInsertAfter , item )

Inserts an item into the list.

Parameters

hParent : HTREEITEM

The parent item. If commctrl.TVI_ROOT or 0, it is added to the root.

hInsertAfter : HTREEITEM

The item to insert after. Can be an item or TVI_FIRST, TVI_LAST or TVI_SORT

item : PyCTreeCtrl::TV_ITEM tuple

A tuple describing the new item.

Alternative Parameters

mask

Integer specifying which attributes to set

text

The text of the item.

image

The index of the image to use.

selectedImage

The index of the items selected image.

state

The initial state of the item.

stateMask

Specifies which bits of the state are valid.

lParam

A user defined object for the item.

parent

The parent of the item.

parent

The parent of the item.

Alternative Parameters

text

The text for the item.

image

The index of the image to use.

selectedImage

The index of the items selected image.

parent

The parent of the item.

insertAfter

The item to insert the new item after, or TVI_FIRST, TVI_LAST or TVI_SORT

Alternative Parameters

text

The text for the item.

parent

The parent of the item.

parent

The parent of the item.


PyCTreeCtrl.ItemHasChildren

int = ItemHasChildren(item)

Returns nonzero if the specified item has child items.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.Select

Select(item, code)

Selects, scrolls into view, or redraws a specified tree view item.

Parameters

item : HTREEITEM

The specified item

code : int

The action to take


PyCTreeCtrl.SelectDropTarget

SelectDropTarget(item)

Redraws the tree item as the target of a drag-and-drop operation.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SelectItem

SelectItem(item)

Selects a specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SelectSetFirstVisible

SelectSetFirstVisible(item)

Selects a specified tree view item as the first visible item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SetImageList

int = SetImageList(imageList, imageType )

Assigns an image list to a list view control.

Parameters

imageList : PyCImageList

The Image List to use.

imageType : int

Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE


PyCTreeCtrl.SetIndent

SetIndent(indent)

Sets the offset (in pixels) of a tree view item from its parent.

Parameters

indent : int

The new indent.


PyCTreeCtrl.SetItem

int = SetItem(item)

Sets some of all of an items attributes.

Parameters

item : PyCTreeCtrl::TV_ITEM tuple

A tuple describing the new item.


PyCTreeCtrl.SetItemState

SetItemState(item, state, stateMask)

Sets the state of item.

Parameters

item : HTREEITEM

The specified item

state : int

The new state

stateMask : int

The mask for the new state


PyCTreeCtrl.SetItemText

int = SetItemText(item, text )

Changes the text of a list view item or subitem.

Parameters

item : HTREEITEM

The item whose text is to be retrieved.

text : string

String that contains the new item text.


PyCTreeCtrl.SortChildren

SortChildren(item)

Sorts the children of a given parent item.

Parameters

item : HTREEITEM

The specified parent item


PyCTreeView

PyCTreeView Object

A class which implementes a CTreeView. Derived from PyCView and PyCTreeCtrl objects.

Methods

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

GetTreeCtrl
Returns the underlying tree control object.

OnCommand
Calls the standard Python framework OnCommand handler


PyCTreeView.GetTreeCtrl

PyCTreeCtrl = GetTreeCtrl()

Returns the underlying tree control object.


PyCTreeView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCTreeView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCView

PyCView Object

A class which implements a generic CView. Derived from a PyCWnd object.

Methods

CreateWindow
Create the window for a view.

GetDocument
Returns the document for a view.

OnActivateView
Calls the underlying MFC OnActivateView method.

OnInitialUpdate
Calls the underlying MFC OnInitialUpdate method.

OnMouseActivate
Calls the underlying MFC OnMouseActivate method.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

OnFilePrint
Calls the underlying MFC OnFilePrint method.

OnFilePrint
Calls the underlying MFC OnFilePrintPreview method.

DoPreparePrinting
Calls the underlying MFC DoPreparePrinting method.

OnBeginPrinting
Calls the underlying MFC OnBeginPrinting method.

OnEndPrinting
Calls the underlying MFC OnEndPrinting method.


PyCView.CreateWindow

CreateWindow(parent, id, style, rect)

Creates the window for a view.

Parameters

parent : PyCWnd

The parent window (usually a frame)

id=win32ui.AFX_IDW_PANE_FIRST : int

The child ID for the view

style=win32ui.AFX_WS_DEFAULT_VIEW : int

The style for the view

rect=(0,0,0,0) : (left, top, right, bottom)

The default position of the window.


PyCView.DoPreparePrinting

int = DoPreparePrinting()

Invoke the Print dialog box and create a printer device context.

Comments

This function is usually called from PyCView.OnPreparePrinting virtual method


PyCView.GetDocument

PyCDocument = GetDocument()

Returns the document for a view.


PyCView.OnActivateView

int = OnActivateView(activate, activateView , DeactivateView )

Calls the underlying MFC OnActivateView method.

Parameters

activate : int

Indicates whether the view is being activated or deactivated.

activateView : PyCView

The view object that is being activated.

DeactivateView : PyCView

The view object that is being deactivated.

See Also

PyCView.OnActivateView virtual method


PyCView.OnBeginPrinting

OnBeginPrinting()

Calls the underlying MFC OnBeginPrinting method.

See Also

PyCView.OnBeginPrinting virtual method


PyCView.OnEndPrinting

OnEndPrinting()

Calls the underlying MFC OnEndPrinting method.

See Also

PyCView.OnEndPrinting virtual method


PyCView.OnFilePrint

OnFilePrint()

Calls the underlying MFC OnFilePrint method.


PyCView.OnInitialUpdate

OnInitialUpdate()

Calls the underlying MFC OnInitialUpdate method.

See Also

PyCView.OnInitialUpdate virtual method


PyCView.OnMouseActivate

int = OnMouseActivate(wnd, hittest , message )

Calls the base MFC OnMouseActivate function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnMouseActivate virtual method


PyCView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCWinApp

PyCWinApp Object

An application class. Encapsulates an MFC CWinApp class

Methods

AddDocTemplate
Adds a template to the application list.

FindOpenDocument
Returns an existing document with the specified file name.

GetDocTemplateList
Returns a list of all document templates in use.

InitDlgInstance
Calls critical InitInstance processing for a dialog based application.

LoadCursor
Loads a cursor.

LoadStandardCursor
Loads a standard cursor.

LoadOEMCursor
Loads an OEM cursor.

LoadIcon
Loads an icon resource.

LoadStandardIcon
Loads an icon resource.

OpenDocumentFile
Opens a document file by name.

OnFileNew
Calls the underlying OnFileNew MFC method.

OnFileOpen
Calls the underlying OnFileOpen MFC method.

RemoveDocTemplate
Removes a template to the application list.

Run
Starts the main application message pump.

IsInproc
Returns a flag to indicate if the created CWinApp was in the DLL, or an external EXE.


PyCWinApp.AddDocTemplate

AddDocTemplate(template)

Adds a template to the application list.

Parameters

template : PyCDocTemplate

The template to be added.


PyCWinApp.FindOpenDocument

PyCDocument = FindOpenDocument(fileName)

Returns an existing document with the specified file name.

Parameters

fileName : string

The fully qualified filename to search for.


PyCWinApp.GetDocTemplateList

[PyCDocTemplate,...] = GetDocTemplateList()

Returns a list of all document templates.


PyCWinApp.InitDlgInstance

InitDlgInstance(dialog)

Calls critical InitInstance processing for a dialog based application.

Parameters

dialog : PyCDialog

The dialog object to be used as the main window for the application.


PyCWinApp.IsInproc

int = IsInproc()

Returns a flag to indicate if the created CWinApp was in the DLL, or an external EXE.


PyCWinApp.LoadCursor

int = LoadCursor(cursorId)

Loads a cursor.

Parameters

cursorId : int

The ID of the cursor to load.

Alternative Parameters

cursorId

The ID of the cursor to load.


PyCWinApp.LoadIcon

int = LoadIcon(idResource)

Loads an icon resource.

Parameters

idResource : int

The ID of the icon to load.


PyCWinApp.LoadOEMCursor

int = LoadOEMCursor(cursorId)

Loads an OEM cursor.

Parameters

cursorId : int

The ID of the cursor to load.


PyCWinApp.LoadStandardCursor

int = LoadStandardCursor(cursorId)

Loads a standard cursor.

Parameters

cursorId : int

The ID of the cursor to load.

Alternative Parameters

cursorId

The ID of the cursor to load.


PyCWinApp.LoadStandardIcon

int = LoadStandardIcon(resourceName)

Loads an icon resource.

Parameters

resourceName : string

The name of the standard icon to load.


PyCWinApp.OnFileNew

OnFileNew()

Calls the underlying OnFileNew MFC method.


PyCWinApp.OnFileOpen

OnFileOpen()

Calls the underlying OnFileOpen MFC method.


PyCWinApp.OpenDocumentFile

OpenDocumentFile(fileName)

Opens a document file by name.

Parameters

fileName : string

The name of the document to open.


PyCWinApp.RemoveDocTemplate

RemoveDocTemplate(template)

Removes a template to the application list.

Parameters

template : PyCDocTemplate

The template to be removed. Must have previously been added by PyCWinApp::AddDocTemplate.

Comments

Note that MFC does not provide an equivilent function.


PyCWinApp.Run

int = Run()

Starts the message pump. Advanced users only


PyCWinThread

PyCWinThread Object

An application class. Encapsulates an MFC CWinThread class

Methods

CreateThread
Creates the actual thread behind the thread object.

PumpIdle
Pumps idle messages.

PumpMessages
Pumps all messages to the application until a WM_QUIT message is received.

Run
Starts the main application message pump.

SetMainFrame
Sets the C++ applications main frame

SetThreadPriority
Sets the threads priority


PyCWinThread.CreateThread

CreateThread()

Creates the actual thread behind the thread object.


PyCWinThread.PumpIdle

PumpIdle()

Pumps all idle messages.


PyCWinThread.PumpMessages

PumpMessages()

Pumps all messages to the application until a WM_QUIT message is received.

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.


PyCWinThread.Run

int = Run()

Starts the message pump. Advanced users only


PyCWinThread.SetMainFrame

SetMainFrame(mainFrame)

Sets the threads main frame

Parameters

mainFrame : PyCWnd

The applications main frame.

Comments

You can pass None to this function to reset the main frame. Should I free this? I dont think so!


PyCWinThread.SetThreadPriority

SetThreadPriority(priority)

Sets the threads priority. Returns TRUE if successful.

Parameters

priority : PyCWnd

The threads priority.


PyCWnd

PyCWnd Object

A base window class. Encapsulates an MFC CWnd class

Methods

ActivateFrame
Searches upwards for a parent window which has a frame, and activates it.

BringWindowToTop
Brings the window to the top of a stack of overlapping windows.

BeginPaint
Prepares the window for painting.

CalcWindowRect
Computes the size of the window rectangle based on the desired client rectangle size.

CenterWindow
Centers a window relative to its parent.

CheckRadioButton
Selects a specified radio button

ChildWindowFromPoint
Identifies the child window that contains the point

ClientToScreen
Convert coordinates from Client to Screen

CreateWindow
Create the underlying window object

CreateWindowEx
Creates the actual window for the PyCWnd object using extended attributes.

DefWindowProc
Calls the default message handler.

DestroyWindow
Destroys the window attached to the object.

DlgDirList
Fill a listbox control with a file specification.

DlgDirListComboBox
Fill a combobox control with a file specification.

DlgDirSelect
Retrieves the current selection from a list box.

DlgDirSelectComboBox
Retrieves the current selection from a combo box.

DragAcceptFiles
Indicate the window can accept files dragges from file manager.

DrawMenuBar
Redraw the windows menu bar.

EnableWindow
Enable or disable the window.

EndModalLoop
Ends a modal loop.

EndPaint
Ends painting in a window

GetCheckedRadioButton
Get the ID of the checked a radio button in a group.

GetClientRect
Gets the client rectangle for thewindow.

GetDC
Gets the window's current device context.

GetDCEx
Gets the window's current device context.

GetDlgCtrlID
Get the current window's control id.

GetDlgItem
Get a child control by Id

GetDlgItemInt
Returns the integer value of a child window or control with the specified ID.

GetDlgItemText
Returns the text of child window or control with the specified ID.

GetLastActivePopup
Identifies the most recently active pop-up window

GetMenu
Get the current menu for a window.

GetParent
Get the parent window.

GetParentFrame
Returns the window's frame.

GetParent
Returns the child window's parent window or owner window.

GetSafeHwnd
Returns the HWnd of this window.

GetScrollInfo
Retrieve information about a scroll bar

GetScrollPos
Retrieves the current position of the scroll box of a scroll bar.

GetStyle
Retrieves the window style

GetExStyle
Retrieves the window extended style

GetSystemMenu
Get the system menu for the window.

GetTopLevelFrame
Get the top-level frame window.

GetTopLevelOwner
Get the top-level owner window.

GetTopLevelParent
Get the top-level parent window.

GetTopWindow
Get the top level window attached to this window.

GetWindow
Get a specified window (eg, parent, child, etc).

GetWindowDC
Obtains the PyDC for a window.

GetWindowPlacement
Gets the window's current placement information.

GetWindowRect
Get the windows rectangle.

GetWindowText
Get the window's current text.

HideCaret
Hides the caret

HookAllKeyStrokes
Hook a handler for all keystroke messages.

HookKeyStroke
Hook a keystroke handler.

HookMessage
Hook a message notification handler.

InvalidateRect
Invalidate a specified rectangle in a window.

InvalidateRgn
Invalidate a specified region of a window.

IsChild
Indicates if a window is a child.

IsDlgButtonChecked
Indicates if a dialog botton is checked.

IsIconic
Indicates if the window is currently minimised.

IsZoomed
Indicates if the window is currently maximised.

IsWindow
determines whether the specified window handle identifies an existing window.

IsWindowVisible
Determines if the window is currently visible.

IsWindowVisible
Determines if the window is currently enabled.

KillTimer
Destroys a system timer

LockWindowUpdate
Disables drawing in the given window

MapWindowPoints
Converts (maps) a set of points from the coordinate space of the CWnd to the coordinate space of another window.

MouseCaptured
Indicates if the window currently has the mouse captured.

MessageBox
Displays a message box.

ModifyStyle
Modifies the style of a window.

ModifyStyleEx
Modifies the style of a window.

MoveWindow
Moves the window to a new location.

OnClose
Calls the default MFC OnClose handler.

OnCtlColor
Calls the default MFC OnCtlColor handler.

OnEraseBkgnd
Calls the default MFC OnEraseBkgnd handler.

OnNcHitTest
Calls the base MFC OnNcHitTest function.

OnPaint
Calls the default MFC OnPaint handler.

OnQueryDragIcon
Calls the default MFC OnQueryDragIcon handler.

OnQueryNewPalette
Calls the underlying MFC OnQueryNewPalette method.

OnSetCursor
Calls the default MFC OnSetCursor message

OnMouseActivate
Calls the default MFC OnMouseActicate message

OnWndMsg
Calls the default MFC Window Message handler.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PumpWaitingMessages
Calls the Peek/Dispatch loop on the wnd.

RedrawWindow
Updates the specified rectangle or region in the given window's client area.

ReleaseCapture
Releases the mouse capture for the window.

ReleaseDC
Releases a device context, freeing it for use by other applications.

RepositionBars
Repositions the control bars for the window.

RunModalLoop
Starts a modal loop for the window.

PostMessage
Post a message to the window.

SendMessageToDescendants
Send a message to a window's children.

SendMessage
Send a message to the window.

SetActiveWindow
Sets the window active.

SetForegroundWindow
Puts the window into the foreground and activates the window.

SetWindowPos
Sets the windows position information.

ScreenToClient
Converts from screen coordinates to client coordinates.

SetCapture
Captures the mouse input for thw window.

SetDlgItemText
Sets the text for the child window or control with the specified ID.

SetFocus
Sets focus to the window.

SetFont
Sets the window's current font to the specified font.

SetMenu
Sets the menu for a window.

SetRedraw
Sets the redraw flag for the window.

SetScrollPos
Sets the current position of the scroll box of a scroll bar.

SetScrollInfo
Set information about a scroll bar

SetTimer
Installs a system timer

SetWindowPlacement
Sets the window's placement options.

SetWindowText
Sets the window's text.

ShowCaret
Shows the caret

ShowScrollBar
Shows/Hides the window's scroll bars.

ShowWindow
Shows the window.

UnLockWindowUpdate
Unlocks a window that was locked with LockWindowUpdate

UpdateData
Updates a windows dialog data.

UpdateDialogControls
Updates the state of dialog buttons and other controls in a dialog box or window that uses the PyCCmdUI::HookCommandUpdate callback mechanism.

UpdateWindow
Updates a window.


PyCWnd.ActivateFrame

ActivateFrame(cmdShow)

Searches upwards for a parent window which has a frame, and activates it.

Parameters

cmdShow=SW_SHOW : int

The param passed to CFrameWnd::ShowWindow . See also PyCWnd::ShowWindow.

MFC References

CFrameWnd::ActivateFrame


PyCWnd.BeginPaint

PyCDC, PAINTSTRUCT = BeginPaint()

Prepares a window for painting

Return Value

You must pass the PAINTSTRUCT param to the PyCWnd::EndPaint method.


PyCWnd.BringWindowToTop

BringWindowToTop()

Brings the window to the top of a stack of overlapping windows.

Comments

This method activates pop-up, top-level, and MDI child windows. The BringWindowToTop member function should be used to uncover any window that is partially or completely obscured by any overlapping windows.
Calling this method is similar to calling the PyCWnd::SetWindowPos method to change a window's position in the Z order. The BringWindowToTop method does not change the window style to make it a top-level window of the desktop.

MFC References

CWnd::BringWindowToTop


PyCWnd.CalcWindowRect

(left, top, right, bottom) = CalcWindowRect(rect, nAdjustType )

Computes the size of the window rectangle based on the desired client rectangle size. The resulting size can then be used as the initial size for the window object.

Parameters

rect : (left, top, right, bottom)

The size to calculate from

nAdjustType=adjustBorder : int

An enumerated type used for in-place editing. It can have the following values: CWnd::adjustBorder = 0, which means that scrollbar sizes are ignored in calculation; and CWnd::adjustOutside = 1, which means that they are added into the final measurements of the rectangle.

MFC References

CWnd::CalcWindowRect


PyCWnd.CenterWindow

CenterWindow(altwin)

Centers a window relative to its parent.

Parameters

altwin=None : PyCWnd

alternate window relative to which it will be centered (other than the parent window).

MFC References

CWnd::CenterWindow


PyCWnd.CheckRadioButton

CheckRadioButton(idFirst, idLast, idCheck)

Selects the specified radio button, and clears all others in the group.

Parameters

idFirst : int

The identifier of the first radio button in the group.

idLast : int

The identifier of the last radio button in the group.

idCheck : int

The identifier of the radio button to be checked.

MFC References

CWnd::CheckRadioButton


PyCWnd.ChildWindowFromPoint

PyCWnd = ChildWindowFromPoint(x, y , flag )

Returns the child window that contains the point

Parameters

x : int

x coordinate of point

y : int

y coordinate of point

flag=0 : int

Specifies which child windows to skip

MFC References

CWnd::ChildWindowFromPoint


PyCWnd.ClientToScreen

(x,y) or (l, t, r, b) = ClientToScreen(point)

Converts the client coordinates of a given point on the display to screen coordinates.

Parameters

point : (x,y)

The client coordinates.

Alternative Parameters

rect

The client coordinates.

Comments

The new screen coordinates are relative to the upper-left corner of the system display. This function assumes that the given pointis in client coordinates.

MFC References

CWnd::ClientToScreen


PyCWnd.CreateWindow

CreateWindow(classId, windowName, style, rect, parent, id, context)

Creates the actual window

Parameters

classId : string

The class ID for the window, or None

windowName : string

The title for the window, or None

style : int

The style for the window.

rect : (left, top, right, bottom)

The size and position of the window.

parent : PyCWnd

The parent window of the new window..

id : int

The control's ID.

context=None : object

A CreateContext object.

MFC References

CWnd::Create


PyCWnd.CreateWindowEx

CreateWindowEx(styleEx, classId, windowName, style, rect, parent, id, createStruct, createStruct)

Creates the actual window using extended capabilities.

Parameters

styleEx : int

The extended style of the window being created.

classId : string

The class ID for the window. May not be None.

windowName : string

The title for the window, or None

style : int

The style for the window.

rect : (left, top, right, bottom)

The size and position of the window.

parent : PyCWnd

The parent window of the new window..

id : int

The control's ID.

createStruct=None : CREATESTRUCT

A CreateStruct object (ie, a tuple)

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

MFC References

CWnd::CreateEx


PyCWnd.DefWindowProc

int = DefWindowProc(message, idLast , idCheck )

Calls the default message handler.

Parameters

message : int

The Windows message.

idLast : int

The lParam for the message.

idCheck : int

The wParam for the message.

MFC References

CWnd::DefWindowProc


PyCWnd.DestroyWindow

DestroyWindow()

Destroy the window attached to the object.

Comments

The DestroyWindow member function sends appropriate messages to the window to deactivate it and remove the input focus. It also destroys the window's menu, flushes the application queue, destroys outstanding timers, removes Clipboard ownership, and breaks the Clipboard-viewer chain if CWnd is at the top of the viewer chain. It sends WM_DESTROY and WM_NCDESTROY messages to the window.


PyCWnd.DlgDirList

DlgDirList(defPath, idListbox, idStaticPath, fileType)

Fill a list box with a file or directory listing.

Parameters

defPath : string

The file spec to fill the list box with

idListbox : int

The Id of the listbox control to fill.

idStaticPath : int

The Id of the static control used to display the current drive and directory. If idStaticPath is 0, it is assumed that no such control exists.

fileType : int

Specifies the attributes of the files to be displayed. It can be any combination of DDL_READWRITE, DDL_READONLY, DDL_HIDDEN, DDL_SYSTEM, DDL_DIRECTORY, DDL_ARCHIVE, DDL_POSTMSGS, DDL_DRIVES or DDL_EXCLUSIVE

MFC References

CWnd::DlgDirList


PyCWnd.DlgDirListComboBox

DlgDirListComboBox()

Fill a combo with a file or directory listing. See PyCWnd::DlgDirList for details.

MFC References

CWnd::DlgDirListComboBox


PyCWnd.DlgDirSelect

string = DlgDirSelect(idListbox)

Retrieves the current selection from a list box. It assumes that the list box has been filled by the PyCWnd::DlgDirList member function and that the selection is a drive letter, a file, or a directory name.

Parameters

idListbox : int

The Id of the listbox.

MFC References

CWnd::DlgDirSelect


PyCWnd.DlgDirSelectComboBox

string = DlgDirSelectComboBox(idListbox)

Retrieves the current selection from the list box of a combo box. It assumes that the list box has been filled by the PyCWnd::DlgDirListComboBox member function and that the selection is a drive letter, a file, or a directory name.

Parameters

idListbox : int

The Id of the combobox.

MFC References

CWnd::DlgDirSelectComboBox


PyCWnd.DragAcceptFiles

DragAcceptFiles(bAccept)

Indicates that the window and children supports files dropped from file manager

Parameters

bAccept=1 : int

A flag indicating if files are accepted.

MFC References

CWnd::DragAcceptFiles


PyCWnd.DrawMenuBar

DrawMenuBar()

Redraws the menu bar. Can be called if the menu changes.


PyCWnd.EnableWindow

int = EnableWindow(bEnable)

Enables or disables the window. Typically used for dialog controls.

Parameters

bEnable=1 : int

A flag indicating if the window is to be enabled or disabled.

MFC References

CWnd::EnableWindow

Return Value

Returns the state before the EnableWindow member function was called


PyCWnd.EndModalLoop

EndModalLoop(result)

Ends a modal loop.

Parameters

result : int

The result as returned to RunModalLoop


PyCWnd.EndPaint

EndPaint(paintStruct)

Ends painting

Parameters

paintStruct : PAINTSTRUCT

The object returned from PyCWnd::BeginPaint


PyCWnd.GetCheckedRadioButton

int = GetCheckedRadioButton(idFirst, idLast )

Returns the ID of the checked radio button, or 0 if none is selected.

Parameters

idFirst : int

The Id of the first radio button in the group.

idLast : int

The Id of the last radio button in the group.

MFC References

CWnd::GetCheckedRadioButton


PyCWnd.GetClientRect

(left, top, right, bottom) = GetClientRect()

Returns the client coordinates of the window. left and top will be zero.


PyCWnd.GetDC

PyCDC = GetDC()

Gets the windows current DC object.

Return Value

The result is a PyCDC, or a win32ui.error exception is raised.


PyCWnd.GetDCEx

PyCDC = GetDCEx()

Gets the windows current DC object with extended caps.


PyCWnd.GetDlgCtrlID

int = GetDlgCtrlID()

Returns the ID of this child window.

MFC References

CWnd::GetDlgCtrlId


PyCWnd.GetDlgItem

PyCWnd = GetDlgItem(idControl)

Returns a window object for the child window or control with the specified ID. The type of the return object will be as specific as possible, but will always be derived from an PyCWnd object.

Parameters

idControl : int

The Id of the control to be retrieved.

MFC References

CWnd::GetDlgItem

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


PyCWnd.GetDlgItemInt

int = GetDlgItemInt(idControl, bUnsigned )

Returns the integer value of a child window or control with the specified ID.

Parameters

idControl : int

The Id of the control to be retrieved.

bUnsigned=1 : int

Should the function check for a minus sign

MFC References

CWnd::GetDlgItemInt

Return Value

If the value can not be converted, a ValueError is raised.


PyCWnd.GetDlgItemText

string = GetDlgItemText(idControl)

Returns the text of child window or control with the specified ID.

Parameters

idControl : int

The Id of the control to be retrieved.

MFC References

CWnd::GetDlgItemText


PyCWnd.GetExStyle

int = GetExStyle()

Retrieves the window's extended style


PyCWnd.GetLastActivePopup

PyCWnd = GetLastActivePopup()

Returns the last active popup Window, or the Window itself.

MFC References

CWnd::GetLastActivePopup

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetMenu

PyCMenu = GetMenu()

Returns the menu object for the window's menu.

MFC References

CWnd::GetMenu

Return Value

The result is a PyMenu object, or an exception is thrown.


PyCWnd.GetParent

PyCWnd = GetParent()

Returns the window's parent.

MFC References

CWnd::GetParent

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetParentFrame

PyCWnd = GetParentFrame()

Returns the window's frame.

MFC References

CWnd::GetParentFrame

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetSafeHwnd

int = GetSafeHwnd()

Returns the HWnd of this window.

MFC References

CWnd::GetSafeHwnd


PyCWnd.GetScrollInfo

int = GetScrollInfo(nBar, mask )

Returns information about a scroll bar

Parameters

nBar : int

The scroll bar to examine. Can be one of win32con.SB_BOTH, win32con.SB_VERT or win32con.SB_HORZ

mask=SIF_ALL : int

The mask for attributes to retrieve.


PyCWnd.GetScrollPos

int = GetScrollPos(nBar)

Retrieves the current position of the scroll box of a scroll bar.

Parameters

nBar : int

The scroll bar to examine. Can be one of win32con.SB_VERT or win32con.SB_HORZ


PyCWnd.GetStyle

int = GetStyle()

Retrieves the window style


PyCWnd.GetSystemMenu

PyCMenu = GetSystemMenu()

Returns the menu object for the window's system menu.

MFC References

CWnd::GetSystemMenu


PyCWnd.GetTopLevelFrame

PyCWnd = GetTopLevelFrame()

Returns the top-level frame of the window.

MFC References

CWnd::GetTopLevelFrame

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopLevelOwner

PyCWnd = GetTopLevelOwner()

Returns the top-level owner of the window.

MFC References

CWnd::GetTopLevelOwner

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopLevelParent

PyCWnd = GetTopLevelParent()

Returns the top-level parent of the window.

MFC References

CWnd::GetTopLevelParent

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopWindow

PyCWnd = GetTopWindow()

Identifies the top-level child window in a linked list of child windows.

Comments

Searches for the top-level child window that belongs to this window. If this window has no children, this function returns None

MFC References

CWnd::GetTopWindow

Return Value

If no child windows exist, the value is None.


PyCWnd.GetWindow

PyCWnd = GetWindow(type)

Returns a window, with the specified relationship to this window.

Parameters

type : int

Specifies the relationship between the current and the returned window. It can take one of the following values: GW_CHILD, GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV or GW_OWNER

MFC References

CWnd::GetWindow

Return Value

The result is a PyCWnd or None if no Window can be found.


PyCWnd.GetWindowDC

PyCDC = GetWindowDC()

Gets the windows current DC object.


PyCWnd.GetWindowPlacement

tuple = GetWindowPlacement()

Returns placement information about the current window.

MFC References

CWnd::GetWindowPlacement

Return Value

The result is a tuple of (flags, showCmd, (minposX, minposY), (maxposX, maxposY), (normalposX, normalposY))

Item | Description
flags | One of the WPF_* constants
showCmd | Current state - one of the SW_* constants.
minpos | Specifies the coordinates of the window's upper-left corner when the window is minimized.
maxpos | Specifies the coordinates of the window's upper-left corner when the window is maximized.
normalpos | Specifies the window's coordinates when the window is in the restored position.


PyCWnd.GetWindowRect

(left, top, right, bottom) = GetWindowRect()

Returns the screen coordinates of the windows upper left corner

MFC References

CWnd::GetWindowRect


PyCWnd.GetWindowText

string = GetWindowText()

Returns the windows text.

MFC References

CWnd::Py_BuildValue


PyCWnd.HideCaret

HideCaret()

Hides the caret

Comments

See also PyCWnd::ShowCaret


PyCWnd.HookAllKeyStrokes

HookAllKeyStrokes(obHandler)

Hook a key stroke handler for all key strokes.

Parameters

obHandler : object

The handler for the keystrokes. This must be a callable object.

Comments

The handler object passed will be called as the application receives WM_CHAR messages. The handler will be called with 2 arguments
The handler object (as per all hook functions).
The keystroke being handled.
If the handler returns TRUE, then the keystroke will be passed on to the default handler, otherwise it will be consumed.
Note: This handler will prevent any PyCWnd::HookKeyStroke hooks from being called.


PyCWnd.HookKeyStroke

object = HookKeyStroke(obHandler, ch )

Hook a key stroke handler

Parameters

obHandler : object

The handler of the keystroke. This must be a callable object.

ch : int

The ID for the keystroke to be handled. This may be an ascii code, or a virtual key code.

Comments

The handler object passed will be called as the application receives WM_CHAR message for the specified character code. The handler will be called with 2 arguments
The handler object (as per all hook functions)
The keystroke being handled.
If the handler returns TRUE, then the keystroke will be passed on to the default handler, otherwise the keystroke will be consumed.
Note: This handler will not be called if a PyCWnd::HookAllKeyStrokes hook is in place.

Return Value

The return value is the previous handler, or None.


PyCWnd.HookMessage

object = HookMessage(obHandler, message )

Hook a message notification handler

Parameters

obHandler : object

The handler for the message notification. This must be a callable object.

message : int

The ID of the message to be handled.

Comments

The handler object passed will be called as the application receives messages with the specified ID. Note that it is not possible for PythonWin to consume a message - it is always passed on to the default handler. The handler will be called with 2 arguments
The handler object (as per all hook functions).
A tuple representing the message.
The message tuple is in the following format:

Items

[0] int : hwnd

The hwnd of the window.

[1] int : message

The message.

[2] int : wParam

The wParam sent with the message.

[3] int : lParam

The lParam sent with the message.

[4] int : time

The time the message was posted.

[5] int, int : point

The point where the mouse was when the message was posted.

Return Value

The return value is the previous handler, or None.


PyCWnd.InvalidateRect

InvalidateRect(rect, bErase)

Invalidates an area of a window.

Parameters

rect=(0,0,0,0) : (left, top, right, bottom)

Rectangle to be updated. If default param is used, the entire window is invalidated.

bErase=1 : int

Specifies whether the background within the update region is to be erased.

MFC References

CWnd::InvalidateRect


PyCWnd.InvalidateRgn

InvalidateRgn(region, bErase)

Invalidates a region of the window

Parameters

region : PyCRgn

The region to erase.

bErase=1 : int

Indicates if the region should be erased.


PyCWnd.IsChild

int = IsChild(obWnd)

Determines if a given window is a child of this window.

Parameters

obWnd : PyCWnd

The window to be checked

MFC References

CWnd::IsChild


PyCWnd.IsDlgButtonChecked

int = IsDlgButtonChecked(idCtl)

Determines if a dialog button is checked.

Parameters

idCtl : int

The ID of the button to check.

MFC References

CWnd::IsDlgButtonChecked


PyCWnd.IsIconic

int = IsIconic()

Determines if the window is currently displayed as an icon.


PyCWnd.IsWindow

int = IsWindow()

determines whether the specified window handle identifies an existing window


PyCWnd.IsWindowVisible

int = IsWindowVisible()

Determines if the window is currently visible.


PyCWnd.IsZoomed

int = IsZoomed()

Determines if the window is currently maximised.


PyCWnd.KillTimer

int = KillTimer()

Kills a system timer

MFC References

CWnd::KillTimer


PyCWnd.LockWindowUpdate

LockWindowUpdate()

Disables drawing in the given window

MFC References

CWnd::LockWindowUpdate


PyCWnd.MapWindowPoints

MapWindowPoints(wnd, points)

Converts (maps) a set of points from the coordinate space of a window to the coordinate space of another window.

Parameters

wnd : PyCWnd

points : [ (x,y), ...]

The points to map

Return Value

A list of the mapped points from the coordinate space of the CWnd to the coordinate space of another window.


PyCWnd.MessageBox

MessageBox(message, title, style)

Display a message box.

Parameters

message : string

The message to be displayed in the message box.

title=None : string/None

The title for the message box. If None, the applications title will be used.

style=win32con.MB_OK : int

The style of the message box.

MFC References

CWnd::MessageBox

Return Value

An integer identifying the button pressed to dismiss the dialog.


PyCWnd.ModifyStyle

int = ModifyStyle(remove, add , flags )

Modifies the style of a window.

Parameters

remove : int

Specifies window styles to be removed during style modification.

add : int

Specifies window styles to be added during style modification.

flags=0 : int

Flags to be passed to SetWindowPos, or zero if SetWindowPos should not be called. The default is zero.

Comments

If nFlags is nonzero, ModifyStyle calls the Windows API function ::SetWindowPos and redraws the window by combining nFlags with the following four preset flags:
* SWP_NOSIZE Retains the current size.
* SWP_NOMOVE Retains the current position.
* SWP_NOZORDER Retains the current Z order.
* SWP_NOACTIVATE Does not activate the window.
See also PyCWnd::ModifyStyleEx

MFC References

CWnd::ModifyStyle

Return Value

The result is true if the style was changed, or false if the style is already the same as requested and no change was made.


PyCWnd.ModifyStyleEx

int = ModifyStyleEx(remove, add , flags )

Modifies the extended style of a window.

Parameters

remove : int

Specifies extended window styles to be removed during style modification.

add : int

Specifies extended extended window styles to be added during style modification.

flags=0 : int

Flags to be passed to SetWindowPos, or zero if SetWindowPos should not be called. The default is zero.

Comments

If nFlags is nonzero, ModifyStyleEx calls the Windows API function ::SetWindowPos and redraws the window by combining nFlags with the following four preset flags:
* SWP_NOSIZE Retains the current size.
* SWP_NOMOVE Retains the current position.
* SWP_NOZORDER Retains the current Z order.
* SWP_NOACTIVATE Does not activate the window.
See also PyCWnd::ModifyStyle

MFC References

CWnd::ModifyStyleEx

Return Value

The result is true if the style was changed, or false if the style is already the same as requested and no change was made.


PyCWnd.MouseCaptured

int = MouseCaptured()

Returns 1 if the window has the mouse capture, else 0


PyCWnd.MoveWindow

MoveWindow(rect, bRepaint)

Move a window to a new location.

Parameters

rect : (left, top, right, bottom)

The new location of the window, relative to the parent.

bRepaint=1 : int

Indicates if the window should be repainted after the move.

MFC References

CWnd::MoveWindow


PyCWnd.OnClose

int = OnClose()

Calls the default MFC OnClose handler.

See Also

PyCWnd.OnClose virtual method

MFC References

CWnd::OnClose


PyCWnd.OnCtlColor

int = OnCtlColor(dc, control , type )

Calls the default MFC OnCtlColor handler.

Parameters

dc : PyCDC

The dc

control : PyCWin

The control that want's it's color changed

type : int

Type of control

See Also

PyCWnd.OnCtlColor virtual method

MFC References

CWnd::OnCtlColor


PyCWnd.OnEraseBkgnd

int = OnEraseBkgnd(dc)

Calls the default MFC OnEraseBkgnd handler.

Parameters

dc : PyCDC

The dc

See Also

PyCWnd.OnEraseBkgnd virtual method

MFC References

CWnd::OnEraseBkgnd


PyCWnd.OnMouseActivate

int = OnMouseActivate(wnd, hittest , message )

Calls the base MFC OnMouseActivate function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnMouseActivate virtual method


PyCWnd.OnNcHitTest

int = OnNcHitTest(x, y)

Calls the base MFC OnNcHitTest function.

Parameters

x, y : int, int

The point

See Also

PyCWnd.OnNcHitTest virtual method


PyCWnd.OnPaint

int = OnPaint()

Calls the default MFC OnPaint handler.

See Also

PyCWnd.OnPaint virtual method

MFC References

CWnd::OnEraseBkgnd


PyCWnd.OnQueryDragIcon

int = OnQueryDragIcon()

Calls the default MFC OnQueryDragIcon handler.

See Also

PyCWnd.OnQueryDragIcon virtual method


PyCWnd.OnQueryNewPalette

int = OnQueryNewPalette()

Calls the underlying MFC OnQueryNewPalette method.

See Also

PyCWnd.OnQueryNewPalette virtual method


PyCWnd.OnSetCursor

int = OnSetCursor(wnd, hittest , message )

Calls the base MFC OnSetCursor function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnSetCursor virtual method


PyCWnd.OnWndMsg

(int,int) = OnWndMsg(msg, wParam , lParam )

Calls the default MFC Window Message handler.

Parameters

msg : int

The message

wParam : int

The wParam for the message

lParam : int

The lParam for the message

MFC References

CWnd::OnWndMsg

Return Value

The return value is a tuple of (int, int), being the return value from the MFC function call, and the value of the lResult param. Please see the MFC documentation for more details.


PyCWnd.PostMessage

PostMessage(idMessage, wParam, lParam)

Post a message to the window.

Parameters

idMessage : int

The ID of the message to post.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

MFC References

CWnd::PostMessage


PyCWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCWnd.PumpWaitingMessages

PumpWaitingMessages(firstMsg, lastMsg)

Pump messages associate with a window.

Parameters

firstMsg : int

First message ID to process

lastMsg : int

First message ID to process

MFC References

CWnd::PeekMessage and DispatchMessage


PyCWnd.RedrawWindow

RedrawWindow(rect, object, flags)

Updates the specified rectangle or region in the given window's client area.

Parameters

rect=None : (left, top, right, bottom)

A rect, or None

object=PyCRgn or None : PyCRgn

A region

flags=RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE : int

MFC References

CWnd::RedrawWindow


PyCWnd.ReleaseCapture

ReleaseCapture()

Releases the mouse capture for this window. See PyCWnd::SetCapture.


PyCWnd.ReleaseDC

ReleaseDC(dc)

Releases a device context, freeing it for use by other applications.

Parameters

dc : PyCDC

The DC to be released.


PyCWnd.RepositionBars

RepositionBars(idFirst, idLast, idLeftOver)

Repositions the windows control bars.( UINT nIDFirst, UINT nIDLast, UINT nIDLeftOver, UINT nFlag = CWnd::reposDefault, LPRECT lpRectParam = NULL, LPCRECT lpRectClient = NULL, BOOL bStretch = TRUE );

Parameters

idFirst : int

The ID of the first control to reposition.

idLast : int

The ID of the last control to reposition.

idLeftOver : int


PyCWnd.RunModalLoop

int = RunModalLoop(flags)

Begins a modal loop for the window.

Parameters

flags : int


PyCWnd.ScreenToClient

(left, top, right, bottom) or (x, y) = ScreenToClient(rect)

Converts the screen coordinates of a given point or rectangle on the display to client coordinates.

Parameters

rect : (left, top, right, bottom) or (x,y)

The coordinates to convert.

Alternative Parameters

pnt

The coordinates to convert.

MFC References

CWnd::ScreenToClient

Return Value

The result is the same size as the input argument.


PyCWnd.SendMessage

SendMessage(idMessage, wParam, lParam)

Send a message to the window.

Parameters

idMessage : int

The ID of the message to send.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

Alternative Parameters

idMessage

The ID of the message to send.

ob

A buffer whose size is passed in wParam, and address is passed in lParam

MFC References

CWnd::SendMessage


PyCWnd.SendMessageToDescendants

SendMessageToDescendants(idMessage, wParam, lParam, bDeep)

Send a message to all descendant windows.

Parameters

idMessage : int

The ID of the message to send.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

bDeep=1 : int

Indicates if the message should be recursively sent to all children

MFC References

CWnd::SendMessageToDescendants


PyCWnd.SetActiveWindow

PyCWnd = SetActiveWindow()

Sets the window active. Returns the previously active window, or None.

Return Value

The result is the previous window with focus, or None.


PyCWnd.SetCapture

SetCapture()

Causes all subsequent mouse input to be sent to the window object regardless of the position of the cursor.


PyCWnd.SetDlgItemText

SetDlgItemText(idControl, text)

Sets the text for the child window or control with the specified ID.

Parameters

idControl : int

The Id of the control

text : string

The new text

MFC References

CWnd::SetDlgItemText


PyCWnd.SetFocus

SetFocus()

Claims the input focus. The object that previously had the focus loses it.


PyCWnd.SetFont

SetFont(font, bRedraw)

Sets the window's current font to the specified font.

Parameters

font : PyCFont

The new font to use.

bRedraw=1 : int

If TRUE, redraw the window.


PyCWnd.SetForegroundWindow

SetForegroundWindow()

Puts the window into the foreground and activates the window.


PyCWnd.SetMenu

SetMenu(menuObj)

Sets the menu for a window.

Parameters

menuObj : PyCMenu

The menu object to set, or None to remove the window.


PyCWnd.SetRedraw

SetRedraw(bState)

Allows changes to be redrawn or to prevent changes from being redrawn.

Parameters

bState=1 : int

Specifies the state of the redraw flag.

MFC References

CWnd::SetRedraw


PyCWnd.SetScrollInfo

int = SetScrollInfo(nBar, redraw )

Set information about a scroll bar

Parameters

nBar : int

The scroll bar to examine. Can be one of win32con.SB_BOTH, win32con.SB_VERT or win32con.SB_HORZ

redraw=1 : int

A flag indicating if the scrollbar should be re-drawn.


PyCWnd.SetScrollPos

int = SetScrollPos(nBar, nPos , redraw )

Sets the current position of the scroll box of a scroll bar.

Parameters

nBar : int

The scroll bar to set. Can be one of win32con.SB_VERT or win32con.SB_HORZ

nPos : int

The new position

redraw=1 : int

A flag indicating if the scrollbar should be redrawn.


PyCWnd.SetTimer

int = SetTimer(idEvent, elapse )

Installs a system timer

Parameters

idEvent : int

The ID of the event

elapse : int

How often the timer should fire.

MFC References

CWnd::SetTimer


PyCWnd.SetWindowPlacement

SetWindowPlacement(placement)

Sets the windows placement

Parameters

placement : (tuple)

A tuple representing the WINDOWPLACEMENT structure.

MFC References

CWnd::SetWindowPlacement


PyCWnd.SetWindowPos

SetWindowPos(hWndInsertAfter, position, flags)

Sets the windows position information

Parameters

hWndInsertAfter : int

A hwnd, else one of the win32con.HWND_* constants.

position : (x,y,cx,cy)

The new position of the window.

flags : int

Window positioning flags.

MFC References

CWnd::SetWindowPos


PyCWnd.SetWindowText

SetWindowText(text)

Sets the window's text.

Parameters

text : string

The windows text.

MFC References

CWnd::SetWindowText


PyCWnd.ShowCaret

ShowCaret()

Shows the caret

Comments

See also PyCWnd::HideCaret


PyCWnd.ShowScrollBar

ShowScrollBar(nBar, bShow)

Shows or hides a scroll bar. An application should not call ShowScrollBar to hide a scroll bar while processing a scroll-bar notification message.

Parameters

nBar : int

Specifies whether the scroll bar is a control or part of a window's nonclient area. If it is part of the nonclient area, nBar also indicates whether the scroll bar is positioned horizontally, vertically, or both. It must be one of win32con.SB_BOTH, win32con.SB_HORZ or win32con.SB_VERT.

bShow=1 : int

Indicates if the scroll bar should be shown or hidden.

MFC References

CWnd::ShowScrollBar


PyCWnd.ShowWindow

int = ShowWindow(style)

Sets the visibility state of the window.

Parameters

style=win32con.SW_SHOWNORMAL : int

Specifies how the window is to be shown. It must be one of win32con.SW_HIDE, win32con.SW_MINIMIZE, win32con.SW_RESTORE, win32con.SW_SHOW, win32con.SW_SHOWMAXIMIZED win32con.SW_SHOWMINIMIZED, win32con.SW_SHOWMINNOACTIVE, win32con.SW_SHOWNA, win32con.SW_SHOWNOACTIVATE, or win32con.SW_SHOWNORMAL

MFC References

CWnd::ShowWindow

Return Value

Returns TRUE is the window was previously visible.


PyCWnd.UnlockWindowUpdate

UnlockWindowUpdate()

Unlocks a window that was locked with LockWindowUpdate

MFC References

CWnd::UnLockWindowUpdate


PyCWnd.UpdateData

int = UpdateData(bSaveAndValidate)

Initialises data in a dialog box, or to retrieves and validates dialog data. Returns nonzero if the operation is successful; otherwise 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.

Parameters

bSaveAndValidate=1 : int

Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).

MFC References

CWnd::UpdateData


PyCWnd.UpdateDialogControls

int = UpdateDialogControls(pTarget, disableIfNoHandler )

Updates the state of dialog buttons and other controls in a dialog box or window that uses the PyCCmdUI::HookCommandUpdate callback mechanism.

Parameters

pTarget : PyCCmdTarget

The main frame window of the application, and is used for routing update messages.

disableIfNoHandler : int

Flag that indicates whether a control that has no update handler should be automatically displayed as disabled.


PyCWnd.UpdateWindow

UpdateWindow()

Updates a window. This forces a paint message to be sent to the window, if any part of the window is marked as invalid.


PyDLL

PyDLL Object

A DLL object. A general utility object, and not associated with an MFC object.

Methods

GetFileName
Returns the file name of the DLL associated with the object.

AttachToMFC
Attaches the DLL to the internal list of MFC DLL's.


PyDLL.__repr__

string = __repr__()

Returns the HINSTANCE and filename of the DLL.

Win32 API References

GetModuleFileName


PyDLL.AttachToMFC

AttachToMFC()

Attaches the DLL object to the MFC list of DLL's.

Comments

After calling this method, MFC will search this DLL when looking for resources. A program can use this function once, instead of specifying the DLL in each call to load/find a resource.
In addition, this is the only way that an application can provide status bar messages and tool tips for custom control ID's in an external DLL.


PyDLL.GetFileName

string = GetFileName()

Returns the name of the module associated with the DLL.

Comments

Note that this is the name that Windows knows the DLL by, not necessarily the name that was specified!


TV_ITEM

TV_ITEM Object

Describes a TV_ITEM tuple, used by the PyCListCtrl object. A tuple of 8 items:
When passed to Python, will always be a tuple of size 8, and items may be None if not available.
When passed from Python, the tuple may be any length up to 8, and any item may be None.

Items

[0] int : hItem

Item handle

[1] int : state

Item state

[2] int : stateMask

Item state mask

[3] string : text

Item text

[4] int : iImage

Offset of items image.

[5] int : iSelectedImage

Offset of items selected image.

[6] int : cChildren

Number of child items.

[7] int : lParam

User defined integer param.

Parameters

cxy : int

Width or height of item

pszText : string

Item text

text : string

Item text

fmt : int

code for centering etc of string

lParam : int

User defined integer param.


Constants

  • AFX_IDW_PANE_FIRST
  • AFX_IDW_PANE_LAST
  • AFX_WS_DEFAULT_VIEW
  • CDocTemplate_Confidence_maybeAttemptForeign
  • CDocTemplate_Confidence_maybeAttemptNative
  • CDocTemplate_Confidence_noAttempt
  • CDocTemplate_Confidence_yesAlreadyOpen
  • CDocTemplate_Confidence_yesAttemptForeign
  • CDocTemplate_Confidence_yesAttemptNative
  • CDocTemplate_docName
  • CDocTemplate_fileNewName
  • CDocTemplate_filterExt
  • CDocTemplate_filterName
  • CDocTemplate_regFileTypeId
  • CDocTemplate_regFileTypeName
  • CDocTemplate_windowTitle
  • COleClientItem_activeState
  • COleClientItem_activeUIState
  • COleClientItem_emptyState
  • COleClientItem_loadedState
  • COleClientItem_openState
  • CRichEditView_WrapNone
  • CRichEditView_WrapToTargetDevice
  • CRichEditView_WrapToWindow
  • debug
  • FWS_ADDTOTITLE
  • FWS_PREFIXTITLE
  • FWS_SNAPTOBARS
  • ID_APP_ABOUT
  • ID_APP_EXIT
  • ID_EDIT_CLEAR
  • ID_EDIT_CLEAR_ALL
  • ID_EDIT_COPY
  • ID_EDIT_CUT
  • ID_EDIT_FIND
  • ID_EDIT_GOTO_LINE
  • ID_EDIT_PASTE
  • ID_EDIT_REDO
  • ID_EDIT_REPEAT
  • ID_EDIT_REPLACE
  • ID_EDIT_SELECT_ALL
  • ID_EDIT_SELECT_BLOCK
  • ID_EDIT_UNDO
  • ID_FILE_CHECK
  • ID_FILE_CLOSE
  • ID_FILE_IMPORT
  • ID_FILE_LOCATE
  • ID_FILE_MRU_FILE1
  • ID_FILE_MRU_FILE2
  • ID_FILE_MRU_FILE3
  • ID_FILE_MRU_FILE4
  • ID_FILE_NEW
  • ID_FILE_OPEN
  • ID_FILE_PAGE_SETUP
  • ID_FILE_PRINT
  • ID_FILE_PRINT_PREVIEW
  • ID_FILE_PRINT_SETUP
  • ID_FILE_RUN
  • ID_FILE_SAVE
  • ID_FILE_SAVE_ALL
  • ID_FILE_SAVE_AS
  • ID_HELP_GUI_REF
  • ID_HELP_OTHER
  • ID_HELP_PYTHON
  • ID_INDICATOR_COLNUM
  • ID_INDICATOR_LINENUM
  • ID_NEXT_PANE
  • ID_PREV_PANE
  • ID_SEPARATOR
  • ID_VIEW_BROWSE
  • ID_VIEW_EOL
  • ID_VIEW_FIXED_FONT
  • ID_VIEW_FOLD_COLLAPSE
  • ID_VIEW_FOLD_COLLAPSE_ALL
  • ID_VIEW_FOLD_EXPAND
  • ID_VIEW_FOLD_EXPAND_ALL
  • ID_VIEW_FOLD_TOGGLE
  • ID_VIEW_INDENTATIONGUIDES
  • ID_VIEW_INTERACTIVE
  • ID_VIEW_OPTIONS
  • ID_VIEW_RIGHT_EDGE
  • ID_VIEW_STATUS_BAR
  • ID_VIEW_TOOLBAR
  • ID_VIEW_TOOLBAR_DBG
  • ID_VIEW_WHITESPACE
  • ID_WINDOW_ARRANGE
  • ID_WINDOW_CASCADE
  • ID_WINDOW_NEW
  • ID_WINDOW_SPLIT
  • ID_WINDOW_TILE_HORZ
  • ID_WINDOW_TILE_VERT
  • IDB_BROWSER_HIER
  • IDB_DEBUGGER_HIER
  • IDB_HIERFOLDERS
  • IDC_ABOUT_VERSION
  • IDC_AUTO_RELOAD
  • IDC_AUTOCOMPLETE
  • IDC_BUTTON1
  • IDC_BUTTON2
  • IDC_BUTTON3
  • IDC_BUTTON4
  • IDC_CALLTIPS
  • IDC_CHECK1
  • IDC_CHECK2
  • IDC_CHECK3
  • IDC_COMBO1
  • IDC_COMBO2
  • IDC_EDIT1
  • IDC_EDIT2
  • IDC_EDIT3
  • IDC_EDIT4
  • IDC_EDIT_COLOE
  • IDC_EDIT_TABS
  • IDC_INDENT_SIZE
  • IDC_KEYBOARD_CONFIG
  • IDC_LIST1
  • IDC_PROMPT1
  • IDC_PROMPT2
  • IDC_PROMPT3
  • IDC_PROMPT4
  • IDC_PROMPT_TABS
  • IDC_RADIO1
  • IDC_RADIO2
  • IDC_RIGHTEDGE_COLUMN
  • IDC_RIGHTEDGE_DEFINE
  • IDC_RIGHTEDGE_ENABLE
  • IDC_RIGHTEDGE_SAMPLE
  • IDC_SPIN1
  • IDC_SPIN2
  • IDC_TAB_SIZE
  • IDC_USE_SMART_TABS
  • IDC_USE_TABS
  • IDC_VIEW_WHITESPACE
  • IDC_VSS_INTEGRATE
  • IDD_ABOUTBOX
  • IDD_DUMMYPROPPAGE
  • IDD_GENERAL_STATUS
  • IDD_LARGE_EDIT
  • IDD_PP_DEBUGGER
  • IDD_PP_EDITOR
  • IDD_PP_FORMAT
  • IDD_PP_IDE
  • IDD_PP_TABS
  • IDD_PP_TOOLMENU
  • IDD_PROPDEMO1
  • IDD_PROPDEMO2
  • IDD_RUN_SCRIPT
  • IDD_SET_TABSTOPS
  • IDD_SIMPLE_INPUT
  • IDD_TREE
  • IDD_TREE_MB
  • IDR_CNTR_INPLACE
  • IDR_DEBUGGER
  • IDR_MAINFRAME
  • IDR_PYTHONCONTYPE
  • IDR_PYTHONTYPE
  • IDR_PYTHONTYPE_CNTR_IP
  • IDR_TEXTTYPE
  • LM_COMMIT
  • LM_HORZ
  • LM_HORZDOCK
  • LM_LENGTHY
  • LM_MRUWIDTH
  • LM_STRETCH
  • LM_VERTDOCK
  • MFS_4THICKFRAME
  • MFS_BLOCKSYSMENU
  • MFS_MOVEFRAME
  • MFS_SYNCACTIVE
  • MFS_THICKFRAME
  • OLE_CHANGED
  • OLE_CHANGED_ASPECT
  • OLE_CHANGED_STATE
  • OLE_CLOSED
  • OLE_RENAMED
  • OLE_SAVED
  • PD_ALLPAGES
  • PD_COLLATE
  • PD_DISABLEPRINTTOFILE
  • PD_ENABLEPRINTHOOK
  • PD_ENABLEPRINTTEMPLATE
  • PD_ENABLEPRINTTEMPLATEHANDLE
  • PD_ENABLESETUPHOOK
  • PD_ENABLESETUPTEMPLATE
  • PD_ENABLESETUPTEMPLATEHANDLE
  • PD_HIDEPRINTTOFILE
  • PD_NONETWORKBUTTON
  • PD_NOPAGENUMS
  • PD_NOSELECTION
  • PD_NOWARNING
  • PD_PAGENUMS
  • PD_PRINTSETUP
  • PD_PRINTTOFILE
  • PD_RETURNDC
  • PD_RETURNDEFAULT
  • PD_RETURNIC
  • PD_SELECTION
  • PD_SHOWHELP
  • PD_USEDEVMODECOPIES
  • PD_USEDEVMODECOPIESANDCOLLATE
  • PSWIZB_BACK
  • PSWIZB_DISABLEDFINISH
  • PSWIZB_FINISH
  • PSWIZB_NEXT


Objects and Module Methods

Object and Module Methods

  • PyAssocObject.AttachObject
  • PyAssocObject.GetMethodByType
  • PyBitmap.CreateCompatibleBitmap
  • PyBitmap.GetBitmapBits
  • PyBitmap.GetHandle
  • PyBitmap.GetInfo
  • PyBitmap.GetSize
  • PyBitmap.LoadBitmap
  • PyBitmap.LoadBitmapFile
  • PyBitmap.LoadPPMFile
  • PyBitmap.Paint
  • PyBitmap.SaveBitmapFile
  • PyCBrush.CreateSolidBrush
  • PyCBrush.GetSafeHandle
  • PyCButton.CreateWindow
  • PyCButton.GetBitmap
  • PyCButton.GetButtonStyle
  • PyCButton.GetCheck
  • PyCButton.GetState
  • PyCButton.SetBitmap
  • PyCButton.SetButtonStyle
  • PyCButton.SetCheck
  • PyCButton.SetState
  • PyCCmdTarget.BeginWaitCursor
  • PyCCmdTarget.EndWaitCursor
  • PyCCmdTarget.HookCommand
  • PyCCmdTarget.HookCommandUpdate
  • PyCCmdTarget.HookNotify
  • PyCCmdTarget.HookOleEvent
  • PyCCmdTarget.RestoreWaitCursor
  • PyCCmdUI.ContinueRouting
  • PyCCmdUI.Enable
  • PyCCmdUI.SetCheck
  • PyCCmdUI.SetRadio
  • PyCCmdUI.SetText
  • PyCColorDialog.DoModal
  • PyCColorDialog.GetColor
  • PyCColorDialog.GetCustomColors
  • PyCColorDialog.GetSavedCustomColors
  • PyCColorDialog.SetCurrentColor
  • PyCColorDialog.SetCustomColors
  • PyCComboBox.AddString
  • PyCComboBox.DeleteString
  • PyCComboBox.Dir
  • PyCComboBox.GetCount
  • PyCComboBox.GetCurSel
  • PyCComboBox.GetEditSel
  • PyCComboBox.GetExtendedUI
  • PyCComboBox.GetItemData
  • PyCComboBox.GetItemValue
  • PyCComboBox.GetLBText
  • PyCComboBox.GetLBTextLen
  • PyCComboBox.InsertString
  • PyCComboBox.LimitText
  • PyCComboBox.ResetContent
  • PyCComboBox.SelectString
  • PyCComboBox.SetCurSel
  • PyCComboBox.SetEditSel
  • PyCComboBox.SetExtendedUI
  • PyCComboBox.SetItemData
  • PyCComboBox.SetItemValue
  • PyCComboBox.ShowDropDown
  • PyCControlBar.CalcDynamicLayout
  • PyCControlBar.CalcDynamicLayout
  • PyCControlBar.CalcFixedLayout
  • PyCControlBar.CalcFixedLayout
  • PyCControlBar.EnableDocking
  • PyCControlBar.EraseNonClient
  • PyCControlBar.GetBarStyle
  • PyCControlBar.GetCount
  • PyCControlBar.GetDockingFrame
  • PyCControlBar.IsFloating
  • PyCControlBar.OnBarStyleChange
  • PyCControlBar.OnUpdateCmdUI
  • PyCControlBar.SetBarStyle
  • PyCControlBar.ShowWindow
  • PyCCtrlView.OnCommand
  • PyCDC.AbortDoc
  • PyCDC.Arc
  • PyCDC.BeginPath
  • PyCDC.BitBlt
  • PyCDC.Chord
  • PyCDC.CreateCompatibleDC
  • PyCDC.CreatePrinterDC
  • PyCDC.DeleteDC
  • PyCDC.DPtoLP
  • PyCDC.Draw3dRect
  • PyCDC.DrawFocusRect
  • PyCDC.DrawFrameControl
  • PyCDC.DrawIcon
  • PyCDC.DrawText
  • PyCDC.Ellipse
  • PyCDC.EndDoc
  • PyCDC.EndPage
  • PyCDC.EndPath
  • PyCDC.ExtTextOut
  • PyCDC.FillPath
  • PyCDC.FillRect
  • PyCDC.FillSolidRect
  • PyCDC.FrameRect
  • PyCDC.GetBrushOrg
  • PyCDC.GetClipBox
  • PyCDC.GetCurrentPosition
  • PyCDC.GetDeviceCaps
  • PyCDC.GetHandleAttrib
  • PyCDC.GetHandleOutput
  • PyCDC.GetMapMode
  • PyCDC.GetNearestColor
  • PyCDC.GetPixel
  • PyCDC.GetSafeHdc
  • PyCDC.GetTextExtent
  • PyCDC.GetTextExtentPoint
  • PyCDC.GetTextFace
  • PyCDC.GetTextMetrics
  • PyCDC.GetViewportExt
  • PyCDC.GetViewportOrg
  • PyCDC.GetWindowExt
  • PyCDC.GetWindowOrg
  • PyCDC.IntersectClipRect
  • PyCDC.IsPrinting
  • PyCDC.LineTo
  • PyCDC.LPtoDP
  • PyCDC.MoveTo
  • PyCDC.OffsetViewportOrg
  • PyCDC.OffsetWindowOrg
  • PyCDC.PatBlt
  • PyCDC.Pie
  • PyCDC.PolyBezier
  • PyCDC.Polygon
  • PyCDC.Polyline
  • PyCDC.RealizePalette
  • PyCDC.Rectangle
  • PyCDC.RectVisible
  • PyCDC.RestoreDC
  • PyCDC.SaveDC
  • PyCDC.ScaleViewportExt
  • PyCDC.ScaleWindowExt
  • PyCDC.SelectClipRgn
  • PyCDC.SelectObject
  • PyCDC.SelectPalette
  • PyCDC.SetBkColor
  • PyCDC.SetBkMode
  • PyCDC.SetBrushOrg
  • PyCDC.SetGraphicsMode
  • PyCDC.SetMapMode
  • PyCDC.SetPixel
  • PyCDC.SetPolyFillMode
  • PyCDC.SetROP2
  • PyCDC.SetTextAlign
  • PyCDC.SetTextColor
  • PyCDC.SetViewportExt
  • PyCDC.SetViewportOrg
  • PyCDC.SetWindowExt
  • PyCDC.SetWindowOrg
  • PyCDC.SetWorldTransform
  • PyCDC.StartDoc
  • PyCDC.StartPage
  • PyCDC.StretchBlt
  • PyCDC.StrokeAndFillPath
  • PyCDC.StrokePath
  • PyCDC.TextOut
  • PyCDialog.CreateWindow
  • PyCDialog.DoModal
  • PyCDialog.EndDialog
  • PyCDialog.GotoDlgCtrl
  • PyCDialog.MapDialogRect
  • PyCDialog.OnCancel
  • PyCDialog.OnCancel
  • PyCDialog.OnInitDialog
  • PyCDialog.OnInitDialog
  • PyCDialog.OnOK
  • PyCDialog.OnOK
  • PyCDialogBar.CreateWindow
  • PyCDockContext.EndDrag
  • PyCDockContext.EndResize
  • PyCDockContext.StartDrag
  • PyCDockContext.StartResize
  • PyCDockContext.ToggleDocking
  • PyCDocTemplate.CreateNewDocument
  • PyCDocTemplate.CreateNewFrame
  • PyCDocTemplate.DoCreateDoc
  • PyCDocTemplate.FindOpenDocument
  • PyCDocTemplate.GetDocString
  • PyCDocTemplate.GetDocumentList
  • PyCDocTemplate.GetResourceID
  • PyCDocTemplate.GetSharedMenu
  • PyCDocTemplate.InitialUpdateFrame
  • PyCDocTemplate.InitialUpdateFrame
  • PyCDocTemplate.MatchDocType
  • PyCDocTemplate.OpenDocumentFile
  • PyCDocTemplate.OpenDocumentFile
  • PyCDocTemplate.SetContainerInfo
  • PyCDocTemplate.SetDocStrings
  • PyCDocument.DeleteContents
  • PyCDocument.DeleteContents
  • PyCDocument.DoFileSave
  • PyCDocument.DoFileSave
  • PyCDocument.DoSave
  • PyCDocument.DoSave
  • PyCDocument.GetAllViews
  • PyCDocument.GetDocTemplate
  • PyCDocument.GetFirstView
  • PyCDocument.GetPathName
  • PyCDocument.GetTitle
  • PyCDocument.IsModified
  • PyCDocument.OnChangedViewList
  • PyCDocument.OnChangedViewList
  • PyCDocument.OnCloseDocument
  • PyCDocument.OnCloseDocument
  • PyCDocument.OnNewDocument
  • PyCDocument.OnNewDocument
  • PyCDocument.OnOpenDocument
  • PyCDocument.OnOpenDocument
  • PyCDocument.OnSaveDocument
  • PyCDocument.OnSaveDocument
  • PyCDocument.PreCloseFrame
  • PyCDocument.SaveModified
  • PyCDocument.SaveModified
  • PyCDocument.SetModifiedFlag
  • PyCDocument.SetPathName
  • PyCDocument.SetTitle
  • PyCDocument.UpdateAllViews
  • PyCEdit.Clear
  • PyCEdit.Copy
  • PyCEdit.CreateWindow
  • PyCEdit.Cut
  • PyCEdit.FmtLines
  • PyCEdit.GetFirstVisibleLine
  • PyCEdit.GetLine
  • PyCEdit.GetLineCount
  • PyCEdit.GetSel
  • PyCEdit.LimitText
  • PyCEdit.LineFromChar
  • PyCEdit.LineIndex
  • PyCEdit.LineScroll
  • PyCEdit.Paste
  • PyCEdit.ReplaceSel
  • PyCEdit.SetReadOnly
  • PyCEdit.SetSel
  • PyCEditView.GetEditCtrl
  • PyCEditView.IsModified
  • PyCEditView.LoadFile
  • PyCEditView.OnCommand
  • PyCEditView.PreCreateWindow
  • PyCEditView.SaveFile
  • PyCEditView.SetModifiedFlag
  • PyCFileDialog.GetFileExt
  • PyCFileDialog.GetFileName
  • PyCFileDialog.GetFileTitle
  • PyCFileDialog.GetPathName
  • PyCFileDialog.GetPathNames
  • PyCFileDialog.GetReadOnlyPref
  • PyCFileDialog.SetOFNInitialDir
  • PyCFileDialog.SetOFNTitle
  • PyCFontDialog.DoModal
  • PyCFontDialog.GetCharFormat
  • PyCFontDialog.GetColor
  • PyCFontDialog.GetCurrentFont
  • PyCFontDialog.GetFaceName
  • PyCFontDialog.GetSize
  • PyCFontDialog.GetStyleName
  • PyCFontDialog.GetWeight
  • PyCFontDialog.IsBold
  • PyCFontDialog.IsItalic
  • PyCFontDialog.IsStrikeOut
  • PyCFontDialog.IsUnderline
  • PyCFormView.OnCommand
  • PyCFrameWnd.BeginModalState
  • PyCFrameWnd.CreateWindow
  • PyCFrameWnd.DockControlBar
  • PyCFrameWnd.EnableDocking
  • PyCFrameWnd.EndModalState
  • PyCFrameWnd.FloatControlBar
  • PyCFrameWnd.GetActiveDocument
  • PyCFrameWnd.GetActiveView
  • PyCFrameWnd.GetControlBar
  • PyCFrameWnd.GetMessageBar
  • PyCFrameWnd.GetMessageString
  • PyCFrameWnd.InModalState
  • PyCFrameWnd.IsTracking
  • PyCFrameWnd.LoadAccelTable
  • PyCFrameWnd.LoadBarState
  • PyCFrameWnd.LoadFrame
  • PyCFrameWnd.OnBarCheck
  • PyCFrameWnd.OnUpdateControlBarMenu
  • PyCFrameWnd.PreCreateWindow
  • PyCFrameWnd.RecalcLayout
  • PyCFrameWnd.SaveBarState
  • PyCFrameWnd.SetActiveView
  • PyCFrameWnd.ShowControlBar
  • PyCFrameWnd.ShowOwnedWindows
  • PyCImageList.Add
  • PyCImageList.DeleteImageList
  • PyCImageList.Destroy
  • PyCImageList.GetBkColor
  • PyCImageList.GetImageCount
  • PyCImageList.GetImageInfo
  • PyCImageList.GetSafeHandle
  • PyCImageList.SetBkColor
  • PyCListBox.AddString
  • PyCListBox.DeleteString
  • PyCListBox.Dir
  • PyCListBox.GetCaretIndex
  • PyCListBox.GetCount
  • PyCListBox.GetCurSel
  • PyCListBox.GetItemData
  • PyCListBox.GetItemValue
  • PyCListBox.GetSel
  • PyCListBox.GetSelCount
  • PyCListBox.GetSelItems
  • PyCListBox.GetSelTextItems
  • PyCListBox.GetText
  • PyCListBox.GetTextLen
  • PyCListBox.GetTopIndex
  • PyCListBox.InsertString
  • PyCListBox.ResetContent
  • PyCListBox.SelectString
  • PyCListBox.SelItemRange
  • PyCListBox.SetCaretIndex
  • PyCListBox.SetCurSel
  • PyCListBox.SetItemData
  • PyCListBox.SetItemValue
  • PyCListBox.SetSel
  • PyCListBox.SetTabStops
  • PyCListBox.SetTopIndex
  • PyCListCtrl.Arrange
  • PyCListCtrl.CreateDragImage
  • PyCListCtrl.CreateWindow
  • PyCListCtrl.DeleteAllItems
  • PyCListCtrl.DeleteColumn
  • PyCListCtrl.DeleteItem
  • PyCListCtrl.EditLabel
  • PyCListCtrl.EnsureVisible
  • PyCListCtrl.GetBkColor
  • PyCListCtrl.GetColumn
  • PyCListCtrl.GetColumnWidth
  • PyCListCtrl.GetCountPerPage
  • PyCListCtrl.GetEditControl
  • PyCListCtrl.GetImageList
  • PyCListCtrl.GetItem
  • PyCListCtrl.GetItemCount
  • PyCListCtrl.GetItemData
  • PyCListCtrl.GetItemPosition
  • PyCListCtrl.GetItemRect
  • PyCListCtrl.GetItemState
  • PyCListCtrl.GetItemText
  • PyCListCtrl.GetNextItem
  • PyCListCtrl.GetSelectedCount
  • PyCListCtrl.GetStringWidth
  • PyCListCtrl.GetTextBkColor
  • PyCListCtrl.GetTextColor
  • PyCListCtrl.GetTopIndex
  • PyCListCtrl.HitTest
  • PyCListCtrl.InsertColumn
  • PyCListCtrl.InsertItem
  • PyCListCtrl.RedrawItems
  • PyCListCtrl.SetBkColor
  • PyCListCtrl.SetColumn
  • PyCListCtrl.SetColumnWidth
  • PyCListCtrl.SetImageList
  • PyCListCtrl.SetItem
  • PyCListCtrl.SetItemCount
  • PyCListCtrl.SetItemData
  • PyCListCtrl.SetItemState
  • PyCListCtrl.SetItemText
  • PyCListCtrl.SetTextBkColor
  • PyCListCtrl.SetTextColor
  • PyCListCtrl.Update
  • PyCListView.GetListCtrl
  • PyCListView.OnCommand
  • PyCListView.PreCreateWindow
  • PyCMDIChildWnd.ActivateFrame
  • PyCMDIChildWnd.ActivateFrame
  • PyCMDIChildWnd.CreateWindow
  • PyCMDIChildWnd.GetMDIFrame
  • PyCMDIChildWnd.GetMessageString
  • PyCMDIChildWnd.MDIActivate
  • PyCMDIChildWnd.OnClose
  • PyCMDIChildWnd.OnCommand
  • PyCMDIChildWnd.OnCreateClient
  • PyCMDIChildWnd.PreCreateWindow
  • PyCMDIChildWnd.PreTranslateMessage
  • PyCMDIFrameWnd.GetMDIClient
  • PyCMDIFrameWnd.MDIActivate
  • PyCMDIFrameWnd.MDIGetActive
  • PyCMDIFrameWnd.MDINext
  • PyCMDIFrameWnd.OnClose
  • PyCMDIFrameWnd.OnCommand
  • PyCMDIFrameWnd.OnContextHelp
  • PyCMDIFrameWnd.PreCreateWindow
  • PyCMDIFrameWnd.PreTranslateMessage
  • PyCMenu.AppendMenu
  • PyCMenu.DeleteMenu
  • PyCMenu.EnableMenuItem
  • PyCMenu.GetHandle
  • PyCMenu.GetMenuItemCount
  • PyCMenu.GetMenuItemID
  • PyCMenu.GetMenuString
  • PyCMenu.GetSubMenu
  • PyCMenu.InsertMenu
  • PyCMenu.ModifyMenu
  • PyCMenu.TrackPopupMenu
  • PyCOleClientItem.Close
  • PyCOleClientItem.CreateNewItem
  • PyCOleClientItem.DoVerb
  • PyCOleClientItem.Draw
  • PyCOleClientItem.GetActiveView
  • PyCOleClientItem.GetDocument
  • PyCOleClientItem.GetInPlaceWindow
  • PyCOleClientItem.GetItemState
  • PyCOleClientItem.GetObject
  • PyCOleClientItem.GetStorage
  • PyCOleClientItem.OnActivate
  • PyCOleClientItem.OnActivate
  • PyCOleClientItem.OnChange
  • PyCOleClientItem.OnChange
  • PyCOleClientItem.OnChangeItemPosition
  • PyCOleClientItem.OnChangeItemPosition
  • PyCOleClientItem.OnDeactivateUI
  • PyCOleClientItem.OnDeactivateUI
  • PyCOleClientItem.OnGetItemPosition
  • PyCOleClientItem.Run
  • PyCOleClientItem.SetItemRects
  • PyCOleDocument.EnableCompoundFile
  • PyCOleDocument.GetInPlaceActiveItem
  • PyCOleDocument.GetNextItem
  • PyCOleDocument.GetStartPosition
  • PyCOleInsertDialog.GetClassID
  • PyCOleInsertDialog.GetPathName
  • PyCOleInsertDialog.GetSelectionType
  • PyCPrintDialog.OnCancel
  • PyCPrintDialog.OnOK
  • PyCPrintInfo.CreatePrinterDC
  • PyCPrintInfo.DocObject
  • PyCPrintInfo.DoModal
  • PyCPrintInfo.FreeDefaults
  • PyCPrintInfo.GetContinuePrinting
  • PyCPrintInfo.GetCopies
  • PyCPrintInfo.GetCurPage
  • PyCPrintInfo.GetDefaults
  • PyCPrintInfo.GetDeviceName
  • PyCPrintInfo.GetDirect
  • PyCPrintInfo.GetDlgFromPage
  • PyCPrintInfo.GetDlgToPage
  • PyCPrintInfo.GetDocOffsetPage
  • PyCPrintInfo.GetDraw
  • PyCPrintInfo.GetDriverName
  • PyCPrintInfo.GetDwFlags
  • PyCPrintInfo.GetFlags
  • PyCPrintInfo.GetFromPage
  • PyCPrintInfo.GetHDC
  • PyCPrintInfo.GetMaxPage
  • PyCPrintInfo.GetMinPage
  • PyCPrintInfo.GetNumPreviewPages
  • PyCPrintInfo.GetOffsetPage
  • PyCPrintInfo.GetPageDesc
  • PyCPrintInfo.GetPortName
  • PyCPrintInfo.GetPreview
  • PyCPrintInfo.GetPRINTDLGCopies
  • PyCPrintInfo.GetPRINTDLGMinPage
  • PyCPrintInfo.GetPrinterDC
  • PyCPrintInfo.GetToPage
  • PyCPrintInfo.GetUserData
  • PyCPrintInfo.PrintAll
  • PyCPrintInfo.PrintCollate
  • PyCPrintInfo.PrintRange
  • PyCPrintInfo.PrintSelection
  • PyCPrintInfo.SetContinuePrinting
  • PyCPrintInfo.SetCurPage
  • PyCPrintInfo.SetDirect
  • PyCPrintInfo.SetDocOffsetPage
  • PyCPrintInfo.SetDraw
  • PyCPrintInfo.SetDwFlags
  • PyCPrintInfo.SetFlags
  • PyCPrintInfo.SetFromPage
  • PyCPrintInfo.SetHDC
  • PyCPrintInfo.SetMaxPage
  • PyCPrintInfo.SetMinPage
  • PyCPrintInfo.SetNumPreviewPages
  • PyCPrintInfo.SetPageDesc
  • PyCPrintInfo.SetPreview
  • PyCPrintInfo.SetPrintDialog
  • PyCPrintInfo.SetPRINTDLGCopies
  • PyCPrintInfo.SetPRINTDLGMinPage
  • PyCPrintInfo.SetToPage
  • PyCPrintInfo.SetUserData
  • PyCProgressCtrl.CreateWindow
  • PyCProgressCtrl.OffsetPos
  • PyCProgressCtrl.SetPos
  • PyCProgressCtrl.SetRange
  • PyCProgressCtrl.SetStep
  • PyCProgressCtrl.StepIt
  • PyCPropertyPage.CancelToClose
  • PyCPropertyPage.OnApply
  • PyCPropertyPage.OnApply
  • PyCPropertyPage.OnCancel
  • PyCPropertyPage.OnKillActive
  • PyCPropertyPage.OnKillActive
  • PyCPropertyPage.OnOK
  • PyCPropertyPage.OnQueryCancel
  • PyCPropertyPage.OnQueryCancel
  • PyCPropertyPage.OnReset
  • PyCPropertyPage.OnReset
  • PyCPropertyPage.OnSetActive
  • PyCPropertyPage.OnSetActive
  • PyCPropertyPage.OnWizardBack
  • PyCPropertyPage.OnWizardBack
  • PyCPropertyPage.OnWizardFinish
  • PyCPropertyPage.OnWizardFinish
  • PyCPropertyPage.OnWizardNext
  • PyCPropertyPage.OnWizardNext
  • PyCPropertyPage.SetModified
  • PyCPropertyPage.SetPSPBit
  • PyCPropertySheet.AddPage
  • PyCPropertySheet.CreateWindow
  • PyCPropertySheet.DoModal
  • PyCPropertySheet.EnableStackedTabs
  • PyCPropertySheet.EndDialog
  • PyCPropertySheet.GetActiveIndex
  • PyCPropertySheet.GetActivePage
  • PyCPropertySheet.GetPage
  • PyCPropertySheet.GetPageCount
  • PyCPropertySheet.GetPageIndex
  • PyCPropertySheet.GetTabCtrl
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.PressButton
  • PyCPropertySheet.RemovePage
  • PyCPropertySheet.SetActivePage
  • PyCPropertySheet.SetFinishText
  • PyCPropertySheet.SetPSHBit
  • PyCPropertySheet.SetTitle
  • PyCPropertySheet.SetWizardButtons
  • PyCPropertySheet.SetWizardMode
  • PyCPropertySheet.WindowProc
  • PyCRgn.CombineRgn
  • PyCRgn.CopyRgn
  • PyCRgn.CreateRectRgn
  • PyCRgn.DeleteObject
  • PyCRgn.GetRgnBox
  • PyCRgn.GetSafeHandle
  • PyCRichEditCtrl.Clear
  • PyCRichEditCtrl.Copy
  • PyCRichEditCtrl.CreateWindow
  • PyCRichEditCtrl.Cut
  • PyCRichEditCtrl.FindText
  • PyCRichEditCtrl.GetCharPos
  • PyCRichEditCtrl.GetDefaultCharFormat
  • PyCRichEditCtrl.GetEventMask
  • PyCRichEditCtrl.GetFirstVisibleLine
  • PyCRichEditCtrl.GetLine
  • PyCRichEditCtrl.GetLineCount
  • PyCRichEditCtrl.GetModify
  • PyCRichEditCtrl.GetParaFormat
  • PyCRichEditCtrl.GetSel
  • PyCRichEditCtrl.GetSelectionCharFormat
  • PyCRichEditCtrl.GetSelText
  • PyCRichEditCtrl.GetTextLength
  • PyCRichEditCtrl.LimitText
  • PyCRichEditCtrl.LineFromChar
  • PyCRichEditCtrl.LineIndex
  • PyCRichEditCtrl.LineScroll
  • PyCRichEditCtrl.Paste
  • PyCRichEditCtrl.ReplaceSel
  • PyCRichEditCtrl.SetBackgroundColor
  • PyCRichEditCtrl.SetDefaultCharFormat
  • PyCRichEditCtrl.SetEventMask
  • PyCRichEditCtrl.SetModify
  • PyCRichEditCtrl.SetOptions
  • PyCRichEditCtrl.SetParaFormat
  • PyCRichEditCtrl.SetReadOnly
  • PyCRichEditCtrl.SetSel
  • PyCRichEditCtrl.SetSelAndCharFormat
  • PyCRichEditCtrl.SetSelectionCharFormat
  • PyCRichEditCtrl.SetTargetDevice
  • PyCRichEditCtrl.SetWordCharFormat
  • PyCRichEditCtrl.StreamIn
  • PyCRichEditCtrl.StreamOut
  • PyCRichEditDoc.OnCloseDocument
  • PyCRichEditDocTemplate.DoCreateRichEditDoc
  • PyCRichEditView.GetRichEditCtrl
  • PyCRichEditView.SaveTextFile
  • PyCRichEditView.SetWordWrap
  • PyCRichEditView.WrapChanged
  • PyCScrollView.GetDC
  • PyCScrollView.GetDeviceScrollPosition
  • PyCScrollView.GetScrollPosition
  • PyCScrollView.GetTotalSize
  • PyCScrollView.OnCommand
  • PyCScrollView.OnPrepareDC
  • PyCScrollView.ResizeParentToFit
  • PyCScrollView.ScrollToPosition
  • PyCScrollView.SetScaleToFitSize
  • PyCScrollView.SetScrollSizes
  • PyCScrollView.UpdateBars
  • PyCSliderCtrl.ClearSel
  • PyCSliderCtrl.ClearTics
  • PyCSliderCtrl.CreateWindow
  • PyCSliderCtrl.GetChannelRect
  • PyCSliderCtrl.GetLineSize
  • PyCSliderCtrl.GetNumTics
  • PyCSliderCtrl.GetPageSize
  • PyCSliderCtrl.GetPos
  • PyCSliderCtrl.GetRange
  • PyCSliderCtrl.GetRangeMax
  • PyCSliderCtrl.GetRangeMin
  • PyCSliderCtrl.GetSelection
  • PyCSliderCtrl.GetThumbRect
  • PyCSliderCtrl.GetTic
  • PyCSliderCtrl.GetTicArray
  • PyCSliderCtrl.GetTicPos
  • PyCSliderCtrl.SetLineSize
  • PyCSliderCtrl.SetPageSize
  • PyCSliderCtrl.SetPos
  • PyCSliderCtrl.SetRange
  • PyCSliderCtrl.SetRangeMax
  • PyCSliderCtrl.SetRangeMin
  • PyCSliderCtrl.SetSelection
  • PyCSliderCtrl.SetTic
  • PyCSliderCtrl.SetTicFreq
  • PyCSliderCtrl.VerifyPos
  • PyCSpinButtonCtrl.GetPos
  • PyCSpinButtonCtrl.SetPos
  • PyCSpinButtonCtrl.SetRange
  • PyCSpinButtonCtrl.SetRange32
  • PyCSplitterWnd.CreateStatic
  • PyCSplitterWnd.CreateView
  • PyCSplitterWnd.DoKeyboardSplit
  • PyCSplitterWnd.GetPane
  • PyCSplitterWnd.IdFromRowCol
  • PyCSplitterWnd.SetColumnInfo
  • PyCSplitterWnd.SetRowInfo
  • PyCStatusBar.SetIndicators
  • PyCStatusBarCtrl.CreateWindow
  • PyCStatusBarCtrl.GetBorders
  • PyCStatusBarCtrl.GetParts
  • PyCStatusBarCtrl.GetRect
  • PyCStatusBarCtrl.GetText
  • PyCStatusBarCtrl.GetTextAttr
  • PyCStatusBarCtrl.GetTextLength
  • PyCStatusBarCtrl.SetMinHeight
  • PyCStatusBarCtrl.SetParts
  • PyCStatusBarCtrl.SetSimple
  • PyCStatusBarCtrl.SetText
  • PyCTabCtrl.GetCurSel
  • PyCTabCtrl.GetItemCountl
  • PyCTabCtrl.SetCurSel
  • PyCToolBar.GetButtonStyle
  • PyCToolBar.GetButtonText
  • PyCToolBar.GetItemID
  • PyCToolBar.GetToolBarCtrl
  • PyCToolBar.GetToolTips
  • PyCToolBar.LoadBitmap
  • PyCToolBar.LoadToolBar
  • PyCToolBar.SetBarStyle
  • PyCToolBar.SetBitmap
  • PyCToolBar.SetButtonInfo
  • PyCToolBar.SetButtons
  • PyCToolBar.SetButtonStyle
  • PyCToolBar.SetButtonText
  • PyCToolBar.SetHeight
  • PyCToolBar.SetSizes
  • PyCToolBar.SetToolTips
  • PyCToolBarCtrl.AddBitmap
  • PyCToolBarCtrl.AddButtons
  • PyCToolBarCtrl.AddStrings
  • PyCToolBarCtrl.AutoSize
  • PyCToolBarCtrl.CheckButton
  • PyCToolBarCtrl.CommandToIndex
  • PyCToolBarCtrl.CreateWindow
  • PyCToolBarCtrl.Customize
  • PyCToolBarCtrl.DeleteButton
  • PyCToolBarCtrl.EnableButton
  • PyCToolBarCtrl.GetBitmapFlags
  • PyCToolBarCtrl.GetButton
  • PyCToolBarCtrl.GetButtonCount
  • PyCToolBarCtrl.GetItemRect
  • PyCToolBarCtrl.GetRows
  • PyCToolBarCtrl.HideButton
  • PyCToolBarCtrl.Indeterminate
  • PyCToolBarCtrl.InsertButton
  • PyCToolBarCtrl.IsButtonChecked
  • PyCToolBarCtrl.IsButtonEnabled
  • PyCToolBarCtrl.IsButtonHidden
  • PyCToolBarCtrl.IsButtonIndeterminate
  • PyCToolBarCtrl.IsButtonPressed
  • PyCToolBarCtrl.PressButton
  • PyCToolBarCtrl.SetBitmapSize
  • PyCToolBarCtrl.SetButtonSize
  • PyCToolBarCtrl.SetCmdID
  • PyCToolBarCtrl.SetRows
  • PyCToolBarCtrl.TBUTTON tuple
  • PyCToolTipCtrl.AddTool
  • PyCToolTipCtrl.CreateWindow
  • PyCToolTipCtrl.UpdateTipText
  • PyCTreeCtrl.CreateDragImage
  • PyCTreeCtrl.CreateWindow
  • PyCTreeCtrl.DeleteAllItems
  • PyCTreeCtrl.DeleteItem
  • PyCTreeCtrl.EditLabel
  • PyCTreeCtrl.EnsureVisible
  • PyCTreeCtrl.Expand
  • PyCTreeCtrl.GetChildItem
  • PyCTreeCtrl.GetCount
  • PyCTreeCtrl.GetDropHilightItem
  • PyCTreeCtrl.GetEditControl
  • PyCTreeCtrl.GetFirstVisibleItem
  • PyCTreeCtrl.GetImageList
  • PyCTreeCtrl.GetIndent
  • PyCTreeCtrl.GetItem
  • PyCTreeCtrl.GetItemData
  • PyCTreeCtrl.GetItemImage
  • PyCTreeCtrl.GetItemRect
  • PyCTreeCtrl.GetItemState
  • PyCTreeCtrl.GetItemText
  • PyCTreeCtrl.GetNextItem
  • PyCTreeCtrl.GetNextSiblingItem
  • PyCTreeCtrl.GetNextVisibleItem
  • PyCTreeCtrl.GetParentItem
  • PyCTreeCtrl.GetPrevSiblingItem
  • PyCTreeCtrl.GetPrevVisibleItem
  • PyCTreeCtrl.GetRootItem
  • PyCTreeCtrl.GetSelectedItem
  • PyCTreeCtrl.GetVisibleCount
  • PyCTreeCtrl.HitTest
  • PyCTreeCtrl.InsertItem
  • PyCTreeCtrl.ItemHasChildren
  • PyCTreeCtrl.Select
  • PyCTreeCtrl.SelectDropTarget
  • PyCTreeCtrl.SelectItem
  • PyCTreeCtrl.SelectSetFirstVisible
  • PyCTreeCtrl.SetImageList
  • PyCTreeCtrl.SetIndent
  • PyCTreeCtrl.SetItem
  • PyCTreeCtrl.SetItemData
  • PyCTreeCtrl.SetItemImage
  • PyCTreeCtrl.SetItemState
  • PyCTreeCtrl.SetItemText
  • PyCTreeCtrl.SortChildren
  • PyCTreeView.GetTreeCtrl
  • PyCTreeView.OnCommand
  • PyCTreeView.PreCreateWindow
  • PyCView.CreateWindow
  • PyCView.DoPreparePrinting
  • PyCView.GetDocument
  • PyCView.OnActivateView
  • PyCView.OnActivateView
  • PyCView.OnBeginPrinting
  • PyCView.OnBeginPrinting
  • PyCView.OnDraw
  • PyCView.OnEndPrinting
  • PyCView.OnEndPrinting
  • PyCView.OnFilePrint
  • PyCView.OnFilePrintPreview
  • PyCView.OnInitialUpdate
  • PyCView.OnInitialUpdate
  • PyCView.OnMouseActivate
  • PyCView.OnPrepareDC
  • PyCView.OnPrepareDC
  • PyCView.OnPreparePrinting
  • PyCView.OnPreparePrinting
  • PyCView.OnPrint
  • PyCView.OnUpdate
  • PyCView.PreCreateWindow
  • PyCWinApp.AddDocTemplate
  • PyCWinApp.FindOpenDocument
  • PyCWinApp.GetDocTemplateList
  • PyCWinApp.InitDlgInstance
  • PyCWinApp.IsInproc
  • PyCWinApp.LoadCursor
  • PyCWinApp.LoadIcon
  • PyCWinApp.LoadOEMCursor
  • PyCWinApp.LoadStandardCursor
  • PyCWinApp.LoadStandardIcon
  • PyCWinApp.OnFileNew
  • PyCWinApp.OnFileOpen
  • PyCWinApp.OpenDocumentFile
  • PyCWinApp.RemoveDocTemplate
  • PyCWinApp.Run
  • PyCWinThread.CreateThread
  • PyCWinThread.PumpIdle
  • PyCWinThread.PumpMessages
  • PyCWinThread.Run
  • PyCWinThread.SetMainFrame
  • PyCWinThread.SetThreadPriority
  • PyCWnd.ActivateFrame
  • PyCWnd.BeginPaint
  • PyCWnd.BringWindowToTop
  • PyCWnd.CalcWindowRect
  • PyCWnd.CenterWindow
  • PyCWnd.CheckRadioButton
  • PyCWnd.ChildWindowFromPoint
  • PyCWnd.ClientToScreen
  • PyCWnd.CreateWindow
  • PyCWnd.CreateWindowEx
  • PyCWnd.DefWindowProc
  • PyCWnd.DestroyWindow
  • PyCWnd.DlgDirList
  • PyCWnd.DlgDirListComboBox
  • PyCWnd.DlgDirSelect
  • PyCWnd.DlgDirSelectComboBox
  • PyCWnd.DragAcceptFiles
  • PyCWnd.DrawMenuBar
  • PyCWnd.EnableWindow
  • PyCWnd.EndModalLoop
  • PyCWnd.EndPaint
  • PyCWnd.GetCheckedRadioButton
  • PyCWnd.GetClientRect
  • PyCWnd.GetDC
  • PyCWnd.GetDCEx
  • PyCWnd.GetDlgCtrlID
  • PyCWnd.GetDlgItem
  • PyCWnd.GetDlgItemInt
  • PyCWnd.GetDlgItemText
  • PyCWnd.GetExStyle
  • PyCWnd.GetLastActivePopup
  • PyCWnd.GetMenu
  • PyCWnd.GetParent
  • PyCWnd.GetParentFrame
  • PyCWnd.GetParentOwner
  • PyCWnd.GetSafeHwnd
  • PyCWnd.GetScrollInfo
  • PyCWnd.GetScrollPos
  • PyCWnd.GetStyle
  • PyCWnd.GetSystemMenu
  • PyCWnd.GetTopLevelFrame
  • PyCWnd.GetTopLevelOwner
  • PyCWnd.GetTopLevelParent
  • PyCWnd.GetTopWindow
  • PyCWnd.GetWindow
  • PyCWnd.GetWindowDC
  • PyCWnd.GetWindowPlacement
  • PyCWnd.GetWindowRect
  • PyCWnd.GetWindowText
  • PyCWnd.HideCaret
  • PyCWnd.HookAllKeyStrokes
  • PyCWnd.HookKeyStroke
  • PyCWnd.HookMessage
  • PyCWnd.InvalidateRect
  • PyCWnd.InvalidateRgn
  • PyCWnd.IsChild
  • PyCWnd.IsDlgButtonChecked
  • PyCWnd.IsIconic
  • PyCWnd.IsWindow
  • PyCWnd.IsWindowEnabled
  • PyCWnd.IsWindowVisible
  • PyCWnd.IsZoomed
  • PyCWnd.KillTimer
  • PyCWnd.LockWindowUpdate
  • PyCWnd.MapWindowPoints
  • PyCWnd.MessageBox
  • PyCWnd.ModifyStyle
  • PyCWnd.ModifyStyleEx
  • PyCWnd.MouseCaptured
  • PyCWnd.MoveWindow
  • PyCWnd.OnClose
  • PyCWnd.OnClose
  • PyCWnd.OnCommand
  • PyCWnd.OnCreate
  • PyCWnd.OnCtlColor
  • PyCWnd.OnCtlColor
  • PyCWnd.OnEraseBkgnd
  • PyCWnd.OnEraseBkgnd
  • PyCWnd.OnMDIActivate
  • PyCWnd.OnMouseActivate
  • PyCWnd.OnMouseActivate
  • PyCWnd.OnNcCalcSize
  • PyCWnd.OnNcHitTest
  • PyCWnd.OnNcHitTest
  • PyCWnd.OnPaint
  • PyCWnd.OnPaint
  • PyCWnd.OnPaletteChanged
  • PyCWnd.OnPaletteIsChanging
  • PyCWnd.OnQueryDragIcon
  • PyCWnd.OnQueryDragIcon
  • PyCWnd.OnQueryNewPalette
  • PyCWnd.OnQueryNewPalette
  • PyCWnd.OnSetCursor
  • PyCWnd.OnSetCursor
  • PyCWnd.OnSysColorChange
  • PyCWnd.OnWinIniChange
  • PyCWnd.OnWndMsg
  • PyCWnd.PostMessage
  • PyCWnd.PreCreateWindow
  • PyCWnd.PreCreateWindow
  • PyCWnd.PreTranslateMessage
  • PyCWnd.PumpWaitingMessages
  • PyCWnd.RedrawWindow
  • PyCWnd.ReleaseCapture
  • PyCWnd.ReleaseDC
  • PyCWnd.RepositionBars
  • PyCWnd.RunModalLoop
  • PyCWnd.ScreenToClient
  • PyCWnd.SCROLLINFO tuple
  • PyCWnd.SendMessage
  • PyCWnd.SendMessageToDescendants
  • PyCWnd.SetActiveWindow
  • PyCWnd.SetCapture
  • PyCWnd.SetDlgItemText
  • PyCWnd.SetFocus
  • PyCWnd.SetFont
  • PyCWnd.SetForegroundWindow
  • PyCWnd.SetMenu
  • PyCWnd.SetRedraw
  • PyCWnd.SetScrollInfo
  • PyCWnd.SetScrollPos
  • PyCWnd.SetTimer
  • PyCWnd.SetWindowPlacement
  • PyCWnd.SetWindowPos
  • PyCWnd.SetWindowText
  • PyCWnd.ShowCaret
  • PyCWnd.ShowScrollBar
  • PyCWnd.ShowWindow
  • PyCWnd.UnlockWindowUpdate
  • PyCWnd.UpdateData
  • PyCWnd.UpdateDialogControls
  • PyCWnd.UpdateWindow
  • PyDLL.__repr__
  • PyDLL.AttachToMFC
  • PyDLL.GetFileName
  • win32ui.AddToRecentFileList
  • win32ui.ComparePath
  • win32ui.CreateBitmap
  • win32ui.CreateBitmapFromHandle
  • win32ui.CreateBrush
  • win32ui.CreateButton
  • win32ui.CreateColorDialog
  • win32ui.CreateControl
  • win32ui.CreateControlBar
  • win32ui.CreateCtrlView
  • win32ui.CreateDC
  • win32ui.CreateDCFromHandle
  • win32ui.CreateDebuggerThread
  • win32ui.CreateDialog
  • win32ui.CreateDialogBar
  • win32ui.CreateDialogIndirect
  • win32ui.CreateDocTemplate
  • win32ui.CreateEdit
  • win32ui.CreateEditView
  • win32ui.CreateFileDialog
  • win32ui.CreateFont
  • win32ui.CreateFontDialog
  • win32ui.CreateFormView
  • win32ui.CreateFrame
  • win32ui.CreateImageList
  • win32ui.CreateListCtrl
  • win32ui.CreateListView
  • win32ui.CreateMDIChild
  • win32ui.CreateMDIFrame
  • win32ui.CreateMenu
  • win32ui.CreatePalette
  • win32ui.CreatePen
  • win32ui.CreatePopupMenu
  • win32ui.CreatePrintDialog
  • win32ui.CreateProgressCtrl
  • win32ui.CreatePropertyPage
  • win32ui.CreatePropertyPageIndirect
  • win32ui.CreatePropertySheet
  • win32ui.CreateRgn
  • win32ui.CreateRichEditCtrl
  • win32ui.CreateRichEditDocTemplate
  • win32ui.CreateRichEditView
  • win32ui.CreateSliderCtrl
  • win32ui.CreateSplitter
  • win32ui.CreateStatusBar
  • win32ui.CreateStatusBarCtrl
  • win32ui.CreateThread
  • win32ui.CreateToolBar
  • win32ui.CreateToolBarCtrl
  • win32ui.CreateToolTipCtrl
  • win32ui.CreateTreeCtrl
  • win32ui.CreateTreeView
  • win32ui.CreateView
  • win32ui.CreateWindowFromHandle
  • win32ui.CreateWnd
  • win32ui.DestroyDebuggerThread
  • win32ui.DoWaitCursor
  • win32ui.Enable3dControls
  • win32ui.EnableControlContainer
  • win32ui.FindWindow
  • win32ui.FindWindowEx
  • win32ui.FullPath
  • win32ui.GetActiveWindow
  • win32ui.GetApp
  • win32ui.GetAppName
  • win32ui.GetAppRegistryKey
  • win32ui.GetBytes
  • win32ui.GetCommandLine
  • win32ui.GetDeviceCaps
  • win32ui.GetFileTitle
  • win32ui.GetFocus
  • win32ui.GetForegroundWindow
  • win32ui.GetHalftoneBrush
  • win32ui.GetInitialStateRequest
  • win32ui.GetMainFrame
  • win32ui.GetName
  • win32ui.GetProfileFileName
  • win32ui.GetProfileVal
  • win32ui.GetRecentFileList
  • win32ui.GetRect
  • win32ui.GetResource
  • win32ui.GetThread
  • win32ui.GetType
  • win32ui.InitRichEdit
  • win32ui.InstallCallBackCaller
  • win32ui.IsDebug
  • win32ui.IsObject
  • win32ui.IsWin32s
  • win32ui.LoadDialogResource
  • win32ui.LoadLibrary
  • win32ui.LoadMenu
  • win32ui.LoadStdProfileSettings
  • win32ui.LoadString
  • win32ui.MessageBox
  • win32ui.OutputDebugString
  • win32ui.PrintTraceback
  • win32ui.PumpWaitingMessages
  • win32ui.RegisterWndClass
  • win32ui.RemoveRecentFile
  • win32ui.SetAppHelpPath
  • win32ui.SetAppName
  • win32ui.SetCurrentInstanceHandle
  • win32ui.SetCurrentResourceHandle
  • win32ui.SetDialogBkColor
  • win32ui.SetProfileFilename
  • win32ui.SetRegistryKey
  • win32ui.SetResource
  • win32ui.SetStatusText
  • win32ui.StartDebuggerPump
  • win32ui.StopDebuggerPump
  • win32ui.TranslateMessage
  • win32ui.TranslateVirtualKey
  • win32ui.WinHelp
  • win32ui.WriteProfileVal
  • win32uiole.CreateInsertDialog
  • win32uiole.CreateOleClientItem
  • win32uiole.CreateOleDocument
  • win32uiole.DaoGetEngine
  • win32uiole.GetIDispatchForWindow
  • win32uiole.OleGetUserCtrl
  • win32uiole.OleSetUserCtrl


Objects and Module Properties

Object and Module Properties


PyAssocObject.GetMethodByType

GetMethodByType()

Given a method name and a type object, return the attribute.

Comments

This function allows you to obtain attributes for base types. For example, calling appObject.GetAttributeByType("Run", threadType) will return the built-in Run method for the CWinThread object rather than the CWinApp object.


PyCControlBar.CalcDynamicLayout

PyCControlBar.CalcDynamicLayout Virtual

CalcDynamicLayout()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::CalcDynamicLayout .

See Also

CPythonControlBar::CalcDynamicLayout


PyCControlBar.CalcFixedLayout

PyCControlBar.CalcFixedLayout Virtual

CalcFixedLayout()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::CalcFixedLayout .

See Also

CPythonControlBar::CalcFixedLayout


PyCControlBar.OnBarStyleChange

PyCControlBar.OnBarStyleChange Virtual

OnBarStyleChange()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::OnBarStyleChange .


PyCControlBar.OnUpdateCmdUI

PyCControlBar.OnUpdateCmdUI Virtual

OnUpdateCmdUI(frame, bDisableIsNoHandler )

Parameters

frame : PyCFrameWnd

bDisableIsNoHandler : int


PyCDC.SelectPalette

int = SelectPalette(hPalette, forceBackground )

Sets the logical palette.

Parameters

hPalette : int

The handle to the palette

forceBackground : int

Specifies whether the logical palette is forced to be a background palette.

MFC References

CDC::SelectePalette

Return Value

The previous palette handle.


PyCDialog.OnCancel

PyCDialog.OnCancel Virtual

OnCancel()

Called by the MFC architecture when the user selects the Cancel button.

Comments

The procedure is expected to dismiss the window with the PyCDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCDialog::OnCancel.

See Also

PyCDialog::OnCancel


PyCDialog.OnInitDialog

PyCDialog.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCDialog::OnInitDialog.

See Also

PyCDialog::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCDialog.OnOK

PyCDialog.OnOK Virtual

OnOK()

Called by the MFC architecture when the user selects the OK button.

Comments

The procedure is expected to dismiss the window with the PyCDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCDialog::OnOK.

See Also

PyCDialog::OnOK


PyCDocTemplate.InitialUpdateFrame

PyCDocTemplate.InitialUpdateFrame Virtual

InitialUpdateFrame(frame, frame , bMakeVisible )

Called to perform the initial frame update. The default behaviour is to call OnInitialUpdate on all views.

Parameters

frame : PyCFrameWnd

The frame window.

frame : PyCDocument

The document attached to the frame.

bMakeVisible : int

Indicates if the frame should be made visible.


PyCDocTemplate.MatchDocType

PyCDocTemplate.MatchDocType Virtual

MatchDocType(fileName, fileType )

Queries if the template can open the specified file name.

Parameters

fileName : string

The name of the file to open.

fileType : int

Only used on the mac.

Comments

This method should call PyCDocTemplate.FindOpenDocument to return an already open document if one exists, else it should return one of the win32ui.CDocTemplate_Confidence_* constants.


PyCDocTemplate.OpenDocumentFile

PyCDocTemplate.OpenDocumentFile Virtual

OpenDocumentFile()

Called when a document file is to be opened.


PyCDocument.DeleteContents

PyCDocument.DeleteContents Virtual

DeleteContents()

Called by the MFC architecture when a document is newly created or closed.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::DeleteContents


PyCDocument.DoFileSave

PyCDocument.DoFileSave Virtual

DoFileSave()

Called by the MFC architecture.

Comments

If a handler is defined for this function, it must call the base class PyCDocument::DoFileSave method.

See Also

PyCDocument::DoFileSave

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.DoSave

PyCDocument.DoSave Virtual

DoSave(fileName, bReplace )

Called by the MFC architecture to save a document.

Parameters

fileName : string

The name of the file being saved.

bReplace : int

TRUE if the file should be replaced.

Comments

If a handler is defined for this function, it must call the base class PyCDocument::DoSave method.

See Also

PyCDocument::DoSave

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.OnChangedViewList

PyCDocument.OnChangedViewList Virtual

OnChangedViewList()

Called by the MFC architecture when after a view is attached.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnChangedViewList


PyCDocument.OnCloseDocument

PyCDocument.OnCloseDocument Virtual

OnCloseDocument()

Called by the MFC architecture.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnCloseDocument


PyCDocument.OnNewDocument

PyCDocument.OnNewDocument Virtual

OnNewDocument()

Called by the MFC architecture.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnNewDocument

Return Value

TRUE if a new document could be created, else FALSE.


PyCDocument.OnOpenDocument

PyCDocument.OnOpenDocument Virtual

OnOpenDocument(fileName)

Called by the MFC architecture.

Parameters

fileName : string

The name of the file being opened.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnOpenDocument

Return Value

TRUE if the document could be opened, else FALSE.


PyCDocument.OnSaveDocument

PyCDocument.OnSaveDocument Virtual

OnSaveDocument(fileName)

Called by the MFC architecture.

Parameters

fileName : string

The name of the file being saved.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnSaveDocument

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.PreCloseFrame

PyCDocument.PreCloseFrame Virtual

PreCloseFrame()

Called before the frame window is closed.

Comments

The MFC base implementation is always called after the Python handler returns.


PyCDocument.SaveModified

PyCDocument.SaveModified Virtual

SaveModified()

Called by the MFC architecture when a document is closed.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::SaveModified

Return Value

The handler should return TRUE if it is safe to continue and close the document; 0 if the document should not be closed.


PyCFrameWnd.ShowOwnedWindows

string = ShowOwnedWindows(bShow)

Shows all windows that are descendants of the PyCFrameWnd object.

Parameters

bShow=1 : int

Flag


PyCMDIChildWnd.ActivateFrame

PyCMDIChildWnd.ActivateFrame Virtual

ActivateFrame(cmdShow)

Called to activate the frame window.

Parameters

cmdShow : int

The parameter to be passed to PyCWnd::ShowWindow

Comments

If a handler for this function exists, then the base MFC implementation will not be called. If you wish to use the default functionality, PyCMDIFrameWnd::ActivateFrame can be called.
If there is no handler, the base MFC implementation will be called.

See Also

PyCMDIChildWnd::ActivateFrame


PyCMDIChildWnd.GetMessageString

PyCMDIChildWnd.GetMessageString Virtual

GetMessageString(id)

Gets the message string to use for a control specific ID.

Parameters

id : int

The command ID to retrieve the string for.

See Also

PyCMDIChildWnd::GetMessageString


PyCMDIChildWnd.OnCreateClient

PyCMDIChildWnd.OnCreateClient Virtual

OnCreateClient(CREATESTRUCT, object )

Called by the framework during the execution of OnCreate.

Parameters

CREATESTRUCT : tuple

A tuple describing a CREATESTRUCT structure.

object : object

A Python object initially passed to LoadFrame

Return Value

The return value from this method is ignored, but an exception will prevent window creation.


PyCOleClientItem.OnActivate

PyCOleClientItem.OnActivate Virtual

OnActivate()


PyCOleClientItem.OnChange

PyCOleClientItem.OnChange Virtual

OnChange(wNotification, dwParam )

Parameters

wNotification : int

dwParam : int


PyCOleClientItem.OnChangeItemPosition

PyCOleClientItem.OnChangeItemPosition Virtual

OnChangeItemPosition((left, top, right, bottom))

Parameters

(left, top, right, bottom) : (int, int, int, int)

The new position


PyCOleClientItem.OnDeactivateUI

PyCOleClientItem.OnDeactivateUI Virtual

OnDeactivateUI(bUndoable)

Parameters

bUndoable : int


PyCOleClientItem.OnGetItemPosition

PyCOleClientItem.OnGetItemPosition Virtual

OnGetItemPosition()


PyCPropertyPage.OnApply

PyCPropertyPage.OnApply Virtual

OnApply()

Called by the framework when the user chooses the OK or the Apply Now button.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnApply) yourself

See Also

PyCPropertyPage::OnApply

Return Value

Return Nonzero if the changes are accepted; otherwise 0.


PyCPropertyPage.OnKillActive

PyCPropertyPage.OnKillActive Virtual

OnKillActive()

Called when the page loses focus.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnKillActive) yourself

See Also

PyCPropertyPage::OnKillActive

Return Value

The method should return TRUE if the page can be de-activated.


PyCPropertyPage.OnQueryCancel

PyCPropertyPage.OnQueryCancel Virtual

OnQueryCancel()

Called by the framework when the user clicks the Cancel button and before the cancel action has taken place.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnQueryCancel) yourself

See Also

PyCPropertyPage::OnQueryCancel

Return Value

Return FALSE to prevent the cancel operation or TRUE to allow it.


PyCPropertyPage.OnReset

PyCPropertyPage.OnReset Virtual

OnReset()

Called by the framework when the user chooses the Cancel button.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnReset) yourself

See Also

PyCPropertyPage::OnReset


PyCPropertyPage.OnSetActive

PyCPropertyPage.OnSetActive Virtual

OnSetActive()

Called when the page becomes active.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnSetActive) yourself

See Also

PyCPropertyPage::OnSetActive

Return Value

The method should return TRUE if the page can be activated.


PyCPropertyPage.OnWizardBack

PyCPropertyPage.OnWizardBack Virtual

OnWizardBack()

Called by the framework when the user clicks on the Back button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardBack) yourself

See Also

PyCPropertyPage::OnWizardBack

Return Value

Return 0 to automatically advance to the next page; -1 to prevent the page from changing. To jump to a page other than the next one, return the identifier of the dialog to be displayed.


PyCPropertyPage.OnWizardFinish

PyCPropertyPage.OnWizardFinish Virtual

OnWizardFinish()

Called by the framework when the user clicks on the Finish button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardFinish) yourself

See Also

PyCPropertyPage::OnWizardFinish

Return Value

Return nonzero if the property sheet is destroyed when the wizard finishes; otherwise zero.


PyCPropertyPage.OnWizardNext

PyCPropertyPage.OnWizardNext Virtual

OnWizardNext()

Called by the framework when the user clicks on the Next button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardNext) yourself

See Also

PyCPropertyPage::OnWizardNext

Return Value

Return 0 to automatically advance to the next page; -1 to prevent the page from changing. To jump to a page other than the next one, return the identifier of the dialog to be displayed.


PyCPropertySheet.OnInitDialog

PyCPropertySheet.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCDialog::OnInitDialog.

See Also

PyCDialog::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCPropertySheet.OnInitDialog

PyCPropertySheet.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCPropertySheet::OnInitDialog.

See Also

PyCPropertySheet::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCPropertySheet.WindowProc

PyCPropertySheet.WindowProc Virtual

WindowProc()

Default message handler.


PyCRichEditCtrl.SetWordCharFormat

SetWordCharFormat(charFormat)

Sets the currently selected word's character formatting attributes.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetWordCharFormat


PyCScrollView.OnPrepareDC

PyCScrollView.OnPrepareDC Virtual

OnPrepareDC(dc)

Called to prepare the device context for a view.

Parameters

dc : PyCDC

The DC object.

See Also

PyCView::OnPrepareDC


PyCSliderCtrl.SetRangeMax

int = SetRangeMax(nRangeMax, bRedraw )

Set the control's maximum

Parameters

nRangeMax=1 : int

New maximum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCSliderCtrl.SetRangeMin

int = SetRangeMin(nRangeMin, bRedraw )

Set the control's minimum

Parameters

nRangeMin=1 : int

New minimum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCStatusBarCtrl.SetSimple

SetSimple(bSimple)

Specify whether a status bar control displays simple text or displays all control parts set by a previous call to SetParts.

Parameters

bSimple : int

If non-zero, displays simple text.


PyCToolBar.GetToolTips

GetToolTips()

Returns the associated tooltips control


PyCToolBar.SetButtonText

SetButtonText(index, text)

Sets the text for a button.

Parameters

index : int

Index of the item whose style is to be set

text : string

The new text


PyCToolBar.SetToolTips

SetToolTips(obTTC)

Sets the tooltips control

Parameters

obTTC : PyCToolTipCtrl

The ToolTipCtrl ctrl to be set.


PyCToolBarCtrl.TBUTTON tuple

TBUTTON tuple(iBitmap, idCommand, fsState, fsStyle, userob, iString)

Describes a TBUTTON tuple, used by the PyCToolBarCtrl AddButtons method

Parameters

iBitmap : int

Zero-based index of button image

idCommand : int

Command to be sent when button pressed

fsState : int

Button state. Can be any of the TBSTATE values defined in win32con

fsStyle : int

Button style. Can be any of the TBSTYLE values defined in win32con

userob : object

Arbitrary Python object

iString : int

Zero-based index of button label string

Comments

Userob is any Python object at all, but no reference count is kept, so you must ensure the object remains referenced throughout.


PyCTreeCtrl.GetItemData

object = GetItemData(item)

Retrieves the application-specific value associated with an item.

Parameters

item : HTREEITEM

The index of the item whose data is to be retrieved.


PyCTreeCtrl.GetItemImage

(int,int) = GetItemImage(item)

Retrieves the index of an items images.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetPrevVisibleItem

HTREEITEM = GetPrevVisibleItem(item)

Retrieves the previous visible item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific value.

Parameters

item : HTREEITEM

The item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCTreeCtrl.SetItemImage

SetItemImage(item, iImage, iSelectedImage)

Sets the index of an items images.

Parameters

item : HTREEITEM

The specified item

iImage : int

The offset of the image.

iSelectedImage : int

The offset of the selected image.


PyCView.OnActivateView

PyCView.OnActivateView Virtual

OnActivateView(bActivate, activateView , DeactivateView )

Called by the framework when a view is activated or deactivated.

Parameters

bActivate : int

Indicates whether the view is being activated or deactivated.

activateView : PyCWnd

The view object that is being activated.

DeactivateView : PyCWnd

The view object that is being deactivated.

Comments

If a handler exists, the base MFC implementation is not called.
The activateView and deactiveView parameters are the same objects if the application's main frame window is activated with no change in the active view for example, if the focus is being transferred from another application to this one, rather than from one view to another within the application. This allows a view to re-realize its palette, if needed.

See Also

PyCView::OnActivateView


PyCView.OnBeginPrinting

PyCView.OnBeginPrinting Virtual

OnBeginPrinting(dc, pInfo )

Called by the framework at the beginning of a print or print preview job, after OnPreparePrinting has been called.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnBeginPrinting


PyCView.OnDraw

PyCView.OnDraw Virtual

OnDraw(dc)

Called when the view should be drawn.

Parameters

dc : PyCDC

The DC object.

See Also

PyCView::OnDraw


PyCView.OnEndPrinting

PyCView.OnEndPrinting Virtual

OnEndPrinting(dc, pInfo )

Called by the framework after a document has been printed or previewed.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnEndPrinting


PyCView.OnFilePrintPreview

OnFilePrintPreview()

Calls the underlying MFC OnFilePrintPreview method.


PyCView.OnInitialUpdate

PyCView.OnInitialUpdate Virtual

OnInitialUpdate()

Called before the first update for a view.

Comments

The MFC base class is called only if no handler exists.

See Also

PyCView::OnInitialUpdate


PyCView.OnPrepareDC

OnPrepareDC()

Calls the underlying MFC OnPrepareDC method.

See Also

PyCView.OnPrepareDC virtual method


PyCView.OnPrepareDC

PyCView.OnPrepareDC Virtual

OnPrepareDC(dc, pInfo )

Called to prepare the device context for a view.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCWnd::OnPrepareDC


PyCView.OnPreparePrinting

int = OnPreparePrinting()

Calls the underlying MFC OnPreparePrinting method.

See Also

PyCView.OnPreparePrinting virtual method


PyCView.OnPreparePrinting

PyCView.OnPreparePrinting Virtual

OnPreparePrinting(pInfo)

Called by the framework before a document is printed or previewed

Parameters

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnPreparePrinting


PyCView.OnPrint

PyCView.OnPrint Virtual

OnPrint(dc, pInfo )

Called when the view should be printed.

Parameters

dc : PyCDC

The DC object.

pInfo : PyPrintInfo

The PrintIfo object.

See Also

PyCView::OnPrint


PyCView.OnUpdate

PyCView.OnUpdate Virtual

OnUpdate(sender, lHint , hint )

Called by the framework when a view needs updating.

Parameters

sender : PyCView

lHint : int

hint : object

Comments

Typically you should not perform any drawing directly from OnUpdate. Instead, determine the rectangle describing, in device coordinates, the area that requires updating; pass this rectangle to PyCWnd::InvalidateRect. You can then paint the update next PyCView::OnDraw

See Also

PyCView::OnUpdate


PyCWnd.GetParentOwner

PyCWnd = GetParentOwner()

Returns the child window's parent window or owner window.

MFC References

CWnd::GetParentOwner

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.IsWindowEnabled

int = IsWindowEnabled()

Determines if the window is currently enabled.


PyCWnd.OnClose

PyCWnd.OnClose Virtual

OnClose()

Called for the WM_CLOSE message.

Comments

The default calls DestroyWindow(). If you supply a handler, the default is not called.

The MFC base class is always called before the Python method.

See Also

PyCWnd::OnClose


PyCWnd.OnCommand

PyCWnd.OnCommand Virtual

OnCommand(wparam, lparam )

Allows a Window to override the OnCommand handling.

Parameters

wparam : int

lparam : int

Comments

The base class method must be called manually via PyCWnd::OnCommand . Failure to call the base implementation will prevent all Python command handlers (hooked via PyCWnd::HookCommand ).


PyCWnd.OnCreate

PyCWnd.OnCreate Virtual

OnCreate()

Called for the WM_CREATE message.

Comments

The MFC implementation is always called before Python.

Return Value

The result is an integer indicating if the window should be created.


PyCWnd.OnCtlColor

PyCWnd.OnCtlColor Virtual

OnCtlColor()

Called for the WM_CTLCOLOR message.

Comments

Setup dc to paint the control pWnd of type nCtlColor.

The default calls OnCtlColor(). If you supply a handler, the default is not called.

See Also

PyCWnd::OnCtlColor

Return Value

Handle of the brush to paint the control's background.


PyCWnd.OnEraseBkgnd

PyCWnd.OnEraseBkgnd Virtual

OnEraseBkgnd(dc)

Called for the WN_ERASEBACKGROUND message.

Parameters

dc : PyCDC

The device context.

See Also

PyCWnd::OnEraseBkgnd

Return Value

Nonzero if it erases the background; otherwise 0.


PyCWnd.OnMDIActivate

PyCWnd.OnMDIActivate Virtual

OnMDIActivate(bActivate, wndActivate , wndDeactivate )

Parameters

bActivate : int

wndActivate : PyCWnd

wndDeactivate : PyCWnd

Comments

The MFC implementation is always called before this.


PyCWnd.OnMouseActivate

PyCWnd.OnMouseActivate Virtual

OnMouseActivate(wndDesktop, hitTest , msg )

Called when the mouse is used to activate a window.

Parameters

wndDesktop : PyCWnd

hitTest : int

msg : int

See Also

PyCWnd::OnMouseActivate


PyCWnd.OnNcCalcSize

PyCWnd.OnNcCalcSize Virtual

OnNcCalcSize()

Called for the WM_NCCALCSIZE message.


PyCWnd.OnNcHitTest

PyCWnd.OnNcHitTest Virtual

OnNcHitTest(x,y)

Called for the WM_NCHITTEST message.

Parameters

x,y : int, int

The point to test.

See Also

PyCWnd::OnNcHitTest


PyCWnd.OnPaint

PyCWnd.OnPaint Virtual

OnPaint()

Default message handler.

See Also

Wnd::OnPaint


PyCWnd.OnPaletteChanged

PyCWnd.OnPaletteChanged Virtual

OnPaletteChanged(focusWnd)

Called to allow windows that use a color palette to realize their logical palettes and update their client areas.

Parameters

focusWnd : PyCWnd

The window that caused the system palette to change.


PyCWnd.OnPaletteIsChanging

PyCWnd.OnPaletteIsChanging Virtual

OnPaletteIsChanging(realizeWnd)

Informs other applications when an application is going to realize its logical palette.

Parameters

realizeWnd : PyCWnd

Specifies the window that is about to realize its logical palette.

Comments

The MFC base class is always called before the Python method.


PyCWnd.OnQueryDragIcon

PyCWnd.OnQueryDragIcon Virtual

OnQueryDragIcon()

Called for the WM_QUERYDRAGICON message.

See Also

PyCWnd::OnQueryDragIcon

Return Value

The result is an integer containing a HCURSOR for the icon.


PyCWnd.OnQueryNewPalette

PyCWnd.OnQueryNewPalette Virtual

OnQueryNewPalette()

Informs the window it is about to receive input focus, and shoudl realize its logical palette.

Comments

The base class method must be called manually via PyCScrollView::OnQueryNewPalette

See Also

PyCWnd::OnQueryNewPalette


PyCWnd.OnSetCursor

PyCWnd.OnSetCursor Virtual

OnSetCursor(wnd, hitTest , msg )

Called for the WM_SETCURSOR message.

Parameters

wnd : PyCWnd

hitTest : int

msg : int

See Also

PyCWnd::OnSetCursor


PyCWnd.OnSysColorChange

PyCWnd.OnSysColorChange Virtual

OnSysColorChange()

Called for all top-level windows when a change is made in the system color setting.

Comments

The MFC base class is always called before the Python method.


PyCWnd.OnWinIniChange

PyCWnd.OnWinIniChange Virtual

OnWinIniChange(section)

Called when the system configuration changes.

Parameters

section : string

The section which changed.

Comments

The MFC base class is always called before the Python method.


PyCWnd.PreCreateWindow

PyCWnd.PreCreateWindow Virtual

PreCreateWindow(CREATESTRUCT)

Called by the framework before the creation of the Windows window attached to this View object.

Parameters

CREATESTRUCT : tuple

A tuple describing a CREATESTRUCT structure.

See Also

PyCWnd::PreCreateWindow


PyCWnd.PreTranslateMessage

PyCWnd.PreTranslateMessage Virtual

PreTranslateMessage(msg)

Allows a Window to override the PreTranslateMessage handling.

Parameters

msg : tuple

Built from a MSG structure using format "iiiii(ii)"

Return Value

The result should be a tuple of the same format as the msg param, in which case the MSG structure will be updated and TRUE returned from the C++ function. If None is returned, the default handler is called.


PyCWnd.SCROLLINFO tuple

SCROLLINFO tuple(addnMask, min, max, page, pos, trackPos)

Describes a SCROLLINFO tuple

Parameters

addnMask : int

Additional mask information. Python automatically fills the mask for valid items, so currently the only valid values are zero, and win32con.SIF_DISABLENOSCROLL.

min : int

The minimum scrolling position. Both min and max, or neither, must be provided.

max : int

The maximum scrolling position. Both min and max, or neither, must be provided.

page : int

Specifies the page size. A scroll bar uses this value to determine the appropriate size of the proportional scroll box.

pos : int

Specifies the position of the scroll box.

trackPos : int

Specifies the immediate position of a scroll box that the user is dragging. An application can retrieve this value while processing the SB_THUMBTRACK notification message. An application cannot set the immediate scroll position; the PyCWnd::SetScrollInfo function ignores this member.

Comments

When passed to Python, will always be a tuple of size 6, and items may be None if not available.

When passed from Python, it must have the addn mask attribute, but all other items may be None, or not exist.
userob is any Python object at all, but no reference count is kept, so you must ensure the object remains referenced throught the lists life.


win32ui.CreateRgn

PyCRgn = CreateRgn()

Creates a new rgn object. Return Values: a PyCRgn object


win32ui.CreateToolBarCtrl

PyCToolBarCtrl = CreateToolBarCtrl()

Creates a toolbar control object. PyCToolBarCtrl::CreateWindow creates the actual control.


win32ui.CreateToolTipCtrl

PyCToolTipCtrl = CreateToolTipCtrl()

Creates a progress control object. PyToolTipCtrl::Create creates the actual control.


win32ui.GetRect

tuple = GetRect()

Returns the rectangle of the main application frame. See PyCWnd::GetWindowRecr for further details.

Return Value

A tuple of integers with (left, top, right, bottom)


AFX_IDW_PANE_FIRST

const win32ui.AFX_IDW_PANE_FIRST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of the first splitter pane


AFX_IDW_PANE_LAST

const win32ui.AFX_IDW_PANE_LAST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of the last splitter pane


AFX_WS_DEFAULT_VIEW

const win32ui.AFX_WS_DEFAULT_VIEW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_maybeAttemptForeign

const win32ui.CDocTemplate_Confidence_maybeAttemptForeign;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_maybeAttemptNative

const win32ui.CDocTemplate_Confidence_maybeAttemptNative;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_noAttempt

const win32ui.CDocTemplate_Confidence_noAttempt;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAlreadyOpen

const win32ui.CDocTemplate_Confidence_yesAlreadyOpen;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAttemptForeign

const win32ui.CDocTemplate_Confidence_yesAttemptForeign;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAttemptNative

const win32ui.CDocTemplate_Confidence_yesAttemptNative;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_docName

const win32ui.CDocTemplate_docName;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_fileNewName

const win32ui.CDocTemplate_fileNewName;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_filterExt

const win32ui.CDocTemplate_filterExt;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_filterName

const win32ui.CDocTemplate_filterName;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_regFileTypeId

const win32ui.CDocTemplate_regFileTypeId;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_regFileTypeName

const win32ui.CDocTemplate_regFileTypeName;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_windowTitle

const win32ui.CDocTemplate_windowTitle;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapNone

const win32ui.CRichEditView_WrapNone;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapToTargetDevice

const win32ui.CRichEditView_WrapToTargetDevice;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapToWindow

const win32ui.CRichEditView_WrapToWindow;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


debug

const win32ui.debug;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

1 if we are current using a _DEBUG build of win32ui, else 0.


FWS_ADDTOTITLE

const win32ui.FWS_ADDTOTITLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension. Add document title to window title.


FWS_PREFIXTITLE

const win32ui.FWS_PREFIXTITLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension.


FWS_SNAPTOBARS

const win32ui.FWS_SNAPTOBARS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension.


ID_APP_ABOUT

const win32ui.ID_APP_ABOUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_APP_EXIT

const win32ui.ID_APP_EXIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CLEAR

const win32ui.ID_EDIT_CLEAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CLEAR_ALL

const win32ui.ID_EDIT_CLEAR_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_COPY

const win32ui.ID_EDIT_COPY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CUT

const win32ui.ID_EDIT_CUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_FIND

const win32ui.ID_EDIT_FIND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_GOTO_LINE

const win32ui.ID_EDIT_GOTO_LINE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_PASTE

const win32ui.ID_EDIT_PASTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REDO

const win32ui.ID_EDIT_REDO;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REPEAT

const win32ui.ID_EDIT_REPEAT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REPLACE

const win32ui.ID_EDIT_REPLACE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_SELECT_ALL

const win32ui.ID_EDIT_SELECT_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_SELECT_BLOCK

const win32ui.ID_EDIT_SELECT_BLOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_UNDO

const win32ui.ID_EDIT_UNDO;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_CHECK

const win32ui.ID_FILE_CHECK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_CLOSE

const win32ui.ID_FILE_CLOSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_IMPORT

const win32ui.ID_FILE_IMPORT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_LOCATE

const win32ui.ID_FILE_LOCATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE1

const win32ui.ID_FILE_MRU_FILE1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE2

const win32ui.ID_FILE_MRU_FILE2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE3

const win32ui.ID_FILE_MRU_FILE3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE4

const win32ui.ID_FILE_MRU_FILE4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_NEW

const win32ui.ID_FILE_NEW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_OPEN

const win32ui.ID_FILE_OPEN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PAGE_SETUP

const win32ui.ID_FILE_PAGE_SETUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT

const win32ui.ID_FILE_PRINT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT_PREVIEW

const win32ui.ID_FILE_PRINT_PREVIEW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT_SETUP

const win32ui.ID_FILE_PRINT_SETUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_RUN

const win32ui.ID_FILE_RUN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE

const win32ui.ID_FILE_SAVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE_ALL

const win32ui.ID_FILE_SAVE_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE_AS

const win32ui.ID_FILE_SAVE_AS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_GUI_REF

const win32ui.ID_HELP_GUI_REF;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_OTHER

const win32ui.ID_HELP_OTHER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_PYTHON

const win32ui.ID_HELP_PYTHON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_INDICATOR_COLNUM

const win32ui.ID_INDICATOR_COLNUM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_INDICATOR_LINENUM

const win32ui.ID_INDICATOR_LINENUM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_NEXT_PANE

const win32ui.ID_NEXT_PANE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_PREV_PANE

const win32ui.ID_PREV_PANE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_SEPARATOR

const win32ui.ID_SEPARATOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_BROWSE

const win32ui.ID_VIEW_BROWSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_EOL

const win32ui.ID_VIEW_EOL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FIXED_FONT

const win32ui.ID_VIEW_FIXED_FONT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_COLLAPSE

const win32ui.ID_VIEW_FOLD_COLLAPSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_COLLAPSE_ALL

const win32ui.ID_VIEW_FOLD_COLLAPSE_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_EXPAND

const win32ui.ID_VIEW_FOLD_EXPAND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_EXPAND_ALL

const win32ui.ID_VIEW_FOLD_EXPAND_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_TOGGLE

const win32ui.ID_VIEW_FOLD_TOGGLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_INDENTATIONGUIDES

const win32ui.ID_VIEW_INDENTATIONGUIDES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_INTERACTIVE

const win32ui.ID_VIEW_INTERACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_OPTIONS

const win32ui.ID_VIEW_OPTIONS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_RIGHT_EDGE

const win32ui.ID_VIEW_RIGHT_EDGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_STATUS_BAR

const win32ui.ID_VIEW_STATUS_BAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_TOOLBAR

const win32ui.ID_VIEW_TOOLBAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_TOOLBAR_DBG

const win32ui.ID_VIEW_TOOLBAR_DBG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_WHITESPACE

const win32ui.ID_VIEW_WHITESPACE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_ARRANGE

const win32ui.ID_WINDOW_ARRANGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_CASCADE

const win32ui.ID_WINDOW_CASCADE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_NEW

const win32ui.ID_WINDOW_NEW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_SPLIT

const win32ui.ID_WINDOW_SPLIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_TILE_HORZ

const win32ui.ID_WINDOW_TILE_HORZ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_TILE_VERT

const win32ui.ID_WINDOW_TILE_VERT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDB_BROWSER_HIER

const win32ui.IDB_BROWSER_HIER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in bitmap for the browser


IDB_DEBUGGER_HIER

const win32ui.IDB_DEBUGGER_HIER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDB_HIERFOLDERS

const win32ui.IDB_HIERFOLDERS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in bitmap for default hierarchical list


IDC_ABOUT_VERSION

const win32ui.IDC_ABOUT_VERSION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of 'Version' control


IDC_AUTO_RELOAD

const win32ui.IDC_AUTO_RELOAD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_AUTOCOMPLETE

const win32ui.IDC_AUTOCOMPLETE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON1

const win32ui.IDC_BUTTON1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON2

const win32ui.IDC_BUTTON2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON3

const win32ui.IDC_BUTTON3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON4

const win32ui.IDC_BUTTON4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CALLTIPS

const win32ui.IDC_CALLTIPS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK1

const win32ui.IDC_CHECK1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK2

const win32ui.IDC_CHECK2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK3

const win32ui.IDC_CHECK3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_COMBO1

const win32ui.IDC_COMBO1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_COMBO2

const win32ui.IDC_COMBO2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT1

const win32ui.IDC_EDIT1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT2

const win32ui.IDC_EDIT2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT3

const win32ui.IDC_EDIT3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT4

const win32ui.IDC_EDIT4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT_COLOE

const win32ui.IDC_EDIT_COLOE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT_TABS

const win32ui.IDC_EDIT_TABS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_INDENT_SIZE

const win32ui.IDC_INDENT_SIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_KEYBOARD_CONFIG

const win32ui.IDC_KEYBOARD_CONFIG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_LIST1

const win32ui.IDC_LIST1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT1

const win32ui.IDC_PROMPT1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT2

const win32ui.IDC_PROMPT2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT3

const win32ui.IDC_PROMPT3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT4

const win32ui.IDC_PROMPT4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT_TABS

const win32ui.IDC_PROMPT_TABS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RADIO1

const win32ui.IDC_RADIO1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RADIO2

const win32ui.IDC_RADIO2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_COLUMN

const win32ui.IDC_RIGHTEDGE_COLUMN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_DEFINE

const win32ui.IDC_RIGHTEDGE_DEFINE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_ENABLE

const win32ui.IDC_RIGHTEDGE_ENABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_SAMPLE

const win32ui.IDC_RIGHTEDGE_SAMPLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_SPIN1

const win32ui.IDC_SPIN1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_SPIN2

const win32ui.IDC_SPIN2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_TAB_SIZE

const win32ui.IDC_TAB_SIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_USE_SMART_TABS

const win32ui.IDC_USE_SMART_TABS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_USE_TABS

const win32ui.IDC_USE_TABS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_VIEW_WHITESPACE

const win32ui.IDC_VIEW_WHITESPACE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDC_VSS_INTEGRATE

const win32ui.IDC_VSS_INTEGRATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDD_ABOUTBOX

const win32ui.IDD_ABOUTBOX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'About Box' dialog


IDD_DUMMYPROPPAGE

const win32ui.IDD_DUMMYPROPPAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dummy property page


IDD_GENERAL_STATUS

const win32ui.IDD_GENERAL_STATUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of a general status dialog box (fairly small, 3 static controls, minimize box)


IDD_LARGE_EDIT

const win32ui.IDD_LARGE_EDIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Large Edit' dialog (dialog box with a large edit control)


IDD_PP_DEBUGGER

const win32ui.IDD_PP_DEBUGGER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDD_PP_EDITOR

const win32ui.IDD_PP_EDITOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Editor' property page


IDD_PP_FORMAT

const win32ui.IDD_PP_FORMAT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Format' property page


IDD_PP_IDE

const win32ui.IDD_PP_IDE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'IDE' property page


IDD_PP_TABS

const win32ui.IDD_PP_TABS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Tabs and Whitespace' property page


IDD_PP_TOOLMENU

const win32ui.IDD_PP_TOOLMENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'ToolsMenu' property page


IDD_PROPDEMO1

const win32ui.IDD_PROPDEMO1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in Property Page demo dialog 1


IDD_PROPDEMO2

const win32ui.IDD_PROPDEMO2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in Property Page demo dialog 2


IDD_RUN_SCRIPT

const win32ui.IDD_RUN_SCRIPT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Run Script' dialog


IDD_SET_TABSTOPS

const win32ui.IDD_SET_TABSTOPS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Set Tab Stops' dialog


IDD_SIMPLE_INPUT

const win32ui.IDD_SIMPLE_INPUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Simple Input' property page.


IDD_TREE

const win32ui.IDD_TREE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dialog with a tree control.


IDD_TREE_MB

const win32ui.IDD_TREE_MB;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dialog with a tree control with multiple buttons.


IDR_CNTR_INPLACE

const win32ui.IDR_CNTR_INPLACE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_DEBUGGER

const win32ui.IDR_DEBUGGER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_MAINFRAME

const win32ui.IDR_MAINFRAME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONCONTYPE

const win32ui.IDR_PYTHONCONTYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONTYPE

const win32ui.IDR_PYTHONTYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONTYPE_CNTR_IP

const win32ui.IDR_PYTHONTYPE_CNTR_IP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


IDR_TEXTTYPE

const win32ui.IDR_TEXTTYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP


LM_COMMIT

const win32ui.LM_COMMIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Remember MRUWidth


LM_HORZ

const win32ui.LM_HORZ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

same as bHorz in CalcFixedLayout


LM_HORZDOCK

const win32ui.LM_HORZDOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Horizontal Docked Dimensions


LM_LENGTHY

const win32ui.LM_LENGTHY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Set if nLength is a Height instead of a Width


LM_MRUWIDTH

const win32ui.LM_MRUWIDTH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Most Recently Used Dynamic Width


LM_STRETCH

const win32ui.LM_STRETCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

same meaning as bStretch in CalcFixedLayout. If set, ignores nLength and returns dimensions based on LM_HORZ state, otherwise LM_HORZ is used to determine if nLength is the desired horizontal or vertical length and dimensions are returned based on nLength


LM_VERTDOCK

const win32ui.LM_VERTDOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Vertical Docked Dimensions


MFS_4THICKFRAME

const win32ui.MFS_4THICKFRAME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

thick frame all around (no tiles)


MFS_BLOCKSYSMENU

const win32ui.MFS_BLOCKSYSMENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

block hit testing on system menu


MFS_MOVEFRAME

const win32ui.MFS_MOVEFRAME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

no sizing, just moving


MFS_SYNCACTIVE

const win32ui.MFS_SYNCACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

syncronize activation w/ parent


MFS_THICKFRAME

const win32ui.MFS_THICKFRAME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

use instead of WS_THICKFRAME


PD_ALLPAGES

const win32ui.PD_ALLPAGES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

The default flag that indicates that the All radio button is initially selected. This flag is used as a placeholder to indicate that the PD_PAGENUMS and PD_SELECTION flags are not specified.


PD_COLLATE

const win32ui.PD_COLLATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Collate check box is checked. If this flag is set when the PrintDlg function returns, the application must simulate collation of multiple copies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.


PD_DISABLEPRINTTOFILE

const win32ui.PD_DISABLEPRINTTOFILE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Print to File check box.


PD_ENABLEPRINTHOOK

const win32ui.PD_ENABLEPRINTHOOK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enables the hook procedure specified in the lpfnPrintHook member. This enables the hook procedure for the Print dialog box.


PD_ENABLEPRINTTEMPLATE

const win32ui.PD_ENABLEPRINTTEMPLATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

PD_ENABLEPRINTTEMPLATE


PD_ENABLEPRINTTEMPLATEHANDLE

const win32ui.PD_ENABLEPRINTTEMPLATEHANDLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hPrintTemplate member identifies a data block that contains a preloaded dialog box template. This template replaces the default template for the Print dialog box. The system ignores the lpPrintTemplateName member if this flag is specified.


PD_ENABLESETUPHOOK

const win32ui.PD_ENABLESETUPHOOK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enables the hook procedure specified in the lpfnSetupHook member. This enables the hook procedure for the Print Setup dialog box.


PD_ENABLESETUPTEMPLATE

const win32ui.PD_ENABLESETUPTEMPLATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hInstance and lpSetupTemplateName members specify a replacement for the default Print Setup dialog box template.


PD_ENABLESETUPTEMPLATEHANDLE

const win32ui.PD_ENABLESETUPTEMPLATEHANDLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hSetupTemplate member identifies a data block that contains a preloaded dialog box template. This template replaces the default template for the Print Setup dialog box. The system ignores the lpSetupTemplateName member if this flag is specified.


PD_HIDEPRINTTOFILE

const win32ui.PD_HIDEPRINTTOFILE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Hides the Print to File check box.


PD_NONETWORKBUTTON

const win32ui.PD_NONETWORKBUTTON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Hides and disables the Network button.


PD_NOPAGENUMS

const win32ui.PD_NOPAGENUMS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Pages radio button and the associated edit controls.


PD_NOSELECTION

const win32ui.PD_NOSELECTION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Selection radio button.


PD_NOWARNING

const win32ui.PD_NOWARNING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Prevents the warning message from being displayed when there is no default printer.


PD_PAGENUMS

const win32ui.PD_PAGENUMS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Pages radio button is selected. If this flag is set when the PrintDlg function returns, the nFromPage and nFromPage members indicate the starting and ending pages specified by the user.


PD_PRINTSETUP

const win32ui.PD_PRINTSETUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Causes the system to display the Print Setup dialog box rather than the Print dialog box.


PD_PRINTTOFILE

const win32ui.PD_PRINTTOFILE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Print to File check box is selected. If this flag is set when the PrintDlg function returns, the offset indicated by the wOutputOffset member of the DEVNAMES structure contains the string "FILE:". When you call theStartDoc function to start the printing operation, specify this "FILE:" string in the lpszOutput member of theDOCINFO structure. Specifying this string causes the print subsystem to query the user for the name of the output file.


PD_RETURNDC

const win32ui.PD_RETURNDC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Causes PrintDlg to return a device context matching the selections the user made in the dialog box. The device context is returned in hDC.


PD_RETURNDEFAULT

const win32ui.PD_RETURNDEFAULT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the PrintDlg function does not display the dialog box. Instead, it sets the hDevNames and hDevMode members to handles toDEVMODE and DEVNAMES structures that are initialized for the system default printer. Both hDevNames and hDevMode must be NULL, or PrintDlg returns an error. If the system default printer is supported by an old printer driver (earlier than Windows version 3.0), only hDevNames is returned; hDevMode is NULL.


PD_RETURNIC

const win32ui.PD_RETURNIC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Similar to the PD_RETURNDC flag, except this flag returns an information context rather than a device context. If neither PD_RETURNDC nor PD_RETURNIC is specified, hDC is undefined on output.


PD_SELECTION

const win32ui.PD_SELECTION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Selection radio button is selected. If neither PD_PAGENUMS nor PD_SELECTION is set, the All radio button is selected.


PD_SHOWHELP

const win32ui.PD_SHOWHELP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Causes the dialog box to display the Help button. The hwndOwner member must specify the window to receive the HELPMSGSTRING registered messages that the dialog box sends when the user clicks the Help button.


PD_USEDEVMODECOPIES

const win32ui.PD_USEDEVMODECOPIES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Same as PD_USEDEVMODECOPIESANDCOLLATE


PD_USEDEVMODECOPIESANDCOLLATE

const win32ui.PD_USEDEVMODECOPIESANDCOLLATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

This flag indicates whether your application supports multiple copies and collation. Set this flag on input to indicate that your application does not support multiple copies and collation. In this case, the nCopies member of the PRINTDLG structure always returns 1, and PD_COLLATE is never set in the Flags member. If this flag is not set, the application is responsible for printing and collating multiple copies. In this case, the nCopies member of the PRINTDLG structure indicates the number of copies the user wants to print, and the PD_COLLATE flag in the Flags member indicates whether the user wants collation. Regardless of whether this flag is set, an application can determine from nCopies and PD_COLLATE how many copies to render and whether to print them collated. If this flag is set and the printer driver does not support multiple copies, the Copies edit control is disabled. Similarly, if this flag is set and


PSWIZB_BACK

const win32ui.PSWIZB_BACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Back button


PSWIZB_DISABLEDFINISH

const win32ui.PSWIZB_DISABLEDFINISH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet disabled Finish button


PSWIZB_FINISH

const win32ui.PSWIZB_FINISH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Finish button


PSWIZB_NEXT

const win32ui.PSWIZB_NEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Next button


COleClientItem_activeState

const win32uiole.COleClientItem_activeState;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_activeUIState

const win32uiole.COleClientItem_activeUIState;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_emptyState

const win32uiole.COleClientItem_emptyState;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_loadedState

const win32uiole.COleClientItem_loadedState;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_openState

const win32uiole.COleClientItem_openState;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP


OLE_CHANGED

const win32uiole.OLE_CHANGED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

representation of a draw aspect has changed


OLE_CHANGED_ASPECT

const win32uiole.OLE_CHANGED_ASPECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

the item draw aspect has changed


OLE_CHANGED_STATE

const win32uiole.OLE_CHANGED_STATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

the item state (open, active, etc.) has changed


OLE_CLOSED

const win32uiole.OLE_CLOSED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

the item has closed


OLE_RENAMED

const win32uiole.OLE_RENAMED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

the item has changed its moniker


OLE_SAVED

const win32uiole.OLE_SAVED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/PYTHONWIN/WIN32UIOLE.CPP

the item has committed its storage


Pythonwin's architecture.

Introduction

This document describes the general architecture of Pythonwin. It describes the general design and interface to MFC.

After reading this, you should read the document and view architecture documentation.

Objects, types, etc.

For each MFC object created, there are usually 3 "objects" floating around. Although this may initially seem confusing, it does provide significant flexibility.

In general this complexity is hidden from view. The programmer usually only ever deals with a single object, and this object manages all others. However, an understanding if the implementation will assist in advanced programming techniques.

There is a quick example which shows all this in action.

C++ objects

For every window, toolbar, document etc. that exists in Pythonwin, there is a C++ object. In some cases this object may be a standard MFC object, as found in the MFC DLL's. In other cases, the C++ object will be derived from a standard MFC object, and can be found in win32ui.pyd.

Often, these C++ objects will not be aware that there is Python support behind them.

win32ui types.

The win32ui module provides a large number of types, each one usually associated with an MFC C++ object.. The naming conventions for these objects is of the form "Py{MFC_Name}" - eg, PyCDocument provides the functionality of an MFC CDocument, PyCDialog for a CDialog.

There is a form of inheritance used for these objects. Each object provides methods from its derived class. A PyCDialog is derived from a PyCWnd, and therefore has all PyCWnd methods available. However, this is as far as the inheritance extends, as Python types are more restrictive than Python classes.

Each method that a win32ui type provides is generally just code for extracting Python arguments and making the call to the associated C++ object.

These objects and methods are defined in Pythonwin.hlp (available from the Pythonwin help menu.)

"Object" base class

In object.py, there is a base class "Object". This provides 2 key functions.

  • Its constructor (__init__ method) registers the class with a win32ui type object (see below). This allows all virtual methods (see below) to be handled by a class method.
  • It allows itself to look exactly like the underlying win32ui type. It does this by storing the win32ui object in self._obj_, and providing a __getattr__ method. See the standard Python documentation for information on __getattr__ in a Python class.

The end result of this is that a class derived from "Object" looks just like a win32ui object, and can be used as such. In fact, there is rarely a reason to use the underlying object directly.

Python Classes

If you like you can skip this, and jump straight to the example below. It makes more sense in action!

Pythonwin provides support for many "virtual" functions. A "virtual" function is defined as a virtual C++ MFC function which has deferred its implementation to a Python object. To explain, I will use the example of a document.

In Python, it is possible to create a PyCDialog object by using win32ui.CreateDialog(). This will create both a PyCDialog object, and a C++ CDialog object. For dialogs to be useful to a programmer, it must be possible to define a method to be called when the dialog initialises (i.e., when the C++ OnInitDialog virtual method is called). Normally, a programmer would initialise the values of controls etc. at this time. To support this, the C++ OnInitDialog implementation calls Python to handle the call. In this example, OnInitDialog is a "virtual" function.

Each win32ui type supports being "attached" to a Python class instance. When a virtual function is called, the Python class instance associated with the object is checked to see if it has a method with the same name. If so, the method is called.

More details on this can be found in the document and view architecture documentation.

Example of this in action

>>> import win32ui # import the base win32ui module.
>>> import dialog # import dialog.py
>>> d=dialog.Dialog(win32ui.IDD_SIMPLE_INPUT)
>>> d
<Dialog instance at 886c78>

This creates an instance of class Dialog, defined in dialog.py. Dialog is derived from Object (via Wnd). To see the underlying win32ui type:

>>> d._obj_
object 'PyCDialog' - assoc is 002F3278, vf=True, ch=0, mh=2, kh=0
>>>
This output shows the C++ CDialog object is at address 0x002F3278, that there is a virtual function handler (i.e., the class instance "d"), that 2 messages have hooks, and no command or keyboard handlers are installed.

Even though the DoModal() method is implemented in the underlying win32ui type, the class object can be used just like the win32ui object. Thus:

>>> d.DoModal()
1
>>>

To see virtual functions in action

>>> class MyDialog(dialog.Dialog):

...   def OnInitDialog(self, msg):

...     self.GetDlgItem(win32ui.IDC_PROMPT1).SetWindowText("Hello")

...     return 1

...

>>> d=MyDialog(win32ui.IDD_SIMPLE_INPUT)

>>> d.DoModal()

1

Note the prompt on the dialog box is now "Hello".


Documents and Views in Pythonwin

Introduction

This document describes the document/view architecture of Pythonwin. It is assumed you have read the Pythonwin architecture documentation and are somewhat familiar with the standard MFC architecture.

Wherever possible, Pythonwin and the samples have followed the same architecture as MFC. This has advantages and disadvantages. Often the MFC architecture does not seem to fit with small, short GUI utilities, due to the reliance on "document" based applications. On the positive, Pythonwin can leverage off the full MFC functionality. This means minimal code to get full-blown application support.

Document and View - Control Flow

[This needs lots more work. There where 2 flow-charts, which were semi-useless!]

The creation of the frame and views are typically done via the PyCWnd.LoadFrame method. During this call, the windows are created, and virtual functions pass control back to Python. The LoadFrame flow is shown in the separate diagram.

Object Oriented Documents

Sam Rushing once asked me "there needs to be a way to create 'object-oriented' documents, by that I mean a document with an object associated with it rather than a string. Currently the only way to open a document forces you to use a string (or None)."

The most obvious path to take would seem to override "OpenDocumentFile" or some such, and pass an object rather than a file name. The document could then load itself from the object, and all would be happy. Unfortunately, the tight integration with MFC means this can not work, and led to Sam's frustration above.

On the other hand, the "OpenDocumentFile" method is provided for integration with a standard MDI interface, and the Windows explorer. Obviously, it is not possible to select "File/Open", and load an object based document.

However, I didn't have an easy answer for him.

MFC's OLE Implementation

The closest example to the "right" way to do it seemed to be the MFC OLE implementation. When you have an object embedded in another document, and the user wants to edit the object, MFC must load the object without a simple "file name" parameter. MFC's approach is this:

  • A normal blank document is created (via OnNewDocument)
  • COLEServerDoc's OLE XPersistStorage::Load() method is called, with an "object" (the OLE storage pointer)
  • The Documents OnOpenEmbedding() method is called.
    • OnOpenDocument is called, with a NULL file name parameter.
    • Serialize is called.

Instead of changing the meaning of the existing functions, MFC adds new definitions for derived classes, such as OnOpenEmbedding

Back to our example

The cleanest thing seems to be to duplicate the functionality of "OpenDocumentFile" - such as "OpenObject". You would do this by:

  • Check to see if there is already a document representing the document open. If so, switch to it and return.
  • Create a new document object.
  • Create a frame for the document
  • Call OnNewDocument to initialise the document.
  • Set the documents title
  • Call InitialUpdateFrame for the initial display.

"objdoc.py".

In the Pythonwin demos directory, there is a file "objdoc.py".

This module defines a template, which has an "OpenObject" method, and takes any Python object as an argument. If window with the object is already open, it is switched to. If not, a edit window is created, and the objects "repr" is written to the window.

Standard virtual function specification.

I'm not sure where to stick this!

In general, the C++ virtual function handlers follow the same general logic. If no handler is defined, the base class is called. If a Python handler is defined, the base C++ class is not called. In the latter case, it is up to the Python programmer to ensure the base class is called if necessary. This is normally done by calling the method in the underlying _obj_.


Embedding Pythonwin.

Pythonwin is distributed as 2 key components - Pythonwin.exe and win32ui.pyd. Win32ui.pyd contains the raw functionality of Pythonwin - Pythonwin.exe is a simple "wrapper" .exe that hosts win32ui.pyd.

This document describes how to embed the win32ui extension module in your own application.

Limitations.

The biggest limitations you will find are that a host application must

  • Have some small changes made to the application source to fully support win32ui command handling and routing (although most things work without modification)
  • Be an MFC application

Below is some example code needed to embed win32ui in your application..

Changes to the application.

Subclass a Win32uiHostGlue class

You must instantiate a Win32uiHostGlue class. This class is used as a glue between win32ui.pyd and the host .exe, and is defined in Win32uiHostGlue.h

Currently, this consists of about 5 methods that must be called by your application. The principle is that the Application must hook certain handlers, and delegate them to the HostGlue class. This will ensure the appropriate Win32ui internals are called.

Embedding win32ui Architecture

win32uihostglue.h

The win32uihostglue.h module defines a class which makes interfacing fairly simple. This Win32uiHostGlue class is used as a glue between win32ui.pyd and the host .exe. In the most simple case, you need to instantiate one of the classes, and at certain key points in your CWinApp derived class, call the appropriate methods. You may choose to provide your own glue class derived from Win32uiHostGlue in certain cases.

Below is an example class, which overrides the "SetStatusText" method, so that status information displays in the applications status bar (this is only necessary if your application has a "non standard" status bar - normally you could omit this.).

GameApp NEAR theApp; // My existing CWinApp derived class.
// HostGlue class.

class GameHostGlue : public Win32uiHostGlue
{
  virtual void SetStatusText(const char *text, BOOL bForce)
    // Assuming our GameApp above defines a SetStatusText method
    {GetApp()->SetStatusText(text, bForce);}
};

// The one and only Glue object.
GameHostGlue NEAR glue;

And now we are well on our way.

Delegating to win32uiHostGlue

You need to either implement, or modify, certain key methods of your Application object. Probably the most important is the call to initialise win32ui. You need to modify your CWinApp::InitInstance method (it is almost certain you already have one). The following code needs to be executed in this method:

InitInstance

BOOL GameApp::InitInstance()
{
...
  if (!glue.DynamicApplicationInit("import initscore", csScripts)) {
  // Assuming you have a ReportError method - do whatever makes sense!
    ReportError("Could not attach to the Python win32ui extensions");
    return FALSE;
  }
...

Note the following:

  • The first param - "import initscore" is the Python command that will be executed to kick in the Python side of the world. For Pythonwin, this is "import pywin.framework.startup" - see "initscore.py" below.
  • The second param may be empty or NULL, and defines an additional PythonPath to be added. This is useful if you do not want your application .py/.pyd files on the main PythonPath. In the example above, code not shown loads csScripts from the applications INI file.
  • The example above assumes the Python code is not responsible for creating the main application window. In the case of Pythonwin (where the Python code does create the main window) this call actually appears in InitApplication() for the CWinApp class. The example above assumes you have existing C++ code which creates the main frame window. Your Python code could create child windows, as the initscore.py file demonstrates.

And the Rest

Below is the rest of the code you need to implement. You may need to create these methods, as the AppWizard generated MFC application does not have some.

BOOL
GameApp::OnCmdMsg (UINT nID, int nCode,
void* pExtra, AFX_CMDHANDLERINFO*pHandlerInfo)
{
  // yield to Python first - send to the main frame, as there is no Python app object.
  if (glue.OnCmdMsg (m_pMainWnd, nID, nCode, pExtra, pHandlerInfo))
    return TRUE;
  else
    return CWinApp::OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
}

BOOL GameApp::PreTranslateMessage(MSG *pMsg)
{
  if (glue.PreTranslateMessage(pMsg))
    return TRUE;
  else
    return CWinApp::PreTranslateMessage(pMsg);
}
BOOL GameApp::OnIdle( LONG lCount )
{
  // call base class idle first
  if (CWinApp::OnIdle(lCount))
    return TRUE;
  return glue.OnIdle(lCount);
}

  • initscore.py

  • Below is the code for initscore.py. Obviously your code will vary, depending on your requirements.
import sys
import win32ui
# First step - redirect python output to the debugging device, until we
# can create a window to capture it.

# Note that this is only useful while debugging, and simply sends any
# Python output (ie, exceptions while developing the startup code) is
# printed to the MSVC debugger. Note that since this code was written,
# the win32trace module has appeared, giving another alternative to
# debugging this code.
class DebugOutput:
  softspace=1
  def write(self,message):
    win32ui.OutputDebug(message)
sys.stderr=sys.stdout=DebugOutput()

# One of your first priorities should be to set sys.stdout to somewhere useful,
# depending on what useful means to your application. This code simply creates
# the Pythonwin Interactive Window, which handles this automatically.

# Now here is the code that does the real work.
import win32con

from pywin.framework import intpyapp, app

class ScoreApp(intpyapp.InteractivePythonApp):
  def InitInstance(self):
    # Call the base class (if you want)
    intpyapp.InteractivePythonApp.InitInstance(self)
    # Do domething useful, specific to your app.
    # Here, we minimise the interactive window.
    # (after painting the main frame)
    win32ui.PumpWaitingMessages()
    interact.edit.currentView.GetParent().ShowWindow(win32con.SW_MINIMIZE)

#  def OnExitInstance(self):
#    return 0

app = ScoreApp()

And we are done


Pythonwin GUI Environment

This document describes the Pythonwin GUI environment. There are quite a few little features hidden away!

It has a discussion on the General Environment (including the Interactive Window and Menu and Toolbar), and the Command Line Arguments supported.

General Environment

Interactive Window

The Interactive Window is a little Python program which simulates the built-in Python interpreter. It is implemented in intpyapp.py (which in turn uses winout.py - a general purpose "output window".)

Pressing Enter

Whenever you press Enter, the interactive window has a look at the context, to try and decide what to do.

If the line is recognised as a "block" (ie, the first line starts with ">>> ", and the rest start with "… "), it checks to see if we are at the end of the window. If not, the block is copied to the end of the buffer - nothing is executed - enter must be pressed again to force execution.

If we are at the end of the buffer, it always attempts to execute the line. If Python indicates "unexpected end of file", then it assumes the block should continue, and emits the "… " for the next line.

If the line is recognised as part of a Python exception, then some special processing is done. If the line contains a filename and line number, it locates that file, and jumps to the offending line.

If the line is recognised as being an exception generated by COM (aka OLE), and the exception contains reference to a WinHelp file, the help topic is opened.

Menu and Toolbar

File Open/Close/Save/Print/etc.

All perform the obvious file operations. Pythonwin follows the standard MFC framework, and allows Python programs to plug-in support for other file types.

Locate File

Allows quick location of a Python scripts. Typing in the base name of a file will force a search of all the directories on sys.path, until a match is found.

To locate a module in a package, use a (back) slash instead of a dot - eg, to locate "win32com.client.dynamic", type in "win32com\client/dynamic"

Import Script

Imports or reloads a script - just like "import scriptname"/"reload(scriptname)" - (Pythonwin determines if the operation is an import or reload, It also handles "ni" modules with some success!)

If you select this (or use <Ctrl-I>) when a .py file is open, that file is saved and imported. If a current file can not be located, it will ask for a file to import via a File dialog.

If a syntax error occurs, the location will be moved to in the editor.

Run Script

Runs a script, as if the file was passed on the command line. A dialog is opened, asking the script name and arguments (unless the <Shift> key is held down)

Command Line Arguments

The following command line arguments are recognised. Note that these are implemented in "intpyapp.py", so should be pretty easy to change!

/run scriptname args

Runs the named script. Works just like "Python.exe scriptname args", except it is run in the GUI environment, and output goes to the interactive window.

/runargs scriptname args

As above, except the normal Pythonwin 'Run Script' dialog is shown.

/edit filename.py

Edits the filename. The /edit is currently optional, but in the future, the "default argument handling" may be changed.

/app specialscriptname args

Runs a special "application script". The application script can change the entire look and feel of a Pythonwin program - almost as much flexibility as the C++ programmer has when they first start their application). An example of this is "dlgapp.py" in the Pythonwin distribution.


Win32 Debugger Documentation

Pythonwin Debugger Documentation

This documents the Win32 Debugger, and much of its functionality.

You may also wish to view the debugger overview, the debugger tutorial, or the known problems with the debugger.

This document contains the following topics

pywin.debugger package
Debugger Interface
GUI versus Non-GUI Issues
How It Works

pywin.debugger package

The debugger is a sub-package of Pythonwin, named pywin.debugger.

Debugger Interface

The debugger is based on the standard Python debugging modules. It is suggested you read the documentation on the "pdb" and "bdb" modules. This documentation can be located in the standard Python documentation:

The package exports the following functions:

GetDebugger()

Returns a debugger object. If there is already a debugger, then this function returns it (re-creating its window, if necessary). If there is no current debugger, a debugger is created.

The following functions operate almost identically to those described in the pdb documentation

set_trace()
brk() # alternative name

Like a hard-coded break-point, this function creates a debugger if necessary, and stops at the following statement. Note - putting this statement as the last line of a function may cause you to stop at an unexpected place!

post_mortem(traceback, exception_type = None, exception_value = None)

Perform post-mortem debugging of the passed traceback. This is useful for analysing the conditions that lead up to an exception.

run(cmd, globals=None, locals=None)

Begin debugging the command, in the globals and locals context.

runeval(expression, globals=None, locals=None)

Like "run" but treats the string as an expression to be evaluated.

GUI versus Non-GUI Issues

The Pythonwin debugger behaves differently depending on if the application being debugged is Pythonwin or not. If the host Python application is Pythonwin, then the debugger runs in "GUI" mode - otherwise in "non-GUI" mode.

If the application is not Pythonwin, then the debugger has far less control over the debugging environment. There are 2 main areas where this is most apparent.

Will we return?

In a non-GUI application, each time we leave the debugger (eg, to step through a line of code), we may never re-appear. We may be debugging the last statement of the program, or just may never hit another breakpoint until termination.

Therefore, the debugger will always prompt for file saves whenever stepping into code. Although the file will be saved, the changes will probably not take affect until the program is restarted.

Are there any messages for me?

When debugging non-GUI applications, there may not be a message loop. As the debugger is a GUI application, it needs a message loop to respond to user interaction, etc.

There is an option for the debugger to "hide in non-GUI applications", which by default is enabled. This means that each time a statement is executed, the entire debugger environment is hidden! In fact, it may never re-appear (see above).

If you disable this option, then debugging these applications will be smoother, but the side-effects will depend on your host application.

If debugging a Python.exe program (or any other console program), the debugger will not be hidden, but will not respond at all to any user input while the host program is executing. In fact, the debugger will appear to have totally hung. The debugger has not hung - it just can not process messages. It will either spring back into life when a breakpoint etc. it hit, or vanish when the host application exits.

If debugging inside another GUI application (such as Excel, or MS Internet Explorer), then there is a reasonable chance that the debugger will continue to operate totally normally while the host is running (ie, just as it does under Pythonwin)

Let me out of here

The other potential area where things may get strange is shutting down the main application frame while debugging. In general, this should shut down normally, but sometimes may not!

How It Works

For those who care, the debugger uses the standard Python debugger hooks. Whenever interaction with the user is required, the debugger creates a new message loop, right under the code being debugged.

While this message loop is processing messages, the code is broken, and the user can interact with the debugger. Whenever the debugger is about to return control to Python itself, it breaks out of the message loop, leaving the code to execute as it was.


Win32 Debugger Overview

Pythonwin Debugger Overview

News Flash:

We take full advantage of Scintilla from Neil Hodgson (see scintilla.org) This offers a much better interface, including Visual C++/VB type indicators for breakpoints in the left column, etc

This document gives a general overview of the Pythonwin Debugger package.

  • If you are using or looking at this package for the first time, you should check out the debugger tutorial.
  • For reference information, check out the general debugger documentation
  • If something doesn't work, please read the known problems with the debugger before mailing me!

Introduction

This package is a general-purpose debugger for Python on Win32 platforms. It is a full-blown GUI debugger with the following features:

  • Works from almost any Python program - be it inside Pythonwin, a console "Python.exe" program - even from within a COM object hosted by Visual Basic or Microsoft Internet Explorer (but not from a Tkinter app, apparently?)
  • MSVC style debugging interface, including breakpoint etc indicators in the margin, and dockable debugging windows.
  • Call-stack display lets you see each individual stack entry, and examine the local and global variables.
  • Iinteractive window fully operarable in the context of the code being debugged!

There used to be more out-of-date stuff here, but not any more :-) The tutorial is also a little out of date, but is worth following along with (but as you notice the old screen shots, say a praise for Scintilla!)

  • For questions or comments about the debugger, send email to MarkH@ActiveState.com (Mark Hammond).


Known Problems

Pythonwin Debugger Known Problems

This document lists the currently known problems with the pywin.debugger package.

You may also wish to view the debugger overview, the debugger tutorial, or the general debugger documentation.

Exiting the debugger on Windows 95 sometimes causes a crash.

There is a problem with the "hierlist" control on Windows 95. I don't know what it is.

Closing the main debugger application while debugging may cause strange results.

This is particularly true when debugging non-Pythonwin applications. I have made some efforts in this area, but it is pretty hard and complex.

Closing the debugger dialog, selecting "End/Close" from one of the property pages, or "Close" from the debugging toolbar should always work as expected.

Debugging the bottom call-stack does not work as expected.

If you are ever debugging a function that is the only function in the call-stack (ie you are at the bottom stack), then the functions "run" "step out" and "step over" may not work as expected - each of these operations may function as a single-step.

You will need to single-step out of this entire function.

Output window does not show function arguments

This is a restriction in the core Python interpreter, caused by the introduction of keyword arguments. When Python supports it again, so will I.


Win32 Debugger Tutorial

Pythonwin Debugger Tutorial

NOTE: This debugger used to be known as the "win32dbg" package. Also, we have recently upgraded to a much better editor control. The screen shots in this tutorial do not reflect these recent changes. Although "win32dbg" will still work, you should substitute "pywin.debugger" for "win32dbg" in the screen-shots, and hopefully the new editor control will make the break-points etc even more obvious.

This tutorial shows how to debug a file provided with Pythonwin distribution. The module we will debug is called "fail.py", and is provided purely for demonstrating and testing the debugger. This file is located in the Pythonwin\pywin\debugger directory.

This document does not attempt to discuss general debugging concepts. It is assumed that you understand the concepts of "Step In" to a routine, "Step Over" a routine, "call stack", "break-point" etc.

When you have completed the tutorial, you should read the general debugger documentation.

In general, the user interface should be fairly intuitive. All toolbar items have status bar text and tool-tips, which will help determine their function.

This tutorial covers the following topics:

Preparation for the tutorial
Starting the Debugger
Setting a Breakpoint
Stepping through the code
Examining the current context
Postmortem diagnostics

Preparation for the tutorial

To prepare for the tutorial, ensure you have Pythonwin installed, then start either Pythonwin/Python, Windows Explorer, or an "MS-DOS" prompt

Starting the Debugger

From Pythonwin or Python.exe

At the interactive window, type:

import pywin.debugger.fail<enter>

From Windows Explorer

Navigate to the Pythonwin\pywin\debugger directory, and double-click on the file "fail.py"

From the MS-DOS Prompt

Change to the Pythonwin\pywin\debugger directory.

For Windows NT users, type:

fail.py<enter>

Or Windows 95/98 (sob - you would hope that 98 would have fixed some of 95s dumbness!)

<path to python.exe>\python.exe fail.py

or

start fail.py

Using the Debugger

If all goes well, you should see the debugger appear in a full GUI frame, with a particular line in fail.py highlighted. Part of the screen should look something like:

NOTE: This screen capture is wrong - hopefully what you can see on your screen is better and more obvious than this old picture!

In this case, the Python program has executed until it hit the statement:

pywin.debugger.set_trace()

This statement is effectively a hard-coded break-point, which creates a debugger, and causes it to stop at the statement following the set_trace().

The Debugger is showing the blue line as the "current" line - this is the next statement to be executed.

Setting a Break-point

Our next step is to set a breakpoint somewhere inside the code that remains to be executed. As you can see, the Python program is about to call the function "c()". Examining the source, we can see that c() calls d(). The first line of d() is a good spot!

To set a break-point, perform the following steps.

  • Select the "fail.py" source file (or more generally, you can open another source file, and set a break-point there).
  • Scroll to the location where a breakpoint should be set, and ensure the carat (edit box cursor) is on the line.
  • Either: Select the "Hand" icon on the debugger toolbar. Or: Select the "Breakpoints" property page, and select the "Add/Clear" button.

The debugger should then look something like:

Note the current line is still colored blue, and the newly added break-point is colored red. You can also select the "Breakpoints" property-page and see the breakpoint listed there.

We are now ready to run the debugger.

  • Either: Select "Go" from one of the property-pages, or select the "Run" toolbar item.

The debugger should vanish briefly, then re-appear after hitting the breakpoint.

Notes

  • The behaviour of the "hiding" can be changed, but with caveats - see the general debugger documentation for details on GUI versus non-GUI issues).
  • The debugger will show the break-point line in blue - there will be no visual indication the line is both a break-point, and the current line. As soon as the current line moves off this line, it will return to its break-point color.

Stepping through the code

Use the "Step" toolbar or dialog button to step through code. Stepping from the current location will step over the assignment of 1 to the local variable d. Continuing to step will step into the function e().

Examining the current context

Just to jump in, we should have a play with the property pages.

  • Use the "Call Stack" page to see the current context. Double-clicking will change the "current context", and change the highlight. Expand and collapse each entry to view locals and globals.
  • Use the "Interactive" page to view and change variables in the current context. For example, assuming that "d()" is still the top call stack, entering "d<enter>" into the interactive page will print "1". Almost any Python expression/statement can be executed here, from the current context. Use the "Call Stack" page to change the current context (ie, make another stack entry blue), and notice how "d" is likely to evaluate to the function d() (ie, the interactive page has changed contexts)

Post-mortem diagnostics

The fail.py as distributed is setup to demonstrate "port-mortem" debugging - ie, debugging after an exception has occurred.

To demonstrate post-mortem diagnostics, simply:

  • Click on the "Run" toolbar item or property page button

The debugger will again vanish, and re-appear looking something like:

Notice that there is now a new property page, titled "Exception". This shows the traceback that Python would normally print if this exception was unhandled.

All other features of the debugger work as expected. You can view each call stacks local and globals, etc. However, you can not force Python to ignore, or otherwise alter the normal Python exception processing. (except, or course, by stopping the debugger)

OK - now jump to the general debugger documentation to get a more detailed picture.