-
Notifications
You must be signed in to change notification settings - Fork 0
/
Friend.cpp
66 lines (58 loc) · 1.6 KB
/
Friend.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "StdAfx.h"
#include "AfxWin.h"
#include "MidiGlassApp.h"
#include "Friend.h"
#include "MWColors.h"
extern CMidiWorksApp theApp;
//
/////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////
HBRUSH FriendCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
return CMWColors::OnCtlColor ( pDC, pWnd, nCtlColor );
}
//
/////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////
BOOL FriendEraseBkgnd(CWnd* pWnd, CDC* pDC)
{
return CMWColors::OnEraseBkgnd ( pDC, pWnd );
}
//
/////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////
BOOL FriendEraseBkgndScrollView(CScrollView *pWnd, CDC* pDC)
{
return CMWColors::OnEraseBkgnd ( pDC, pWnd );
}
//
/////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////
void FriendActivate ( BOOL bActivate, CView* pActivateView, CView* pDeactiveView, bool bForce )
{
if ( ! theApp.m_bSplitterWindow )
{
CMainFrame *mainFrame = dynamic_cast< CMainFrame * >( AfxGetMainWnd( ) );
if ( mainFrame == NULL )
{
return;
}
CView *pView;
pView = mainFrame->GetActiveView ( );
if ( bActivate )
{
if ( pActivateView->GetParentFrame ( ) != mainFrame )
{
pActivateView->GetParentFrame ( )->BringWindowToTop ( );
if ( pActivateView != pDeactiveView || bForce )
{
mainFrame->SetActiveView ( pActivateView, FALSE );
}
}
}
}
}