source: dev/trunk/ab5.0/abdev/abdev/src/MainFrame.cpp@ 489

Last change on this file since 489 was 489, checked in by dai_9181, 16 years ago

abdevをATL化するための下準備

File size: 1.4 KB
Line 
1#include "stdafx.h"
2
3using namespace ActiveBasic::IDE;
4using namespace ActiveBasic::IDE::WindowComponents;
5
6LRESULT CALLBACK WindowFunc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
7void SetupWindow(HWND hwnd);
8void ResetTextEditFont(HWND hwnd);
9
10::LRESULT MainFrame::OnCreate( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled )
11{
12 // ウィンドウエリアマネージャに親ウィンドウを登録
13 wam.SetParentWnd( m_hWnd );
14
15 RECT rect;
16 GetClientRect( &rect );
17
18 // MDIベースを作成
19 mdiWindow = new MdiWindow();
20 mdiWindow->Create(
21 m_hWnd,
22 rect,
23 NULL,
24 WS_CHILD
25 );
26 wam.AddMdiWindow( mdiWindow );
27
28
29
30
31
32 extern HWND hOwner;
33 hOwner = m_hWnd;
34 extern WNDPROC oldMainFrameWndProc;
35 oldMainFrameWndProc = (WNDPROC)::GetWindowLong( hOwner, GWL_WNDPROC );
36 ::SetWindowLong( hOwner, GWL_WNDPROC, (LONG)WindowFunc );
37
38 SetupWindow(hOwner);
39
40 //テキストエディタフォント設定
41 ResetTextEditFont(hOwner);
42
43
44
45 return 0;
46}
47
48void MainFrame::OnSize(UINT nType, CSize size)
49{
50 //mdiWindow->MoveWindow( 0, 0, size.cx, size.cy );
51}
52
53::LRESULT MainFrame::OnClose( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled )
54{
55 DestroyWindow();
56 return 0;
57}
58::LRESULT MainFrame::OnDestroy( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled )
59{
60 mdiWindow->DestroyWindow();
61 delete mdiWindow;
62
63 ::PostQuitMessage( 0 );
64
65 return 0;
66}
Note: See TracBrowser for help on using the repository browser.