Rhino C++ API  8.13
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
CRhinoUiTabbedSheetCtrlMsg Class Reference

#include <RhinoSdkUiTabbedSheetCtrl.h>

Classes

struct  tagCUSTOMINFO
 

Public Types

typedef struct CRhinoUiTabbedSheetCtrlMsg::tagCUSTOMINFO CUSTOMINFO
 
typedef struct CRhinoUiTabbedSheetCtrlMsg::tagCUSTOMINFOLPCUSTOMINFO
 
enum  message_id {
  mid_sel_changing = 1, mid_sel_changed, mid_delete_item, mid_begin_label_edit,
  mid_end_label_edit, mid_right_mouse_down_on_tab, mid_begin_tab_drag, mid_tab_dropped,
  mid_tab_drag_moved, left_mouse_down_on_add_button, add_button_click, force_32bit_message_id = 0xFFFFFFFF
}
 

Static Public Member Functions

static void InitCustomInfo (CUSTOMINFO &info, HWND hWnd, message_id message, int iItem1, int iItem2=-1, LPCTSTR lps=NULL, LPPOINT lpPt=NULL, bool b=true)
 
static LPCTSTR MsgString ()
 

Static Public Attributes

static const UINT m_custom_msg_id
 

Detailed Description

Description: Registered Windows message sent to controls parent then and then the control itself if the parent does not return a non zero value. This message is sent when calling DeleteItem() or DeleteAllItems() and uses the following format: message = CRhinoUiTabbedSheetCtrl::m_delete_item_custom_win_msg (static UINT holding ID of registered Windows message) WPARAM = HWND of the control sending the message LPARAM = Zero based index of item being deleted.

To use this notification message do add the message map macro to the parent of this control: ON_REGISTERED_MESSAGE( CRhinoUiTabbedSheetCtrlMsg::m_custom_msg_id, OnTabbedSheetCtrlMsg) Add this to the decloration of the the parent window class: afx_msg LRESULT OnTabbedSheetCtrlMsg( WPARAM wParam, LPARAM lParam); Add this method to the class implementation LRESULT CMyDialog::OnTabbedSheetCtrlMsg( WPARAM wParam, LPARAM lParam) { CRhinoUiTabbedSheetCtrlMsg::LPCUSTOMINFO pInfo = (CRhinoUiTabbedSheetCtrlMsg::LPCUSTOMINFO)lParam; if( NULL == pInfo) return 0;

if( m_tabbed_sheet_ctrl.m_hWnd != pInfo->m_hWnd) return 0;

switch( pInfo->m_nMsg) { case CRhinoUiTabbedSheetCtrlMsg::mid_delete_item: ///< do something like deleting item data return 1; case CRhinoUiTabbedSheetCtrlMsg::mid_begin_label_edit: ///< allow label edit return 1; case CRhinoUiTabbedSheetCtrlMsg::mid_end_label_edit: ///< Allow label update as long as text is not empty return( pInfo->m_lpsText && pInfo->m_lpsText[0]); } return 0L; }

See Also: RegisterWindowMessage() in the Platform SDK ON_REGISTERED_MESSAGE in the Platform SDK

Member Typedef Documentation

◆ CUSTOMINFO

◆ LPCUSTOMINFO

Member Enumeration Documentation

◆ message_id

Enumerator
mid_sel_changing 

Message sent when the current tab is about to change.

mid_sel_changed 

Message sent when the current tab has been changed.

mid_delete_item 

Message sent just prior to deleting an item.

mid_begin_label_edit 

Message sent prior to editing an item label, return 1 to allow Editing to continue or 0 to disable editing for this item

mid_end_label_edit 

Message sent when in-place edit control is hidden and text has changed. Return 1 to commit change or 0 to abort.

mid_right_mouse_down_on_tab 

The right mouse button has gone down over a tab. The tab will be made current prior to this message being sent.

mid_begin_tab_drag 

Message sent just prior to starting to drag a tab. If the m_bool property is not set to true then the drag action is aborted. By default m_bool is true.

mid_tab_dropped 

Message sent when a tab is dragged and dropped someplace other than on another tab. m_pt Will contain screen point for drop action.

mid_tab_drag_moved 

Message sent when a tab is dragged to a new position in the control. m_iItem Will be equal to new position, m_nPrevSel will be equal to previous position.

left_mouse_down_on_add_button 

The left mouse went down on the add button, the "+" after the last tab.

add_button_click 

The left mouse went down and up on the add button, the "+" after the last tab

force_32bit_message_id 

for internal use only, this allows adding additional values without breaking the SDK in the future

Member Function Documentation

◆ InitCustomInfo()

static void CRhinoUiTabbedSheetCtrlMsg::InitCustomInfo ( CUSTOMINFO info,
HWND  hWnd,
message_id  message,
int  iItem1,
int  iItem2 = -1,
LPCTSTR  lps = NULL,
LPPOINT  lpPt = NULL,
bool  b = true 
)
static

◆ MsgString()

static LPCTSTR CRhinoUiTabbedSheetCtrlMsg::MsgString ( )
static

Member Data Documentation

◆ m_custom_msg_id

const UINT CRhinoUiTabbedSheetCtrlMsg::m_custom_msg_id
static