AddDialogControls (class MKI_SUBCLASS_LIST) New in Version 2024.0

www.CAD6.com

C++ Syntax

void

MKI_SUBCLASS_LIST::AddDialogControls(

 HWND f_hDlg );

 

Sub-classes all relevant controls in a dialog window that have not yet been sub-classed individually to allow the serving application to apply the current skin to those controls.

 

Parameters

f_hDlg

[HWND] Handle of the dialog window or property page window whose controls are to be sub-classed.

 

Comment

This procedure should be called in the WM_INITDIALOG case of all dialog window handling procedures after all individual controls have been sub-classed, but before possibly calling AddPropertySheetControls().

 

INT_PTR CALLBACK

DialogProc( HWND f_hDlg, UINT f_unMessage, WPARAM f_wParam, LPARAM f_lParam )

{

  static MKI_SUBCLASS_LIST s_cSubclassList;

 

  switch( f_unMessage )

  {

    case WM_INITDIALOG:

 

      ...

 

      s_cSubClassList.Init();

      // Subclass individual controls here, if required.

      s_cSubClassList.AddDialogControls( f_hDlg );

      break;

  }

  return( 0 );

}

 

If you wish to change the visibility and state of sub-classed controls, use the appropriate functions MKI_DialogControlShow(), MKI_DialogControlHide(), MKI_DialogControlEnable(), and MKI_DialogControlDisable(). Using the general Windows commands EnableWindow() or ShowWindow() may result in incomplete visual updating since they do not force a redraw!

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH