#include <selmedia.h>
Inheritance diagram for SelMediaDlg:
Public Member Functions | |
SelMediaDlg () | |
MsgResult | Message (Msg *Message) |
void | Do (OpDescriptor *) |
This function should be over-ridden to perform an operation without passing a parameter. | |
void | DoWithParam (OpDescriptor *, OpParam *pParam) |
Creates then opens the dialog in response to a request from the user and allows values to be passed in and returned to the caller via the SelMediaDlgParam class. | |
BOOL | Create () |
The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares a preference that allows you to clear memory in delete(). | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Static Public Attributes | |
static const UINT32 | IDD = _R(IDD_SEL_MEDIA_APP_DIALOG) |
static const CDlgMode | Mode = MODAL |
Protected Member Functions | |
void | InitValues () |
Protected Attributes | |
SelMediaDlgParam * | m_pOptions |
Definition at line 145 of file selmedia.h.
|
Definition at line 148 of file selmedia.cpp. 00148 : DialogOp(SelMediaDlg::IDD, SelMediaDlg::Mode), m_pOptions( NULL ) 00149 { 00150 }
|
|
The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called.
Reimplemented from DialogOp. Definition at line 239 of file selmedia.cpp. 00240 { 00241 if (DialogOp::Create()) 00242 { 00243 return TRUE; 00244 } 00245 else 00246 return FALSE; 00247 }
|
|
This function should be over-ridden to perform an operation without passing a parameter.
Reimplemented from Operation. Definition at line 251 of file selmedia.cpp.
|
|
Creates then opens the dialog in response to a request from the user and allows values to be passed in and returned to the caller via the SelMediaDlgParam class.
Reimplemented from Operation. Definition at line 274 of file selmedia.cpp. 00275 { 00276 if (pParam == NULL) 00277 { 00278 ERROR3("SelMediaDlg::DoWithParam - NULL Args"); 00279 return; 00280 } 00281 00282 // Use the OpParam that has been passed in to us 00283 ERROR3IF( !pParam->IS_KIND_OF(SelMediaDlgParam), "pParam isn't" ); 00284 m_pOptions = (SelMediaDlgParam*) pParam; 00285 00286 // Force the dialog box to be created, as it is modal it will be opened via a message 00287 BOOL fOk = Create(); 00288 if( !fOk ) 00289 { 00290 // Could not create the dialog box so call inform error 00291 InformError(); 00292 End(); // End the operation 00293 } 00294 }
|
|
Definition at line 215 of file selmedia.cpp. 00216 { 00217 OpState OpSt; 00218 return(OpSt); 00219 }
|
|
Declares a preference that allows you to clear memory in delete().
Reimplemented from SimpleCCObject. Definition at line 223 of file selmedia.cpp. 00224 { 00225 return (RegisterOpDescriptor( 00226 0, 00227 _R(IDS_SELMEDIADLG), 00228 CC_RUNTIME_CLASS(SelMediaDlg), 00229 OPTOKEN_SELMEDIADLG, 00230 SelMediaDlg::GetState, 00231 0, /* help ID */ 00232 _R(IDBBL_SELMEDIADLG), 00233 0 /* bitmap ID */ 00234 )); 00235 }
|
|
Definition at line 154 of file selmedia.cpp. 00155 { 00156 bool fItemSel = false; 00157 00158 // Add possible replay apps 00159 SelMediaDlgParam::CMediaAppListIter end( m_pOptions->m_pAppList->end() ); 00160 SelMediaDlgParam::CMediaAppListIter iter( m_pOptions->m_pAppList->begin() ); 00161 for( INT32 ord = 0; iter != end; ++iter, ++ord ) 00162 { 00163 SetStringGadgetValue( _R(IDC_LIST1), String_256(iter->first), FALSE, ord ); 00164 00165 if( m_pOptions->m_strSel != _T("") ) 00166 { 00167 if( m_pOptions->m_strSel == iter->first ) 00168 { 00169 fItemSel = true; 00170 SetSelectedValueIndex( _R(IDC_LIST1), ord ); 00171 } 00172 } 00173 else 00174 if( iter->second ) 00175 { 00176 fItemSel = true; 00177 SetSelectedValueIndex( _R(IDC_LIST1), ord ); 00178 } 00179 } 00180 00181 if( !fItemSel ) 00182 SetSelectedValueIndex( _R(IDC_LIST1), 0 ); 00183 }
|
|
if (IS_OUR_DIALOG_MSG(Message)) { DialogMsg* Msg = (DialogMsg*)Message; Handle Msg here } Pass message on to base class for rest of handling. return <BaseClass>Message(Message); This Pure virtual function will ENSURE
Reimplemented from DialogOp. Definition at line 187 of file selmedia.cpp. 00188 { 00189 if (IS_OUR_DIALOG_MSG(Message)) 00190 { 00191 DialogMsg* Msg = (DialogMsg*)Message; 00192 // Handle ok button 00193 if ((Msg->DlgMsg == DIM_COMMIT) || (Msg->DlgMsg == DIM_CANCEL)) 00194 { 00195 m_pOptions->m_strSel = GetStringGadgetValue( _R(IDC_LIST1) ); 00196 TRACEUSER( "jlh92", _T("Return sel is %s\n"), PCTSTR(m_pOptions->m_strSel) ); 00197 00198 m_pOptions->m_fValid = ( DIM_COMMIT == Msg->DlgMsg ); 00199 00200 Close(); // Hide the dialog 00201 End(); 00202 } 00203 else 00204 if( DIM_SOFT_COMMIT == Msg->DlgMsg || 00205 DIM_CREATE == Msg->DlgMsg ) 00206 InitValues(); 00207 00208 return (DLG_EAT_IF_HUNGRY(Msg)); 00209 } 00210 return OK; 00211 }
|
|
Definition at line 165 of file selmedia.h. |
|
Definition at line 150 of file selmedia.h. |
|
Definition at line 166 of file selmedia.h. |