Skip to content

Latest commit

 

History

History
480 lines (239 loc) · 10.4 KB

PyCFrameWnd.md

File metadata and controls

480 lines (239 loc) · 10.4 KB

PyCFrameWnd

PyCFrameWnd Object

A windows frame window. Encapsulates an MFC CFrameWnd

class. Derived from a PyCWnd object.

Methods

PyCFrameWnd.BeginModalState

BeginModalState() Sets the frame window to modal.

PyCFrameWnd.CreateWindow

tuple = CreateWindow(wndClass, title

, style

, rect

, PyCWnd

, createContext

, menuId

, 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.

  • menuId : string or int

    The string or integer 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

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(id) Loads an accelerator table.

Parameters

  • id : PyResourceId

    Name or id of the resource that contains the 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

PyCFrameWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct) Calls the underlying MFC PreCreateWindow method.

Parameters

  • createStruct : tuple

    A tuple representing a CREATESTRUCT structure.

See Also

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

PyCFrameWnd.ShowOwnedWindows

string = ShowOwnedWindows(bShow) Shows all windows that are descendants of the PyCFrameWnd object.

Parameters

  • bShow=1 : int

    Flag