File: MainApp.cpp

package info (click to toggle)
vmg 3.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,528 kB
  • sloc: pascal: 5,160; cpp: 605; sh: 278; lex: 105; ansic: 68; makefile: 37
file content (40 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (7)
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
#include "stdafx.h"
#include "MainApp.h"
#include "MagnifierWindow.h"

MainApp::MainApp()
    : _magnifierWindow(NULL)
{
}

MainApp::~MainApp()
{
    if(_magnifierWindow)
    {
        _magnifierWindow->destroy();
        delete _magnifierWindow;
        _magnifierWindow = NULL;
    }
}

void MainApp::initialize()
{
    if(!_magnifierWindow)
    {
        _magnifierWindow = new MagnifierWindow();

        _magnifierWindow->create(
            NULL, // HINSTANCE
            100, 100,
            400, 300,
            L"Virtual Magnifying Glass - Dynamic Mode compatible - window",
            L"Virtual Magnifying Glass - Dynamic Mode compatible - window",
            WS_SYSMENU | WS_CAPTION
            );
    }
}

void MainApp::showMagnifier()
{
    _magnifierWindow->show(true);
}