/*******************************************************************************
  Function Name  : vUpdateWinStatus
  Input(s)       : -
  Output         : -
  Functionality  : This function will be called from main frame to update
                   window status information in the configuration module while
                   loading a configuration file and while closing the window
  Member of      : CMDIChildBase
  Author(s)      : Raja N
  Date Created   : 18.4.2005
  Modifications  : 
*******************************************************************************/
void CMDIChildBase::vUpdateWinStatus()
{
    if(::IsWindow(GetSafeHwnd()))
    {
        vGetWinStatus();
        SetWindowPlacement(&m_sWindowPlacement);
    }
}
/*******************************************************************************
 Function Name    : vUpdateWinStatus
 Input(s)         :
 Output           :
 Functionality    : This is a public member function defined . It is called
                    whenever a new configuration file is loaded or created.
 Member of        : CMessageInterpretation
 Friend of        :   -
 Author(s)        : Raja N
 Date Created     : 06.04.2004
 Modified by      :
 Modifications    : Raja N on 18.04.2005, Modified to refer new window placement
                  identity - CRH0030
*******************************************************************************/
void CMessageInterpretation::vUpdateWinStatus()
{
    if(::IsWindow(GetSafeHwnd()))
    {
        vGetWinStatus();
        SetWindowPlacement(&m_sWinCurrStatus);
    }
}
/******************************************************************************
 Function Name    : OnCreate
 Input(s)         : LPCREATESTRUCT
 Output           : int
 Functionality    : Called by the framework while a window is being created.
                    This will upadte the window placement information from
                    config module
 Member of        : CMessageInterpretation
 Friend of        : -
 Author(s)        : Raja N
 Date Created     : 05.04.2004
 Modifications    : Raja N on 18.04.2005, Modified to refer new window placement
                    identity - CRH0030
*******************************************************************************/
int CMessageInterpretation::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    int nCreateFlag = -1;
    if (CDialog::OnCreate(lpCreateStruct) != -1)
    {
        nCreateFlag = 0;
        vGetWinStatus();
    }
    return nCreateFlag;
}
/******************************************************************************
 Function Name  :   vCreateMsgIntrprtnDlg

 Description    :
 Input(s)       :   CWnd* pomParent: Pointer to parent window.
                    BOOL bShow : TRUE or FALSE
 Output         :   -
 Functionality  :   This function will be called from CMsgWnd to created the
                    dialog. If the parameter bShow is FALSE, the dialog will
                    be created but not shown.
 Member of      :   CMessageInterpretation

 Author(s)      :   Ratnadip Choudhury
 Date Created   :   16.02.2004
 Modifications  :   Raja N on 14.04.2004
                    Added vGetWinStatus function call to get the window position
                    from the configuration file.
 Modifications  : Raja N on 18.04.2005, Modified to refer new window placement
                  identity - CRH0030
******************************************************************************/
void CMessageInterpretation::vCreateMsgIntrprtnDlg(CWnd* pomParent, BOOL bShow)
{
    if (IsWindow(m_hWnd) == FALSE)
    {
        this->Create(IDD_DLG_INTERPRET_MSG, pomParent);
        m_hWndParent = pomParent->m_hWnd;
        vGetWinStatus();
        if (bShow)
        {
            this->ShowWindow(SW_SHOW);
        }
    }
}
/*******************************************************************************
  Function Name  : OnCreate
  Input(s)       : -
  Output         : -
  Functionality  : 
  Member of      : CMDIChildBase
  Author(s)      : Raja N
  Date Created   : 18.4.2005
  Modifications  : 
*******************************************************************************/
int CMDIChildBase::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
    int nCreate = -1;
    // Call base member for window creation
    if (CMDIChildWnd::OnCreate(lpCreateStruct) != -1)
    {
        // Get window status from configuration module
        vGetWinStatus();
        // Set the resule to success
        nCreate = 0;
    }
    // Return the result
    return nCreate;
}