📄 wave_dlg.cpp
字号:
// Copyright (c) 1999 Stephen T. Welstead. All rights reserved.
// File wave_dlg.cpp Dialog for choosing wavelet type
#include "wave_dlg.h"
#include "dlgids.h"
#include "waverc.h"
twave_dialog *this_wave_dialog = 0;
BOOL CALLBACK _export twave_dialog_proc(HWND hdlg, UINT message,
WPARAM wParam, LPARAM lParam) {
return this_wave_dialog->handle_message(hdlg,message,wParam,
lParam);
}
twave_dialog::twave_dialog (HWND Parent,int init_value):
tdialog (Parent,"WAVELET_DLG","Wavelet Type") {
wavelet_choice = init_value;
for (int i=0;i<NO_OF_WAVELETS;i++)
wavelet_button[i] = 0;
wavelet_button[wavelet_choice] = 1;
}
BOOL twave_dialog::respond_wm_initdialog () {
switch (wavelet_choice) {
case 1:
SendDlgItemMessage (hdialog,DAUB4_BUTTON,BM_SETCHECK,1,0);
break;
case 2:
SendDlgItemMessage (hdialog,DAUB6_BUTTON,BM_SETCHECK,1,0);
break;
default:
SendDlgItemMessage (hdialog,HAAR_BUTTON,BM_SETCHECK,1,0);
} // end switch
return tdialog::respond_wm_initdialog();
}
BOOL twave_dialog::respond_wm_command (WPARAM wParam,LPARAM) {
int i;
switch (LOWORD(wParam)) {
case IDOK:
wavelet_button[0] = (int)SendDlgItemMessage(hdialog,
HAAR_BUTTON,BM_GETCHECK,0,0);
wavelet_button[1] = (int)SendDlgItemMessage(hdialog,
DAUB4_BUTTON,BM_GETCHECK,0,0);
wavelet_button[2] = (int)SendDlgItemMessage(hdialog,
DAUB6_BUTTON,BM_GETCHECK,0,0);
for (i=0;i<NO_OF_WAVELETS;i++)
if (wavelet_button[i]) {
wavelet_choice = i;
break;
}
dlg_return_value = 1;
EndDialog(hdialog, TRUE);
return 1;
case IDCANCEL:
dlg_return_value = 0;
EndDialog(hdialog,FALSE);
return 0;
} /* end switch */
return 0;
}
BOOL twave_dialog::exec_dialog () {
if (!check_gdlg_instance()) return 0;
twave_dialog *old_twave_dialog =
this_wave_dialog;
this_wave_dialog = this;
DialogBox(gdlg_instance,rc_title, hwndParent,
twave_dialog_proc);
this_wave_dialog = old_twave_dialog;
return dlg_return_value;
}
twave_dialog::~twave_dialog() {
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -