File: PROTOCOL\TProtocolTopographyDlg.cpp

    1 //******************************************************************************
    2 //Datei     : TProtocolTopographyDlg.cpp
    3 //Projekt   : XCTL
    4 //Subsystem : Protokollbuch
    5 //Autor     : Jens Klier <klier@informatik.hu-berlin.de>
    6 //            Institut fuer Informatik,
    7 //            Humboldt-Universitaet Berlin
    8 //Inhalt    : Implementation der Klasse TProtocolTopographyDlg
    9 //******************************************************************************
   10 //!neu klier Protokollbuch
   11 #include "internls\evrythng.h"
   12 #include "winresrc\rc_prtow.h" // Ressourcen-IDs
   13 #include <commdlg.h>
   14 #include <commctrl.h>
   15 
   16 #include "protocol\TProtocolLanguage.h"
   17 #include "protocol\TProtocol.h"
   18 #include "protocol\TProtocolTopography.h"
   19 #include "protocol\TProtocolDlg.h"
   20 #include "protocol\TProtocolTopographyDlg.h"
   21 #include "protocol\TProtocolManagePrintDlg.h"
   22 #include "protocol\TProtocolTopographyManagePrintDlg.h"
   23 
   24 //--||--\\--||--//--||--\\--||--//--||--\\--||--//--||--\\--||--//--||--\\--||--
   25 
   26 extern TProtocolLanguage *ProtocolLanguage;
   27 extern TProtocolTopography *ProtocolTopography;
   28 extern HINSTANCE hModuleInstance;
   29 
   30 TModelessDlg *ProtoPrintDlg= 0; //! neu Kullmann+Reinecker: TheModeless ersetzt durch ProtoPrintDlg; extern entfernt
   31 
   32 TProtocolTopographyDlg::TProtocolTopographyDlg(LPSTR Dlg, int idDlg) : TModalDlg(Dlg,hModuleInstance)
   33 {
   34         Protocol= ProtocolTopography;
   35         ProtocolCombobox.InitializeManageComboboxProtocolDlg(Protocol);
   36         CurrentDlg= idDlg;
   37 };
   38 
   39 
   40 void TProtocolTopographyDlg::ShowDialog( int id , int idShow)
   41 {
   42         int ButtonShow, TextShow;
   43 
   44         switch (idShow)
   45         {
   46                 case SHOW:
   47                         ButtonShow= HIDE;
   48                         TextShow= SHOW;
   49                         ShowDialog(CurrentDlg, HIDE);
   50                         CurrentDlg= id;
   51                         ProtocolTopography->SetCurrentDlg(id);
   52                         RefreshDlg(hwndDlg, CurrentDlg);
   53                         break;
   54 
   55                 case HIDE:
   56                         ButtonShow= SHOW;
   57                         TextShow= HIDE;
   58                         break;
   59 
   60                 default:
   61                         return;
   62         }
   63 
   64         switch (id)
   65         {
   66                 case KollimatorRoehreDlg:
   67                         if (idShow==SHOW) TabCtrl_SetCurSel(hTab, 0);
   68                         ShowDlgItem( id_GruppeKollimator, idShow );
   69                         ShowDlgItem( id_KMaterialText, idShow );
   70                         ShowDlgItem( id_KReflexText, idShow );
   71                         ShowDlgItem( id_KNrText, idShow );
   72                         ShowDlgItem( id_KKruemmungText, idShow );
   73                         ShowDlgItem( id_KMaterial, idShow );
   74                         ShowDlgItem( id_KReflex, idShow );
   75                         ShowDlgItem( id_KNr, idShow );
   76                         ShowDlgItem( id_KKruemmung, idShow );
   77                         ShowDlgItem( id_GruppeRoehre, idShow );
   78                         ShowDlgItem( id_RMaterialText, idShow );
   79                         ShowDlgItem( id_RStromText, idShow );
   80                         ShowDlgItem( id_RSpannungText, idShow );
   81                         ShowDlgItem( id_RMaterial, idShow );
   82                         ShowDlgItem( id_RStrom, idShow );
   83                         ShowDlgItem( id_RSpannung, idShow );
   84                         ShowDlgItem( id_RStrom , idShow );
   85                         ShowDlgItem( id_RImpMaxText, idShow );
   86                         ShowDlgItem( id_RImpMax, idShow );
   87                         ShowDlgItem( id_KKruemmungEinheit , idShow );
   88                         ShowDlgItem( id_RStromEinheit, idShow );
   89                         ShowDlgItem( id_RSpannungEinheit, idShow );
   90                         break;
   91 
   92                 case MessungFilmeDlg:
   93                         if (idShow==SHOW) TabCtrl_SetCurSel(hTab, 1);
   94                         ShowDlgItem( id_GruppeMessung, idShow );
   95                         ShowDlgItem( id_GruppeFilme, idShow );
   96                         ShowDlgItem( id_MImpMaxText, idShow );
   97                         ShowDlgItem( id_MImpMax, idShow );
   98                         ShowDlgItem( id_FAnzahlText, idShow );
   99                         ShowDlgItem( id_MSpannungText, idShow );
  100                         ShowDlgItem( id_MStromText, idShow );
  101                         ShowDlgItem( id_HWBText, idShow );
  102                         ShowDlgItem( id_PGroesseXText, idShow );
  103                         ShowDlgItem( id_PGroesseYText, idShow );
  104                         ShowDlgItem( id_FAnzahl, idShow );
  105                         ShowDlgItem( id_MSpannung, idShow );
  106                         ShowDlgItem( id_MStrom, idShow );
  107                         ShowDlgItem( id_PGroesseX, idShow );
  108                         ShowDlgItem( id_PGroesseY, idShow );
  109                         ShowDlgItem( id_HWB, idShow );
  110                         ShowDlgItem( id_FMaterialText, idShow );
  111                         ShowDlgItem( id_FAbstandText, idShow );
  112                         ShowDlgItem( id_FMaterial, idShow );
  113                         ShowDlgItem( id_FAbstand, idShow );
  114                         ShowDlgItem( id_FAbstandEinheit, idShow );
  115                         ShowDlgItem( id_MStromEinheit, idShow );
  116                         ShowDlgItem( id_MSpannungEinheit, idShow );
  117                         ShowDlgItem( id_PGroesseEinheit, idShow );
  118                         break;
  119 
  120                 case BeginnMessungDlg:
  121                         if (idShow==SHOW) TabCtrl_SetCurSel(hTab, 2);
  122                         ShowDlgItem( id_GruppeBeginnMessung, idShow );
  123                         ShowDlgItem( id_STEText, idShow );
  124                         ShowDlgItem( id_STE, idShow );
  125                         ShowDlgItem( id_CRTText, idShow );
  126                         ShowDlgItem( id_CRT, idShow );
  127                         ShowDlgItem( id_INCDFText, idShow );
  128                         ShowDlgItem( id_INCDF, idShow );
  129                         ShowDlgItem( id_NBEXPOSText, idShow );
  130                         ShowDlgItem( id_NBEXPOS, idShow );
  131                         ShowDlgItem( id_ABEText, idShow );
  132                         ShowDlgItem( id_ABE, idShow );
  133                         ShowDlgItem( id_RSAText, idShow );
  134                         ShowDlgItem( id_RSA, idShow );
  135                         ShowDlgItem( id_CONLIMITText, idShow );
  136                         ShowDlgItem( id_CONLIMIT, idShow );
  137                         ShowDlgItem( id_CONPOINTText, idShow );
  138                         ShowDlgItem( id_CONPOINT, idShow );
  139                         ShowDlgItem( id_EXPTText, idShow );
  140                         ShowDlgItem( id_EXPT, idShow );
  141                         ShowDlgItem( id_STEEinheit, idShow );
  142                         ShowDlgItem( id_CRTEinheit, idShow );
  143                         ShowDlgItem( id_ABEEinheit, idShow );
  144                         ShowDlgItem( id_CONLIMITEinheit, idShow );
  145                         ShowDlgItem( id_CONPOINTEinheit, idShow );
  146                         ShowDlgItem( id_EXPTEinheit, idShow );
  147                         ShowDlgItem( id_RSAEinheit, idShow );
  148                         ShowDlgItem( id_INCDFEinheit, idShow );
  149                         break;
  150 
  151                 case EndeMessungDlg:
  152                         if (idShow==SHOW) TabCtrl_SetCurSel(hTab, 3);
  153                         ShowDlgItem( id_GruppeEndeMessung, idShow );
  154                         ShowDlgItem( id_GruppeRegelung, idShow );
  155                         ShowDlgItem( id_ImpsvorText, idShow );
  156                         ShowDlgItem( id_Impsvor, idShow );
  157                         ShowDlgItem( id_ImpsnachText, idShow );
  158                         ShowDlgItem( id_Impsnach, idShow );
  159                         ShowDlgItem( id_DFvorText, idShow );
  160                         ShowDlgItem( id_DFvor, idShow );
  161                         ShowDlgItem( id_DFnachText, idShow );
  162                         ShowDlgItem( id_DFnach, idShow );
  163                         ShowDlgItem( id_BemerkungText, idShow );
  164                         ShowDlgItem( id_Bemerkung, idShow );
  165                         break;
  166         }
  167 };
  168 
  169 void TProtocolTopographyDlg::InitializeDlgItems(HWND hwnd)
  170 {
  171         hLfdNr= GetDlgItem( hwndDlg, id_LfdNr );
  172         hLfdNrBereich= GetDlgItem( hwndDlg, id_LfdNrBereich );
  173         hRTKNr= GetDlgItem( hwndDlg, id_RTKNr );
  174 
  175         ProtocolCombobox.InitializeCombobox(hwnd, hNutzerList, id_Nutzer, Nutzer, "Nutzer");
  176         ProtocolCombobox.InitializeCombobox(hwnd, hMaterialList, id_Material, Material, "Material");
  177         ProtocolCombobox.InitializeCombobox(hwnd, hLieferantList, id_Lieferant, Lieferant, "Lieferant");
  178         ProtocolCombobox.InitializeCombobox(hwnd, hKMaterialList, id_KMaterial, KMaterial, "KMaterial");
  179         ProtocolCombobox.InitializeCombobox(hwnd, hRMaterialList, id_RMaterial, RMaterial, "RMaterial");
  180 };
  181 
  182 void TProtocolTopographyDlg::SaveDlgItems(HWND hwnd)
  183 {
  184         char buf[MaxString];
  185 
  186         GetDlgItemText(hwndDlg, id_LfdNrBereich, buf, MaxString);
  187         WritePrivateProfileString(Protocol->GetProtocolSection(), "LfdNrBereich", buf, GetCFile());
  188         GetDlgItemText(hwndDlg, id_RTKNr, buf, MaxString);
  189         WritePrivateProfileString(Protocol->GetProtocolSection(), "RTKNr", buf, GetCFile());
  190 
  191         ProtocolCombobox.SaveCombobox(hwnd, id_Nutzer, "Nutzer");
  192         ProtocolCombobox.SaveCombobox(hwnd, id_Lieferant, "Lieferant");
  193         ProtocolCombobox.SaveCombobox(hwnd, id_Material, "Material");
  194         ProtocolCombobox.SaveCombobox(hwnd, id_KMaterial, "KMaterial");
  195         ProtocolCombobox.SaveCombobox(hwnd, id_RMaterial, "RMaterial");
  196 };
  197 
  198 LPSTR TProtocolTopographyDlg::GetDlgItemText_LfdNr(HWND hwnd, LPSTR lLfdNr)
  199 {
  200         char buf[MaxString], buf2[MaxString], buf3[MaxString];
  201 
  202         GetDlgItemText(hwnd, id_LfdNrBereich, buf, MaxString);
  203         GetDlgItemText(hwnd, id_LfdNr, buf2, MaxString);
  204         GetDlgItemText(hwnd, id_RTKNr, buf3, MaxString);
  205         sprintf(lLfdNr, "%s%s%s", buf, buf2, buf3);
  206         return lLfdNr;
  207 };
  208 
  209 BOOL TProtocolTopographyDlg::TestDlgItemText_LfdNr(HWND hwnd, LPSTR lLfdNr)
  210 {
  211         char buf[MaxLfdNr], buf2[MaxLfdNr], buf3[MaxLfdNr];
  212 
  213         strcpy(lLfdNr, "");
  214         GetDlgItemText(hwnd, id_LfdNrBereich, buf, MaxLfdNr);
  215         GetDlgItemText(hwnd, id_LfdNr, buf2, MaxLfdNr);
  216         GetDlgItemText(hwnd, id_RTKNr, buf3, MaxLfdNr);
  217         if (ProtocolTopography->TestLfdNr(buf, buf2, buf3))
  218         {
  219                 sprintf(lLfdNr, "%s%s%s", buf, buf2, buf3);
  220                 return TRUE;
  221         }
  222         return FALSE;
  223 };
  224 
  225 void TProtocolTopographyDlg::EnableDlgItem_LfdNr(BOOL Status)
  226 {
  227         EnableDlgItem(id_LfdNrBereich, Status);
  228         EnableDlgItem(id_LfdNr, Status);
  229         EnableDlgItem(id_RTKNr, Status);
  230 };
  231 
  232 BOOL TProtocolTopographyDlg::IsDlgItemModify(void)
  233 {
  234         BOOL bEdit;
  235 
  236         bEdit= (Edit_GetModify(hLfdNrBereich) || Edit_GetModify(hLfdNr) || Edit_GetModify(hRTKNr));
  237         if (bEdit)
  238         {
  239                 Edit_SetModify(hLfdNrBereich, 0);
  240                 Edit_SetModify(hLfdNr, 0);
  241                 Edit_SetModify(hRTKNr, 0);
  242         }
  243         return bEdit;
  244 };
  245 
  246 void TProtocolTopographyDlg::SetDlgItemText_LfdNr(HWND hwnd)
  247 {
  248         char buf[MaxString];
  249 
  250         Edit_LimitText(hLfdNrBereich, 1);
  251         Edit_LimitText(hLfdNr, 5);
  252         Edit_LimitText(hRTKNr, 2);
  253         SetDlgItemText(hwnd, id_LfdNrBereich, ProtocolTopography->GetLfdNrBereich(buf));
  254         SetDlgItemText(hwnd, id_LfdNr, ProtocolTopography->GetLfdNrNummer(buf));
  255         SetDlgItemText(hwnd, id_RTKNr, ProtocolTopography->GetRTKNr(buf));
  256 };
  257 
  258 BOOL TProtocolTopographyDlg::Dlg_OnInit(HWND hwnd, HWND hwndCtl, LPARAM lParam)
  259 {
  260     TCITEM titem;
  261         char buf[MaxString];
  262         int iTab=0;
  263         
  264         TProtocolDlg::Dlg_OnInit(hwnd, hwndCtl, lParam);
  265 
  266         titem.mask= TCIF_TEXT;
  267         titem.pszText= buf;
  268     titem.cchTextMax= MaxString;
  269         titem.iImage= -1;
  270 
  271     strcpy(buf,"Kollimator/Röhre");
  272         TabCtrl_InsertItem(hTab, iTab++, &titem);
  273 
  274     strcpy(buf,"Messung/Filme");
  275         TabCtrl_InsertItem(hTab, iTab++, &titem);
  276 
  277     strcpy(buf,"Beginn Messung");
  278         TabCtrl_InsertItem(hTab, iTab++, &titem);
  279 
  280     strcpy(buf,"Ende Messung");
  281         TabCtrl_InsertItem(hTab, iTab++, &titem);
  282 
  283         ProtocolLanguage->SetTopographyDlgLanguage(hwnd);
  284 
  285         return TRUE;
  286 };
  287 
  288 void TProtocolTopographyDlg::Dlg_OnDestroy( HWND hwnd )
  289 {
  290         TProtocolDlg::Dlg_OnDestroy(hwnd);
  291 };
  292 
  293 
  294 BOOL TProtocolTopographyDlg::Dlg_OnSysCommand(HWND hwnd, int id, LPARAM lParam)
  295 {
  296         RECT Rect;
  297 
  298         switch ( id )
  299         {
  300                 case cm_ProtcolDeutsch:
  301                 case cm_ProtcolEnglisch:
  302                         ProtocolLanguage->SetTopographyDlgLanguage(hwnd, id);
  303                         if ( ProtoPrintDlg )
  304                         {
  305                                 _FREEOBJ(ProtoPrintDlg);
  306                                 GetClientRect( GetDlgItem(hwndDlg, id_Skizze), &Rect );
  307                                 ProtoPrintDlg= new TProtocolTopographyManagePrintDlg( "ProtocolTopographyManagePrintDlg", this, Rect.right, Rect.bottom, &ProtoPrintDlg );
  308                                 if ( ProtoPrintDlg )
  309                                         ProtoPrintDlg->Initialize( hModuleInstance, GetFrameHandle() );
  310                                 SetActiveWindow(hwnd);
  311                         }
  312                         return TRUE;
  313                 
  314                 default:
  315                         return FALSE;
  316         }
  317 };
  318 
  319 void TProtocolTopographyDlg::Dlg_OnNotify(HWND hwnd, int message, UINT id, UINT wParam)
  320 {
  321     int iTab;
  322         
  323     if ( message!=WM_NOTIFY || id!=id_Tab ) return;
  324         iTab=TabCtrl_GetCurFocus(hTab)+2;
  325         if (CurrentDlg!=iTab)
  326                 switch ( iTab )
  327                 {
  328                         case KollimatorRoehreDlg:
  329                             SaveDlg( hwnd, CurrentDlg);
  330                             ShowDialog( KollimatorRoehreDlg, SHOW );
  331                             SetDlgItemText(hwnd, id_StatusLine, "Parameter Kollimator/Röhre");
  332                                 break;
  333 
  334                         case MessungFilmeDlg:
  335                             SaveDlg( hwnd, CurrentDlg);
  336                             ShowDialog( MessungFilmeDlg, SHOW );
  337                             SetDlgItemText(hwnd, id_StatusLine, "Parameter Messung/Filme");
  338                                 break;
  339 
  340                         case BeginnMessungDlg:
  341                             SaveDlg( hwnd, CurrentDlg);
  342                             ShowDialog( BeginnMessungDlg, SHOW );
  343                             SetDlgItemText(hwnd, id_StatusLine, "Parameter Beginn Messung");
  344                                 break;
  345 
  346                         case EndeMessungDlg:
  347                             SaveDlg( hwnd, CurrentDlg);
  348                             ShowDialog( EndeMessungDlg, SHOW );
  349                             SetDlgItemText(hwnd, id_StatusLine, "Parameter Ende Messung");
  350                                 break;
  351                 }
  352 };
  353 
  354 void TProtocolTopographyDlg::Dlg_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
  355 {
  356         RECT Rect;
  357 
  358         if (TProtocolDlg::Dlg_OnCommand(hwnd, id, codeNotify))
  359                 return;
  360 
  361         switch ( id )
  362         {
  363                 case IDPRINT:
  364                         if ( TestChangeDlg() )
  365                                 break;
  366                         if ( !ProtoPrintDlg )
  367                         {
  368                                 GetClientRect( GetDlgItem(hwndDlg, id_Skizze), &Rect );
  369                                 ProtoPrintDlg= new TProtocolTopographyManagePrintDlg( "ProtocolTopographyManagePrintDlg", this, Rect.right, Rect.bottom, &ProtoPrintDlg );
  370                                 if ( ProtoPrintDlg )
  371                                         ProtoPrintDlg->Initialize( hModuleInstance, GetFrameHandle() );
  372                         }
  373                         break;
  374 
  375                 default:
  376                         TModalDlg::Dlg_OnCommand(hwnd, id, hwndCtl, codeNotify);
  377         }
  378 };
  379 
  380 BOOL TProtocolTopographyDlg::TestPflichtDlg(HWND hwnd)
  381 {
  382         if ( !ManageDlgItem(hwnd, id_Datum, Datum, DefaultTest) )
  383                 return FALSE;
  384         if ( !ManageDlgItem(hwnd, id_ProbenNr, ProbenNr, DefaultTest) )
  385                 return FALSE;
  386         if ( !ManageDlgItem(hwnd, id_Lieferant, Lieferant, DefaultTest) )
  387                 return FALSE;
  388         if ( !ManageDlgItem(hwnd, id_Material, Material, DefaultTest) )
  389                 return FALSE;
  390         if ( !ManageDlgItem(hwnd, id_Reflex, Reflex, DefaultTest) )
  391                 return FALSE;
  392         if ( !ManageDlgItem(hwnd, id_Einfallswinkel, Einfallswinkel, DefaultTest) )
  393                 return FALSE;
  394         return TRUE;
  395 };
  396 
  397 BOOL TProtocolTopographyDlg::ManageDlg(HWND hwnd, int id, TAction Action)
  398 {
  399         switch (id)
  400         {
  401                 case ProbeSkizzeDlg:
  402                         if ( !ManageDlgItem(hwnd, id_Datum, Datum, Action) )
  403                                 return FALSE;
  404                         if ( !ManageDlgItem(hwnd, id_Nutzer, Nutzer, Action) )
  405                                 return FALSE;
  406                         if ( !ManageDlgItem(hwnd, id_ProbenNr, ProbenNr, Action) )
  407                                 return FALSE;
  408                         if ( !ManageDlgItem(hwnd, id_Lieferant, Lieferant, Action) )
  409                                 return FALSE;
  410                         if ( !ManageDlgItem(hwnd, id_Merkmal, Merkmal, Action) )
  411                                 return FALSE;
  412                         if ( !ManageDlgItem(hwnd, id_Material, Material, Action) )
  413                                 return FALSE;
  414                         if ( !ManageDlgItem(hwnd, id_Winkel, Winkel, Action) )
  415                                 return FALSE;
  416                         if ( !ManageDlgItem(hwnd, id_GroesseX, GroesseX, Action) )
  417                                 return FALSE;
  418                         if ( !ManageDlgItem(hwnd, id_GroesseY, GroesseY, Action) )
  419                                 return FALSE;
  420                         if ( !ManageDlgItem(hwnd, id_Reflex, Reflex, Action) )
  421                                 return FALSE;
  422                         if ( !ManageDlgItem(hwnd, id_Einfallswinkel, Einfallswinkel, Action) )
  423                                 return FALSE;
  424                         if ( !ManageDlgItem(hwnd, id_Beugungswinkel, Beugungswinkel, Action) )
  425                                 return FALSE;
  426                         break;
  427 
  428                 case KollimatorRoehreDlg:
  429                         if ( !ManageDlgItem(hwnd, id_KMaterial, KMaterial, Action) )
  430                                 return FALSE;
  431                         if ( !ManageDlgItem(hwnd, id_KReflex, KReflex, Action) )
  432                                 return FALSE;
  433                         if ( !ManageDlgItem(hwnd, id_KNr, KNr, Action) )
  434                                 return FALSE;
  435                         if ( !ManageDlgItem(hwnd, id_KKruemmung, KKruemmung, Action) )
  436                                 return FALSE;
  437                         if ( !ManageDlgItem(hwnd, id_RMaterial, RMaterial, Action) )
  438                                 return FALSE;
  439                         if ( !ManageDlgItem(hwnd, id_RStrom, RStrom, Action) )
  440                                 return FALSE;
  441                         if ( !ManageDlgItem(hwnd, id_RSpannung, RSpannung, Action) )
  442                                 return FALSE;
  443                         if ( !ManageDlgItem(hwnd, id_RImpMax, ImpMax, Action) )
  444                                 return FALSE;
  445                         break;
  446 
  447                 case MessungFilmeDlg:
  448                         if ( !ManageDlgItem(hwnd, id_MImpMax, MImpMax, Action) )
  449                                 return FALSE;
  450                         if ( !ManageDlgItem(hwnd, id_MStrom, MStrom, Action) )
  451                                 return FALSE;
  452                         if ( !ManageDlgItem(hwnd, id_MSpannung, MSpannung, Action) )
  453                                 return FALSE;
  454                         if ( !ManageDlgItem(hwnd, id_HWB, HWB, Action) )
  455                                 return FALSE;
  456                         if ( !ManageDlgItem(hwnd, id_FAnzahl, FAnzahl, Action) )
  457                                 return FALSE;
  458                         if ( !ManageDlgItem(hwnd, id_FMaterial, FMaterial, Action) )
  459                                 return FALSE;
  460                         if ( !ManageDlgItem(hwnd, id_PGroesseX, PGroesseX, Action) )
  461                                 return FALSE;
  462                         if ( !ManageDlgItem(hwnd, id_PGroesseY, PGroesseY, Action) )
  463                                 return FALSE;
  464                         if ( !ManageDlgItem(hwnd, id_FAbstand, FAbstand, Action) )
  465                                 return FALSE;
  466                         break;
  467 
  468                 case BeginnMessungDlg:
  469                         if ( !ManageDlgItem(hwnd, id_STE, STE, Action) )
  470                                 return FALSE;
  471                         if ( !ManageDlgItem(hwnd, id_CRT, CRT, Action) )
  472                                 return FALSE;
  473                         if ( !ManageDlgItem(hwnd, id_INCDF, INCDF, Action) )
  474                                 return FALSE;
  475                         if ( !ManageDlgItem(hwnd, id_NBEXPOS, NBEXPOS, Action) )
  476                                 return FALSE;
  477                         if ( !ManageDlgItem(hwnd, id_ABE, ABE, Action) )
  478                                 return FALSE;
  479                         if ( !ManageDlgItem(hwnd, id_RSA, RSA, Action) )
  480                                 return FALSE;
  481                         if ( !ManageDlgItem(hwnd, id_CONLIMIT, CONLIMIT, Action) )
  482                                 return FALSE;
  483                         if ( !ManageDlgItem(hwnd, id_CONPOINT, CONPOINT, Action) )
  484                                 return FALSE;
  485                         if ( !ManageDlgItem(hwnd, id_EXPT, EXPT, Action) )
  486                                 return FALSE;
  487                         break;
  488 
  489                 case EndeMessungDlg:
  490                         if ( !ManageDlgItem(hwnd, id_Impsvor, Impsvor, Action) )
  491                                 return FALSE;
  492                         if ( !ManageDlgItem(hwnd, id_Impsnach, Impsnach, Action) )
  493                                 return FALSE;
  494                         if ( !ManageDlgItem(hwnd, id_DFvor, DFvor, Action) )
  495                                 return FALSE;
  496                         if ( !ManageDlgItem(hwnd, id_DFnach, DFnach, Action) )
  497                                 return FALSE;
  498                         if ( !ManageDlgItem(hwnd, id_Bemerkung, Bemerkung, Action) )
  499                                 return FALSE;
  500                         break;
  501         }
  502         SetFocus(GetDlgItem(hwnd, IDOK));
  503         return TRUE;
  504 };
  505 
  506 int TProtocolTopographyDlg::GetDlg(int id)
  507 {
  508         switch (id)
  509         {
  510                 case id_Datum:
  511                 case id_Nutzer:
  512                 case id_ProbenNr:
  513                 case id_Lieferant:
  514                 case id_Merkmal:
  515                 case id_Material:
  516                 case id_Winkel:
  517                 case id_GroesseX:
  518                 case id_GroesseY:
  519                 case id_Reflex:
  520                 case id_Einfallswinkel:
  521                 case id_Beugungswinkel:
  522                         return ProbeSkizzeDlg;
  523 
  524                 case id_KMaterial:
  525                 case id_KReflex:
  526                 case id_KNr:
  527                 case id_KKruemmung:
  528                 case id_RMaterial:
  529                 case id_RStrom:
  530                 case id_RSpannung:
  531                 case id_RImpMax:
  532                         return KollimatorRoehreDlg;
  533 
  534                 case id_MImpMax:
  535                 case id_MStrom:
  536                 case id_MSpannung:
  537                 case id_HWB:
  538                 case id_FAnzahl:
  539                 case id_FMaterial:
  540                 case id_PGroesseX:
  541                 case id_PGroesseY:
  542                 case id_FAbstand:
  543                         return MessungFilmeDlg;
  544 
  545                 case id_STE:
  546                 case id_CRT:
  547                 case id_INCDF:
  548                 case id_NBEXPOS:
  549                 case id_ABE:
  550                 case id_RSA:
  551                 case id_CONLIMIT:
  552                 case id_CONPOINT:
  553                 case id_EXPT:
  554                         return BeginnMessungDlg;
  555 
  556                 case id_Impsvor:
  557                 case id_Impsnach:
  558                 case id_DFvor:
  559                 case id_DFnach:
  560                 case id_Bemerkung:
  561                         return EndeMessungDlg;
  562         }
  563         return -1;
  564 };
  565 
  566 int TProtocolTopographyDlg::GetStatusId( void )
  567 {
  568         return Status;
  569 };
  570 
  571 int TProtocolTopographyDlg::GetDatumId( void )
  572 {
  573         return Datum;
  574 };
  575 
  576 BOOL TProtocolTopographyDlg::CanClose(void)
  577 {
  578         return TRUE;
  579 };
  580 
  581 void TProtocolTopographyDlg::Dlg_OnRButtonDown(HWND hwnd, UINT codeNotify1, int x, int y, UINT codeNotify2)
  582 {
  583         TProtocolDlg::Dlg_OnRButtonDown(hwnd, codeNotify1, x, y, codeNotify2);
  584 };
  585 
  586 void TProtocolTopographyDlg::Dlg_OnLButtonDown(HWND hwnd, UINT codeNotify1, int x, int y, UINT codeNotify2)
  587 {
  588         TProtocolDlg::Dlg_OnLButtonDown(hwnd, codeNotify1, x, y, codeNotify2);
  589 };
  590 
  591 void TProtocolTopographyDlg::Dlg_OnLButtonUp(HWND hwnd, int x, int y, UINT codeNotify)
  592 {
  593         TProtocolDlg::Dlg_OnLButtonUp(hwnd, x, y, codeNotify);
  594 };
  595 
  596 void TProtocolTopographyDlg::Dlg_OnMouseMove(HWND hwnd, int x, int y, UINT codeNotify)
  597 {
  598         TProtocolDlg::Dlg_OnMouseMove(hwnd, x, y, codeNotify);
  599 };
  600 
  601 
  602 // LastLine
  603 
  604 
  605