Skip to content

ModernUI_SmartPanel Control

mrfearless edited this page Aug 10, 2018 · 2 revisions

ModernUI_SmartPanel Functions

MUISmartPanelRegister

Description: Registers the ModernUI_SmartPanel class, which allows the control to be created via dialog resources or via CreateWindowEx and specifying the classname ModernUI_SmartPanel. If using the RadASM custom class control instead of a the ModernUI RadASM Design Time Controls specify ModernUI_SmartPanel as the classname.

Parameters: None

MUISmartPanelCreate

Description: Creates a ModernUI_SmartPanel control. Returns in rax the handle of the newly created control or NULL.

Parameters: hWndParent, xpos, ypos, qwWidth, qwHeight, qwResourceID, qwStyle

MUISmartPanelSetProperty

Description: Set a ModernUI_SmartPanel property with a value, which is stored in the external properties structure. Properties are defined as equates and are actually offsets into the memory location used to store the properties.

Parameters: hModernUI_SmartPanel, qwProperty, qwPropertyValue

MUISmartPanelGetProperty

Description: Get a ModernUI_SmartPanel property from the internal properties structure. Properties are defined as equates and are actually offsets into the memory location used to store the properties.

Parameters: hModernUI_SmartPanel, qwProperty

MUISmartPanelGetCurrentPanel

Description: Gets the current panel that is active in the ModernUI_SmartPanel control and returns the handle to this dialog (hDialog) in rax.

Parameters: hModernUI_SmartPanel

MUISmartPanelSetCurrentPanel

Description: Sets the active panel to show, as specified via the panel index parameter PanelIndex. If panels are set to slide (animate) with any of the styles MUISPS_SLIDEPANELS_SLOW, MUISPS_SLIDEPANELS_NORMAL, MUISPS_SLIDEPANELS , MUISPS_SLIDEPANELS_FAST,MUISPS_SLIDEPANELS_VFAST they will slide from right or left depending on the old panel index vs the new panel index that will be set as the active panel. bNotify is an optional param that will send a WM_NOTIFY message to the parent of the ModernUI_SmartPanel control with a code of MUISPN_SELCHANGED and a NM_MUISMARTPANEL structure.

Parameters: hModernUI_SmartPanel, PanelIndex, bNotify

MUISmartPanelCurrentPanelIndex

Description: Gets the current panel that is active in the ModernUI_SmartPanel control and returns the panel index to this dialog in rax. To obtain the dialog panel's handle use MUISmartPanelGetCurrentPanel.

Parameters: hModernUI_SmartPanel

MUISmartPanelNextPanel

Description: Sets the active current panel to the next panel. If style MUISPS_SPS_WRAPAROUND is specified at creation, the panel will move and wrap around from the last panel to the first panel if it is currently at the last panel, instead of doing nothing. If panels are set to slide (animate) with any of the styles MUISPS_SLIDEPANELS_SLOW, MUISPS_SLIDEPANELS_NORMAL, MUISPS_SLIDEPANELS , MUISPS_SLIDEPANELS_FAST,MUISPS_SLIDEPANELS_VFAST they will slide from left to right. bNotify is an optional parameter that if TRUE will send a WM_NOTIFY message to the parent of the ModernUI_SmartPanel control with a code of MUISPN_SELCHANGED and a NM_MUISMARTPANEL structure.

Parameters: hModernUI_SmartPanel, bNotify

MUISmartPanelPrevPanel

Description: Sets the active current panel to the previous panel. If style MUISPS_SPS_WRAPAROUND is specified at creation, the panel will move and wrap around from the first panel to the last panel if it is currently at the first panel, instead of doing nothing. If panels are set to slide (animate) with any of the styles MUISPS_SLIDEPANELS_SLOW, MUISPS_SLIDEPANELS_NORMAL, MUISPS_SLIDEPANELS , MUISPS_SLIDEPANELS_FAST,MUISPS_SLIDEPANELS_VFAST they will slide from right to left. bNotify is an optional parameter that if TRUE will send a WM_NOTIFY message to the parent of the ModernUI_SmartPanel control with a code of MUISPN_SELCHANGED and a NM_MUISMARTPANEL structure.

Parameters: hModernUI_SmartPanel, bNotify

MUISmartPanelSetIsDlgMsgVar

Description: Specifies a variable that will used during a message event loop for use with IsDialogMessage. lpqwVar points is an address of a variable that will hold the handle to the current dialog panel.

Parameters: hModernUI_SmartPanel, lpqwVar

MUISmartPanelRegisterPanel

Description: Registers a dialog panel to be used with the ModernUI_SmartPanel control. The dialogs are created by the ModernUI_SmartPanel control and are hidden until they are set to be active, by calls to MUISmartPanelSetCurrentPanel or MUISmartPanelNextPanel or MUISmartPanelPrevPanel.

Parameters: hModernUI_SmartPanel, qwResIdPanelDlg, lpqwPanelProc

ModernUI_SmartPanel Styles

The ModernUI_SmartPanel control supports a number of style flags (defined in the .inc include file) that allow you to customize the behaviour of the control.

  • MUISPS_NORMAL - no slide animation
  • MUISPS_NOSLIDE - no slide animation
  • MUISPS_SLIDEPANELS_SLOW - slow speed slide animation
  • MUISPS_SLIDEPANELS_NORMAL - normal speed slide animation
  • MUISPS_SLIDEPANELS - normal speed slide animation
  • MUISPS_SLIDEPANELS_FAST - fast speed slide animation
  • MUISPS_SLIDEPANELS_VFAST - very fast speed slide animation
  • MUISPS_SLIDEPANELS_INSTANT - no slide animation
  • MUISPS_SPS_WRAPAROUND - for next/prev and showcase, if at end, moves to the right and starts again, otherwise if not specified, at last panel, scrolls left all the way back to start showing all panels along the way.
  • MUISPS_SPS_SKIPBETWEEN - skips any in between panels, just moves from one to another.
  • MUISPS_DESIGN_INFO - only used at design time to show text, which can be toggled off by user

ModernUI_SmartPanel Properties

  • @SmartPanelPanelsColor - RGBCOLOR for panel's background. -1 = ignore, use system default. Default value is -1
  • @SmartPanelBorderColor - RGBCOLOR for border color of MUISmartPanel. -1 = none. Default value is -1
  • @SmartPanelDllInstance - DWORD reserved for future use
  • @SmartPanelParam - DWORD user custom data

ModernUI_SmartPanel Messages & Notifications

ModernUI_SmartPanel Messages

  • MUISPM_REGISTERPANEL - wParam is resource id of Dialog, lParam is address of dialog procedure. Returns in rax handle of dialog panel or NULL.
  • MUISPM_SETCURRENTPANEL - wParam is panel id to select, lParam is send notify msg to parent TRUE/FALSE.
  • MUISPM_GETCURRENTPANEL - wParam & lParam is NULL. Returns in rax current panel.
  • MUISPM_NEXTPANEL - wParam send notify msg to parent TRUE/FALSE. lParam is NULL. Moves to next panel. If at end and wraparound is specified moves back to start panel, otherwise stops here.
  • MUISPM_PREVPANEL - wParam send notify msg to parent TRUE/FALSE. lParam is NULL. Moves to previous panel. If at begining and wraparound is specified moves to last panel, otherwise stops here.
  • MUISPM_GETTOTALPANELS - wParam & lParam is NULL. Returns in rax total panels.
  • MUISPM_SETISDLGMSGVAR - wParam is address of variable to hold current panel dialog handle for use with IsDialogMessage message loop calls. lParam is NULL.

ModernUI_SmartPanel Notifications

MUISP_ITEM                      STRUCT
    iItem                       DQ 0
    lParam                      DQ 0
    hPanel                      DQ 0
MUISP_ITEM                      ENDS

NM_MUISMARTPANEL                STRUCT
    hdr                         NMHDR <>
    itemOld                     MUISP_ITEM <>
    itemNew                     MUISP_ITEM <>
NM_MUISMARTPANEL                ENDS
  • MUISPN_SELCHANGED - Value in NMHDR.code used with WM_NOTIFY. wParam is a NM_MUISMARTPANEL structure.