with os2 ; use os2 ;
with os2.jba; use os2.jba;
with os2.pmwd; use os2.pmwd ;
with os2.pmwb; use os2.pmwb ;
with os2.pmsc; use os2.pmsc ;
with System.Address_To_Access_Conversions;
with System.Storage_Elements;
package body STATICDP is
package To_PSWP is new  System.Address_To_Access_Conversions(SWP);
package To_PWIN is new  System.Address_To_Access_Conversions(WINDOW);
mp_1 :System.Storage_Elements.Integer_Address ;
mp_2 :System.Storage_Elements.Integer_Address ;
mp1l:Long ;
mp2l:Long ;
m_Result : Ulong := 0;
p_Swp    : PSWP ;
pWin     : PWINDOW ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGMainWndProc                                  Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
function  DLGMainWndProc (h_wnd:HWND;msg:ULONG;mp1:PMPARAM;mp2:PMPARAM)return PMENTRY is
begin null;
mp_1:= System.Storage_Elements.To_Integer(mp1) ;
mp_2:= System.Storage_Elements.To_Integer(mp2) ;
mp1l:= Long(SHORT1FROMMP(mp1));
mp2l:= Long(SHORT2FROMMP(mp1));
    if  msg = WM_GUIGETWINDOW then
        pWin := PWINDOW(To_PWIN.To_Pointer(mp2));  -- address WINDOW
        pWin.all :=  wDLGMain;
        return 0 ;
    end if ;
     -- Check if window fully loaded
     if    wDLGMain.h_wnd   = 0 then
         return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
     end if;
     case msg is
 -- Property processing *
         when  WM_GUIGETPROPERTY => Null ;
         when  WM_GUISETPROPERTY => Null ;
               -- break
 -- Window resized/repositioned *
         when  WM_WINDOWPOSCHANGED => Null ;
         p_Swp := PSWP(To_PSWP.To_Pointer(mp1));  -- address SWP struct in mp1
         if  (p_Swp.fl and SWP_SIZE)  > 0 then
             GuiBroadcastMsg (h_wnd, WM_GUIPARENTRESIZED,
             System.Null_Address,System.Null_Address );
         end if ;
               -- break
 -- User command processing *
         when  WM_COMMAND => Null ;
              case mp1l is
                  when  IDD_PSHTYPE => Null ;
                       DLGMainPSHTypeClick  ;
                        -- break
                  when  IDD_PSHALIGNMENT => Null ;
                       DLGMainPSHAlignmentClick  ;
                        -- break
                  when  IDD_PSHSTYLES => Null ;
                       DLGMainPSHStylesClick  ;
                        -- break
                  when  IDD_PSHPRES => Null ;
                       DLGMainPSHpresClick  ;
                        -- break
                  when others => Null;
                        -- break
              end case ;
              return  m_Result ;
 -- Window is being loaded *
         when  WM_GUIWINDOWLOADED => Null ;
              DLGMainCreate  ;
              return  0 ;
         when others => Null;
               -- break
     end case ;
     return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
End DLGMainWndProc ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGStyleWndProc                                 Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
function  DLGStyleWndProc (h_wnd:HWND;msg:ULONG;mp1:PMPARAM;mp2:PMPARAM)return PMENTRY is
begin null;
mp_1:= System.Storage_Elements.To_Integer(mp1) ;
mp_2:= System.Storage_Elements.To_Integer(mp2) ;
mp1l:= Long(SHORT1FROMMP(mp1));
mp2l:= Long(SHORT2FROMMP(mp1));
    if  msg = WM_GUIGETWINDOW then
        pWin := PWINDOW(To_PWIN.To_Pointer(mp2));  -- address WINDOW
        pWin.all :=  wDLGStyle;
        return 0 ;
    end if ;
     -- Check if window fully loaded
     if    wDLGStyle.h_wnd   = 0 then
         return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
     end if;
     case msg is
 -- Property processing *
         when  WM_GUIGETPROPERTY => Null ;
         when  WM_GUISETPROPERTY => Null ;
               -- break
 -- Window resized/repositioned *
         when  WM_WINDOWPOSCHANGED => Null ;
         p_Swp := PSWP(To_PSWP.To_Pointer(mp1));  -- address SWP struct in mp1
         if  (p_Swp.fl and SWP_SIZE)  > 0 then
             GuiBroadcastMsg (h_wnd, WM_GUIPARENTRESIZED,
             System.Null_Address,System.Null_Address );
         end if ;
               -- break
 -- User command processing *
         when  WM_COMMAND => Null ;
              case mp1l is
                  when  IDD_PSHVISIBLE => Null ;
                       DLGStylePSHVisibleClick  ;
                        -- break
                  when  IDD_PSHENABLE => Null ;
                       DLGStylePSHEnableClick  ;
                        -- break
                  when others => Null;
                        -- break
              end case ;
              return  m_Result ;
         when others => Null;
               -- break
     end case ;
     return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
End DLGStyleWndProc ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGAlignWndProc                                 Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
function  DLGAlignWndProc (h_wnd:HWND;msg:ULONG;mp1:PMPARAM;mp2:PMPARAM)return PMENTRY is
begin null;
mp_1:= System.Storage_Elements.To_Integer(mp1) ;
mp_2:= System.Storage_Elements.To_Integer(mp2) ;
mp1l:= Long(SHORT1FROMMP(mp1));
mp2l:= Long(SHORT2FROMMP(mp1));
    if  msg = WM_GUIGETWINDOW then
        pWin := PWINDOW(To_PWIN.To_Pointer(mp2));  -- address WINDOW
        pWin.all :=  wDLGAlign;
        return 0 ;
    end if ;
     -- Check if window fully loaded
     if    wDLGAlign.h_wnd   = 0 then
         return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
     end if;
     case msg is
 -- Property processing *
         when  WM_GUIGETPROPERTY => Null ;
         when  WM_GUISETPROPERTY => Null ;
               -- break
 -- Window resized/repositioned *
         when  WM_WINDOWPOSCHANGED => Null ;
         p_Swp := PSWP(To_PSWP.To_Pointer(mp1));  -- address SWP struct in mp1
         if  (p_Swp.fl and SWP_SIZE)  > 0 then
             GuiBroadcastMsg (h_wnd, WM_GUIPARENTRESIZED,
             System.Null_Address,System.Null_Address );
         end if ;
               -- break
 -- User command processing *
         when  WM_COMMAND => Null ;
              case mp1l is
                  when others => Null;
                        -- break
              end case ;
              return  m_Result ;
         when others => Null;
               -- break
     end case ;
     return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
End DLGAlignWndProc ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGTypeWndProc                                  Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
function  DLGTypeWndProc (h_wnd:HWND;msg:ULONG;mp1:PMPARAM;mp2:PMPARAM)return PMENTRY is
begin null;
mp_1:= System.Storage_Elements.To_Integer(mp1) ;
mp_2:= System.Storage_Elements.To_Integer(mp2) ;
mp1l:= Long(SHORT1FROMMP(mp1));
mp2l:= Long(SHORT2FROMMP(mp1));
    if  msg = WM_GUIGETWINDOW then
        pWin := PWINDOW(To_PWIN.To_Pointer(mp2));  -- address WINDOW
        pWin.all :=  wDLGType;
        return 0 ;
    end if ;
     -- Check if window fully loaded
     if    wDLGType.h_wnd   = 0 then
         return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
     end if;
     case msg is
 -- Property processing *
         when  WM_GUIGETPROPERTY => Null ;
         when  WM_GUISETPROPERTY => Null ;
               -- break
 -- Window resized/repositioned *
         when  WM_WINDOWPOSCHANGED => Null ;
         p_Swp := PSWP(To_PSWP.To_Pointer(mp1));  -- address SWP struct in mp1
         if  (p_Swp.fl and SWP_SIZE)  > 0 then
             GuiBroadcastMsg (h_wnd, WM_GUIPARENTRESIZED,
             System.Null_Address,System.Null_Address );
         end if ;
               -- break
 -- User command processing *
         when  WM_COMMAND => Null ;
              case mp1l is
                  when others => Null;
                        -- break
              end case ;
              return  m_Result ;
         when others => Null;
               -- break
     end case ;
     return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
End DLGTypeWndProc ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGPresWndProc                                  Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
function  DLGPresWndProc (h_wnd:HWND;msg:ULONG;mp1:PMPARAM;mp2:PMPARAM)return PMENTRY is
begin null;
mp_1:= System.Storage_Elements.To_Integer(mp1) ;
mp_2:= System.Storage_Elements.To_Integer(mp2) ;
mp1l:= Long(SHORT1FROMMP(mp1));
mp2l:= Long(SHORT2FROMMP(mp1));
    if  msg = WM_GUIGETWINDOW then
        pWin := PWINDOW(To_PWIN.To_Pointer(mp2));  -- address WINDOW
        pWin.all :=  wDLGPres;
        return 0 ;
    end if ;
     -- Check if window fully loaded
     if    wDLGPres.h_wnd   = 0 then
         return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
     end if;
     case msg is
 -- Property processing *
         when  WM_GUIGETPROPERTY => Null ;
         when  WM_GUISETPROPERTY => Null ;
               -- break
 -- Window resized/repositioned *
         when  WM_WINDOWPOSCHANGED => Null ;
         p_Swp := PSWP(To_PSWP.To_Pointer(mp1));  -- address SWP struct in mp1
         if  (p_Swp.fl and SWP_SIZE)  > 0 then
             GuiBroadcastMsg (h_wnd, WM_GUIPARENTRESIZED,
             System.Null_Address,System.Null_Address );
         end if ;
               -- break
 -- User command processing *
         when  WM_COMMAND => Null ;
              case mp1l is
                  when others => Null;
                        -- break
              end case ;
              return  m_Result ;
         when others => Null;
               -- break
     end case ;
     return  GuiDefFrameProc (WinDefDlgProc'address, h_wnd, msg, mp1, mp2) ;
End DLGPresWndProc ;

-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGMainPSHTypeClick                             Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGMainPSHTypeClick  is begin null; 
    GuiSetWindow (wDLGType'unchecked_access, IDD_DLGTYPE, WT_DIALOG, DLGTypeWndProc'address,0);
    if GuiInvokeWindow (wDLGType'unchecked_access, wDLGMain'unchecked_access)>0 then null; end if;
end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGMainPSHStylesClick                           Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGMainPSHStylesClick is begin null; 
    GuiSetWindow (wDLGStyle'unchecked_access, IDD_DLGSTYLE, WT_DIALOG, DLGStyleWndProc'address,0);
    if GuiInvokeWindow (wDLGStyle'unchecked_access, wDLGMain'unchecked_access)>0 then null; end if;

end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGMainPSHAlignmentClick                        Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGMainPSHAlignmentClick is begin null; 
    GuiSetWindow (wDLGAlign'unchecked_access, IDD_DLGALIGN, WT_DIALOG, DLGAlignWndProc'address,0);
    if GuiInvokeWindow (wDLGAlign'unchecked_access, wDLGMain'unchecked_access)>0 then null; end if;

end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGMainPSHpresClick                             Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGMainPSHpresClick is begin null; 
    GuiSetWindow (wDLGPres'unchecked_access, IDD_DLGPRES, WT_DIALOG, DLGPresWndProc'address, 0);
    if GuiInvokeWindow (wDLGPres'unchecked_access, wDLGMain'unchecked_access)>0 then null; end if;

end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί   DLGMainCreate                                      Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGMainCreate is begin null; 
end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGStylePSHVisibleClick                         Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGStylePSHVisibleClick is begin null; 
end ;
-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      DLGStylePSHEnableClick                          Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure DLGStylePSHEnableClick is begin null; 
end ;


-- ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
-- Ί      Statics                                         Ί
-- Ί                                                      Ί
-- ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
procedure Statics (WinOwner:PWINDOW) is
begin null;
--   GuiSetWindow (wDLGMain'unchecked_access, IDD_DLGMAIN, WT_DIALOG, DLGMainWndProc, 0);
--   GuiLoadWindow (wDLGMain'unchecked_access, WinOwner);
--   GuiProcessWindow (wDLGMain'unchecked_access);
--   GuiUnloadWindow (wDLGMain'unchecked_access);
End Statics ;
End STATICDP ;
