//AB/ Project Shell extentions //AB/ Object oIDE_Project is a Dialog_Project //AB/ Set ProjectName to "Shell extentions" //AB/ Set ProjectFileName to "Shell_extentions.DG" //AB/ Set GenerateFileName to "NONAME14" // Project Object Structure // oShell_Extentions is a dbModalPanel // oBox is a cContainer3d // Textbox1 is a Textbox // chkDat is a CheckBox // chkINT is a CheckBox // oBox2 is a Container3d // oChkNew is a CheckBox // oOK_bn is a Button // oAnnuller_bn is a Button // Register all objects Register_Object chkDat Register_Object chkINT Register_Object oAnnuller_bn Register_Object oBox Register_Object oBox2 Register_Object oChkNew Register_Object oOK_bn Register_Object oShell_Extentions Register_Object Textbox1 //AB-IgnoreStart Use dfdbmdpn.pkg Use Windows.pkg //AB-IgnoreEnd Cd_Popup_Object oShell_Extentions is a dbModalPanel //AB-StoreTopStart //AB-StoreTopEnd Set Label to "Shell extentions" Set Location to 26 79 Set Size to 144 217 //AB-DDOStart //AB-DDOEnd Object oBox is a Container3d Set Size to 61 202 Set Location to 4 5 Object Textbox1 is a Textbox Set Label to "Associate the following filetypes with AnyFlex." Set FontSize to 4 0 Set Location to 8 27 Set Size to 10 149 Set Justification_Mode to jMode_Left Set TypeFace to "MS Sans Serif" End_Object // Textbox1 Object chkDat is a CheckBox Set Label to ".DAT (DATAFLEX file)" Set Size to 10 101 Set Location to 23 49 //AB-StoreStart Set checked_state to True Procedure OnChange Boolean bChecked Forward Send OnChange Get checked_state to bChecked If (bChecked = False) Set checked_state of oChkNew to False Set enabled_state of oChkNew to bChecked End_Procedure //AB-StoreEnd End_Object // chkDat Object chkINT is a CheckBox Set Label to ".INT (Driverbased file)" Set Size to 10 109 Set Location to 41 49 //AB-StoreStart Set checked_state to True //Set enabled_state To False //Set visible_state To False //AB-StoreEnd End_Object // chkINT End_Object // oBox Object oBox2 is a Container3d Set Size to 34 202 Set Location to 66 5 Object oChkNew is a CheckBox Set Label to "Add to New context menu." Set Size to 10 101 Set Location to 9 15 //AB-StoreStart Set checked_state to True Procedure OnChange Boolean bChecked Get Checked_State to bChecked End_Procedure // OnChange //AB-StoreEnd End_Object // oChkNew //AB-StoreStart //AB-StoreEnd End_Object // oBox2 Object oOK_bn is a Button Set Label to "&Ok" Set Location to 107 100 //AB-StoreStart Procedure OnClick Integer iDat iInt String sCommand sVDFroot sFil sDir sPrg sDefaultIcon Boolean bNew Get checked_state of chkDat to iDat Get checked_state of chkInt to iInt Get checked_state of oChkNew to bNew Get GetApplicationFileName of oApplication to sPrg Move (C34 + sPrg + C34) to sCommand Append sCommand " " C34 "%1" C34 Move (ToAnsi(sCommand)) to sCommand Move (sPrg + ",0") to sDefaultIcon If iDat Begin Send WriteGlobalReg HKEY_CLASSES_ROOT ".DAT" "" "DATfile" Send WriteGlobalReg HKEY_CLASSES_ROOT "DATfile" "" "Database-file" Send WriteGlobalReg HKEY_CLASSES_ROOT "DATfile\Shell\open\command" "" sCommand Send WriteGlobalReg HKEY_CLASSES_ROOT "DATfile\DefaultIcon" "" sDefaultIcon End Else Begin Send DeleteGlobalReg HKEY_CLASSES_ROOT ".DAT" End If iInt Begin Send WriteGlobalReg HKEY_CLASSES_ROOT ".INT" "" "INTfile" Send WriteGlobalReg HKEY_CLASSES_ROOT "INTfile" "" "Driverbased Database-file" Send WriteGlobalReg HKEY_CLASSES_ROOT "INTfile\Shell\open\command" "" sCommand Send WriteGlobalReg HKEY_CLASSES_ROOT "INTfile\DefaultIcon" "" sDefaultIcon End Else Begin Send DeleteGlobalReg HKEY_CLASSES_ROOT ".INT" End If bNew Begin Send WriteGlobalReg HKEY_CLASSES_ROOT ".DAT\DATfile\ShellNew" "Command" (sCommand+" NEW") End Else Begin Send DeleteGlobalReg HKEY_CLASSES_ROOT ".DAT\DATfile\ShellNew" "Command" End Send Request_Cancel End_Procedure //AB-StoreEnd End_Object // oOK_bn Object oAnnuller_bn is a Button Set Label to "&Cancel" Set Location to 107 159 //AB-StoreStart Procedure OnClick Send Request_cancel End_Procedure //AB-StoreEnd End_Object // oAnnuller_bn //AB-StoreStart On_Key Key_Alt+Key_O Send KeyAction to oOk_bn On_Key Key_Alt+Key_C Send KeyAction to oAnnuller_bn //AB-StoreEnd Cd_End_Object // oShell_Extentions //AB/ End_Object // oIDE_Project