BOOL ScreensaverApp::DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	BOOL retval=0;
	switch (uMsg)
    {
	case WM_INITDIALOG:
		{
			initDlg(hDlg);
		}break;
	case WM_COMMAND:
			HWND tmp;
      switch (LOWORD(wParam))
      {
				case ID_DEFAULT:
					CRegistry::InitDefaults();
					initDlg(hDlg);
					return TRUE;
				case IDC_CODE:
					CRegistry::MatrixShow[REGISTRY_CODE]=!CRegistry::MatrixShow[REGISTRY_CODE];
					tmp=GetDlgItem(hDlg, IDC_MTX_GLITCH);
					EnableWindow(tmp,CRegistry::MatrixShow[REGISTRY_CODE]);
					return false;
				case IDC_MESSAGE:
					CRegistry::MatrixShow[REGISTRY_MESSAGE]=!CRegistry::MatrixShow[REGISTRY_MESSAGE];
					if (CRegistry::MatrixShow[REGISTRY_MESSAGE])
						SendDlgItemMessage(hDlg, IDC_EDIT,EM_SETREADONLY,IsDlgButtonChecked(hDlg, IDC_MSG_CUSTOM)==BST_CHECKED? FALSE:TRUE,0);
					else
						SendDlgItemMessage(hDlg, IDC_EDIT,EM_SETREADONLY,TRUE,0);
					tmp=GetDlgItem(hDlg, IDC_MSG_CUSTOM);
					EnableWindow(tmp,CRegistry::MatrixShow[REGISTRY_MESSAGE]);
					tmp=GetDlgItem(hDlg, IDC_MSG_ORIG);
					EnableWindow(tmp,CRegistry::MatrixShow[REGISTRY_MESSAGE]);
					tmp=GetDlgItem(hDlg, IDC_MSG_USER);
					EnableWindow(tmp,CRegistry::MatrixShow[REGISTRY_MESSAGE]);
					return false;
				case IDC_MSG_CUSTOM:
				case IDC_MSG_ORIG:
				case IDC_MSG_USER:
					SendDlgItemMessage(hDlg, IDC_EDIT,EM_SETREADONLY,(CRegistry::MatrixShow[REGISTRY_MESSAGE])&&(IsDlgButtonChecked(hDlg, IDC_MSG_CUSTOM)==BST_CHECKED? FALSE:TRUE),0);
					return false;
				case IDC_PHONE:
					CRegistry::MatrixShow[REGISTRY_PHONE]=!CRegistry::MatrixShow[REGISTRY_PHONE];
					SendDlgItemMessage(hDlg, IDC_TELNO,EM_SETREADONLY,CRegistry::MatrixShow[REGISTRY_PHONE]?FALSE:TRUE,0);
					tmp=GetDlgItem(hDlg, IDC_ACT_TIME);
					EnableWindow(tmp,CRegistry::MatrixShow[REGISTRY_PHONE]);
					return false;
				break;
					case IDOK:
						readDlg(hDlg);
						CRegistry::WriteRegistry();
			    case IDCANCEL:
		        EndDialog(hDlg, wParam);
		        retval=TRUE;
      }
    }
	return retval;
}
BOOL EditBox::dispatch( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
{
    switch( msg )
        {
        case WM_INITDIALOG:

            initDlg( hDlg );
            return TRUE;

        case WM_COMMAND:

            switch( wParam )
                {
                case IDE_LOW:
                case IDE_MEDIUM:
                case IDE_HIGH:

                    checkButton( hDlg, wParam );
                    return TRUE;

                case IDOK:

                    okCmd( hDlg );
                    return TRUE;

                case IDCANCEL:

                    cancelCmd( hDlg );
                    return TRUE;
                }
        }

    return ModalDialog::dispatch( hDlg, msg, wParam, lParam );
}
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
    DIALOG_PLOT_SCHEMATIC_BASE( parent ),
    m_parent( parent ),
    m_plotFormat( PLOT_FORMAT_UNDEFINED ),
    m_defaultLineWidth( parent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits, true ),
    m_penWidth( parent, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits, true )
{
    m_config = Kiface().KifaceSettings();
    m_configChanged = false;

    m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );

    // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
    // that requires us to correct the button labels here.
    m_sdbSizer1OK->SetLabel( _( "Plot All Pages" ) );
    m_sdbSizer1Apply->SetLabel( _( "Plot Current Page" ) );
    m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
    m_sdbSizer1->Layout();

    m_sdbSizer1OK->SetDefault();
    initDlg();

    // Now all widgets have the size fixed, call FinishDialogSettings
    FinishDialogSettings();
}
Exemple #4
0
BOOL VideoSetDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	initDlg();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
DIALOG_NEW_DATAITEM::DIALOG_NEW_DATAITEM( PL_EDITOR_FRAME* aCaller,
                                          WORKSHEET_DATAITEM* aItem )
    : DIALOG_NEW_DATAITEM_BASE( aCaller )
{
    m_item = aItem;
    initDlg();

    GetSizer()->SetSizeHints( this );
    Centre();
}
DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( LIB_EDIT_FRAME* aParent, LIB_TEXT* aText ) :
    DIALOG_LIB_EDIT_TEXT_BASE( aParent )
{
    m_parent = aParent;
    m_graphicText = aText;
    initDlg();

    GetSizer()->SetSizeHints(this);
    Centre();
}
QPreviewFileDialog::QPreviewFileDialog(bool has_preview,bool cancel_warning,QWidget* parent,
                                       const char* name,bool modal)
                   :QFileDialog(parent,name,modal)
{
  mPreviewMode = has_preview;
  mWarnOnCancel = cancel_warning;
  mpImage = 0;
  mMustDeleteImage = false;
  setCaption(tr("Save image as..."));
  initDlg();
}
DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRAME* aParent ):
    DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( aParent )
{
    m_Parent = aParent;
    m_RecreateToolbar = false;

    initDlg();

    GetSizer()->SetSizeHints( this );
    Center();
}
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
    DIALOG_PLOT_SCHEMATIC_BASE( parent )
{
    m_parent = parent;
    m_config   = wxGetApp().GetSettings();

    initDlg();

    GetSizer()->SetSizeHints( this );

    Centre();
}
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
    DIALOG_PLOT_SCHEMATIC_BASE( parent )
{
    m_parent = parent;
    m_configChanged = false;
    m_config = Kiface().KifaceSettings();

    initDlg();

    // Now all widgets have the size fixed, call FinishDialogSettings
    FinishDialogSettings();
}
Exemple #11
0
DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_EDIT_FRAME* aParent,
                                                          DRAWSEGMENT * aItem, wxDC * aDC):
    DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( aParent )
{
    m_parent = aParent;
    m_DC = aDC;
    m_Item = aItem;
    m_brdSettings = m_parent->GetDesignSettings();
    initDlg();
    Layout();
    GetSizer()->SetSizeHints( this );
    Centre();
}
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
    DIALOG_PLOT_SCHEMATIC_BASE( parent )
{
    m_parent = parent;
    m_configChanged = false;
    m_config = Kiface().KifaceSettings();

    initDlg();

    GetSizer()->SetSizeHints( this );

    Centre();
}
DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRAME* aParent ):
    DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( aParent )
{
    m_Parent = aParent;
    m_RecreateToolbar = false;

    initDlg();


    FixOSXCancelButtonIssue();

    // Now all widgets have the size fixed, call FinishDialogSettings
    FinishDialogSettings();
}
Exemple #14
0
MRESULT EXPENTRY dlgprc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
   switch (msg) {
      case WM_INITDLG:
         initDlg(hwnd);
         break;
      case WM_WINDOWPOSCHANGED:
         if (((PSWP)mp1)->fl & SWP_SIZE)
            arrangeItems(hwnd, (PSWP)mp1);
      default:
         return WinDefDlgProc(hwnd, msg, mp1, mp2);
         break;
   } /* endswitch */
   return (MRESULT)FALSE;
}
DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES(
                                                        FOOTPRINT_EDIT_FRAME* aParent,
                                                        EDGE_MODULE * aItem ):
    DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( aParent )
{
    m_parent = aParent;
    m_item = aItem;
    m_brdSettings = m_parent->GetDesignSettings();
    m_module = m_parent->GetBoard()->m_Modules;
    initDlg();
    Layout();
    GetSizer()->SetSizeHints( this );
    Centre();
}
BOOL FileBox::dispatch( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
{
    switch( msg )
        {
        case WM_INITDIALOG:

            initDlg( hDlg );
            return TRUE;

        case WM_COMMAND:

            switch( wParam )
                {
                case IDD_FLIST:

                    if( flistCmd( hDlg, lParam ) == TRUE )
                        return TRUE;
                    break;

                case IDD_FNAME:

                    if( fnameCmd( hDlg, lParam ) == TRUE )
                        return TRUE;
                    break;

                case IDOK:

                    okCmd( hDlg );
                    return TRUE;

                case IDCANCEL:

                    cancelCmd( hDlg );
                    return TRUE;

                default:

                    break;
                }
        default:

            break;
        }

    return ModalDialog::dispatch( hDlg, msg, wParam, lParam );

}
DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* aParent,
                                            TEXTE_MODULE* aTextMod, wxDC* aDC ) :
    DialogEditModuleText_base( aParent )

{
    m_parent = aParent;
    m_dc     = aDC;
    m_module = NULL;
    m_currentText = aTextMod;

    if( m_currentText )
        m_module = (MODULE*) m_currentText->GetParent();

    initDlg( );

    m_buttonOK->SetDefault();
    GetSizer()->Fit( this );
    GetSizer()->SetSizeHints( this );

    Centre();
}