windows programming graphic library

8
Windows programming Graphic Library SNPL

Upload: rhonda-garcia

Post on 30-Dec-2015

17 views

Category:

Documents


1 download

DESCRIPTION

Windows programming Graphic Library. SNPL. Application program. initialization. Kernel. Exchange Message. Basic Structure Windows Programming. 1.part of initialization 2.part of exchange message for communicate with kernel. SNPL. WinMain. WndProc. WinMain and WndProc. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Windows programming Graphic Library

Windows programming

Graphic Library

SNPL

Page 2: Windows programming Graphic Library

Basic Structure Windows Programming

SNPL

Applicationprogram

initialization

ExchangeMessage

1.part of initialization

2.part of exchange messagefor communicate with kernel

Kernel

Page 3: Windows programming Graphic Library

•Part of initialize kernel

SNPL

WinMain and WndProc

WndProc

WinMain

•Manage initial function and initial message

Page 4: Windows programming Graphic Library

Using Visual c++

SNPL

1.File New 2.Project

3.Win32 Application 4.Project name

5.a typical”Hello world”application

6.finish Ok

7.Fileview

8.source files

9.example.cpp

Page 5: Windows programming Graphic Library

SNPL

Compile and Run

1.F7 compile

2.Ctrl+F5 run

Page 6: Windows programming Graphic Library

Start Program

SNPL

Graphic Library Executive

transferwindow

INITIAL

MakeWindow

WinMain

Make windows and show screen in monitor

Initialize shape of graph

Be transmitted from message to WndPro

Page 7: Windows programming Graphic Library

SNPL

Header File

RECTANGLE

plot

ticxy

Hvlabel

draw

Draw rectangle

Draw tic

Draw label outside x , y axis of coordinates

The value of coordinates get and then mark with a point

Draw line between point and point

Page 8: Windows programming Graphic Library

1.WinMain

2.#include “graph.h”

3. INITIAL()

4.set variable 5.Set function in graph.h

6.F7 compile

7.ctrl+F5 run

Application program

SNPL

Using Graphic Library