- SourceCode.zip
- BasicAdmin2
- BasicAdmin2.sln
- BasicAdmin2.suo
- BasicAdmin2
- BasicAdmin2_Config
- BasicAdmin2_Contacts
- BasicAdmin2_Database
- BasicAdmin2_GraphFinance
- BasicAdmin2_Model
- BasicAdmin2_Notes
- BasicAdmin2_Utils
- BasicAdmin2_Web
- Data
- BasicAdmin2.db
- Preferences.db
- Settings.db
- Librerias
- GraphParser
- Libs
- Debug
- Release
- LibsX64
- Debug
- Release
- SQLiteBase
- BasicAdmin2_Librerias
- Librerias
- CryptoLib
- GraphParser
- Librerias.sln
- Librerias.suo
- SQLiteBase
- UpgradeLog.XML
- UpgradeLog2.XML
- ReleaseX86.zip
- BasicAdmin.db
- BasicAdmin2.db
- BasicAdmin2.exe
- BasicAdmin2_Config.dll
- BasicAdmin2_Contacts.dll
- BasicAdmin2_Database.dll
- BasicAdmin2_GraphFinance.dll
- BasicAdmin2_Model.dll
- BasicAdmin2_Notes.dll
- BasicAdmin2_Utils.dll
- BasicAdmin2_Web.dll
- CryptoLib.dll
- GraphParser.dll
- Preferences.db
- Settings.db
- SQLiteBase.dll
|
// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
// (the "Fluent UI") and is provided only as referential material to supplement the
// Microsoft Foundation Classes Reference and related electronic documentation
// included with the MFC C++ library software.
// License terms to copy, use or distribute the Fluent UI are available separately.
// To learn more about our Fluent UI licensing program, please visit
// http://msdn.microsoft.com/officeui.
//
// Copyright (C) Microsoft Corporation
// All rights reserved.
// ChildFrm.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "BasicAdmin2.h"
#include "ChildFrm.h"
#include "Globals.h"
#include "MainFrm.h"
#include "../BasicAdmin2_Database/Managers/ManArrays.h"
#include "../BasicAdmin2_Database/Managers/ManCurrency.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CChildFrame
IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
ON_COMMAND(ID_FILE_CLOSE, &CChildFrame::OnFileClose)
ON_WM_SETFOCUS()
ON_WM_CREATE()
ON_WM_THEMECHANGED()
END_MESSAGE_MAP()
// CChildFrame construction/destruction
CChildFrame::CChildFrame()
{
// TODO: add member initialization code here
}
CChildFrame::~CChildFrame()
{
}
/*void CChildFrame::ActivateTopLevelFrame()
{
}*/
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs
if( !CMDIChildWndEx::PreCreateWindow(cs) )
return FALSE;
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
cs.lpszClass = AfxRegisterWndClass(0);
return TRUE;
}
// CChildFrame diagnostics
#ifdef _DEBUG
void CChildFrame::AssertValid() const
{
CMDIChildWndEx::AssertValid();
}
void CChildFrame::Dump(CDumpContext& dc) const
{
CMDIChildWndEx::Dump(dc);
}
#endif //_DEBUG
// CChildFrame message handlers
void CChildFrame::OnFileClose()
{
// To close the frame, just send a WM_CLOSE, which is the equivalent
// choosing close from the system menu.
SendMessage(WM_CLOSE);
}
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWndEx::OnCreate(lpCreateStruct) == -1)
return -1;
//SetFont(¶m.fuentes.font);
return 0;
}
void CChildFrame::OnSetFocus(CWnd* pOldWnd)
{
CMDIChildWndEx::OnSetFocus(pOldWnd);
if (handles.m_WndGrid == 0) return;
if (handles.m_WndGrid->IsWindowVisible())
{
if (handles.m_WndTreeView != 0)
handles.m_WndTreeView->SetFocus();
else
handles.m_WndGrid->SetFocus();
}
else
handles.m_WndDialog->SetFocus();
if (handles.m_WndGrid != 0)
{
CGenGridView* gv = (CGenGridView*)handles.m_WndGrid;
gv->RefreshStatusBar();
}
}
BOOL CChildFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
return CMDIChildWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
LRESULT CChildFrame::OnThemeChanged()
{
// This feature requires Windows XP or greater.
// The symbol _WIN32_WINNT must be >= 0x0501.
// TODO: Add your message handler code here and/or call default
param.settings.m_nAppLook = theApp.m_nAppLook;
return 1;
}
void CChildFrame::InitHandlesAndContext(CCreateContext& context)
{
handles.m_WndDialog = 0;
handles.m_WndDialogTreeSearch = 0;
handles.m_WndGrid = 0;
handles.m_WndTreeView = 0;
context.m_pCurrentDoc=NULL;
context.m_pNewDocTemplate=NULL;
context.m_pLastView=NULL;
context.m_pCurrentFrame=NULL;
}
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
InitHandlesAndContext(context);
return CMDIChildWndEx::OnCreateClient(lpcs, pContext);
}
void CChildFrame::CreateDialogs()
{
/*CString a;
a.Format(L"%d",tabtype);
AfxMessageBox(a);*/
int value = (int)handles.tabtype;
SetFinanceParams();
SetNotesParams();
SetContactsParams();
SetConfigParams();
switch(value)
{
case TabTypeEnum::TabTypeCurrencies: finman.OnCreateCurrencies(); break;
case TabTypeEnum::TabTypeAccounts: finman.OnCreateAccounts(); break;
case TabTypeEnum::TabTypeDailyInput: finman.OnCreateDailyInput(); break;
case TabTypeEnum::TabTypeStats: finman.OnCreateDailyStats(); break;
case TabTypeEnum::TabTypeValues: finman.OnCreateCurValues(); break;
case TabTypeEnum::TabTypeNoteGroup: notesman.OnCreateNoteGroups(); break;
case TabTypeEnum::TabTypeNotes: notesman.OnCreateNotes(); break;
case TabTypeEnum::TabTypeContactGroup: conman.OnCreateContactGroups(); break;
case TabTypeEnum::TabTypeContact: conman.OnCreateContacts(); break;
case TabTypeEnum::TabTypeFontColor: configman.OnCreateFontColors(); break;
}
}
void CChildFrame::SetFinanceParams()
{
finman.context = &context;
finman.frmchild = this;
finman.handles = &handles;
finman.param = ¶m;
}
void CChildFrame::SetNotesParams()
{
notesman.context = &context;
notesman.frmchild = this;
notesman.handles = &handles;
notesman.param = ¶m;
}
void CChildFrame::SetContactsParams()
{
conman.context = &context;
conman.frmchild = this;
conman.handles = &handles;
conman.param = ¶m;
}
void CChildFrame::SetConfigParams()
{
configman.context = &context;
configman.frmchild = this;
configman.handles = &handles;
configman.param = ¶m;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
System developer from Argentina.
Programmed in VB 5,6,.NET, C#, Java, PL-SQL, Transac-SQL, C, C++ and even some "calculator" language.
Love to build small, useful applications.
Usually building big and complicated apps based on solid, reliable components.
Hobbies: reading, photography, chess, paddle, running.