96 lines
1.9 KiB
C++
96 lines
1.9 KiB
C++
// DLG_C_GG.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "smsmanager.h"
|
|
#include "DLG_C_GG.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_C_GG dialog
|
|
#include "MainFrm.h"
|
|
|
|
DLG_C_GG::DLG_C_GG(CWnd* pParent /*=NULL*/)
|
|
: CDialog(DLG_C_GG::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(DLG_C_GG)
|
|
//}}AFX_DATA_INIT
|
|
m_bInit = false;
|
|
}
|
|
|
|
|
|
void DLG_C_GG::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(DLG_C_GG)
|
|
DDX_Control(pDX, IDC_C_GG_S1, m_S_S1);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DLG_C_GG, CDialog)
|
|
//{{AFX_MSG_MAP(DLG_C_GG)
|
|
ON_WM_SIZE()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_C_GG message handlers
|
|
|
|
void DLG_C_GG::Close()
|
|
{
|
|
|
|
}
|
|
|
|
void DLG_C_GG::OnSize(UINT nType, int cx, int cy)
|
|
{
|
|
CDialog::OnSize(nType, cx, cy);
|
|
|
|
if ( m_bInit )
|
|
{
|
|
m_S_S1.MoveWindow( 2,2,cx-4,cy-4);
|
|
m_Html.MoveWindow( 5,18,cx-10,cy-23 );
|
|
}
|
|
}
|
|
BOOL DLG_C_GG::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
|
|
m_Html.CreateFromStatic(IDC_C_GG_HTML, this);
|
|
m_Html.ShowWindow(SW_HIDE);
|
|
|
|
m_bInit = true;
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void DLG_C_GG::SetHtmlData(ANS_GetGG3 *pGG)
|
|
{
|
|
if ( _tcslen(pGG->szText)>0 )
|
|
{
|
|
this->GetParent()->GetParentFrame();
|
|
m_pMainFrame = (CMainFrame *)this->GetParent()->GetParentFrame();
|
|
TCHAR szPath[512]={0};
|
|
m_pMainFrame->GetCurrentPath(szPath);
|
|
_tcscat(szPath, _T("GGHtml.htm") );
|
|
CFile file;
|
|
if ( !file.Open( szPath , CFile::modeReadWrite|CFile::modeCreate ) )
|
|
{
|
|
return ;
|
|
}
|
|
|
|
file.Write( pGG->szText , _tcslen(pGG->szText) );
|
|
file.Close();
|
|
|
|
m_Html.Navigate(szPath);
|
|
m_Html.ShowWindow(SW_SHOW);
|
|
}
|
|
}
|