Microsoft Windows Mobile Microsoft Windows Mobile Dae-Ki Kang
Microsoft Windows Mobile
Microsoft Windows Mobile
Dae-Ki Kang
차례
•소개
•설치
•Hello, Smartphone! etc. in MFC of C++
•Hello, Smartphone! etc. in MFC of C++
•배포(Deployment) (프로그램을스마트디바이스
에업로드하는것)
•GUI Programming in C#
소개
•SmartPhone?
•http://en.wikipedia.org/wiki/Smartphone
▫일반모바일폰이상의, PC와비슷한고급기능을
▫일반모바일폰이상의, PC와비슷한고급기능을
제공하는모바일폰
•Windows Mobile
•http://en.wikipedia.org/wiki/Windows_Mobile
▫마이크로소프트Win32 API에
근거한모바일디바
이스를위한기본어플리케이션들의세트로구성된
컴팩트한운영체제
새로운컴퓨팅환경
완벽한기업환경으로의통합
ASP.NET
Mobile
Control
Media Playe
r on Pocket PC/
Smartphone
SQL Server
CE
SQL Server
Notification
Services
Exc
hange
Active
Syn
c
Outlook
Mobile
Access
Outlook
Web
Access
•다기능디지털디바이스
•네트워크서비스로의확장
새로운디바이스들
이동성의장점
•경량분산컴퓨팅환경
▫모바일클라이언트로쉽게확장
•네트워크경계안에서의사용
▫방화벽을통해외부시스템사용
XML Web Service
XML Web Service
▫방화벽을통해외부시스템사용
•표준에대한광범위한서포트
▫간결하지만다양한모바일환경
•공통의기본구조
▫IT 산업계에기존의시스템(Legacy system)들활용
•웹서비스기반프로그래밍
•다양한언어들
.NET
.NET 기반기반개발의
개발의장점장점
•최적의도구들
•호환성을위한표준
•운영체제와의통합
•다양한산업응용에적용
.NET 프레임워크(Framework)
Win
For
mA
SP.
NE
T
Bas
e C
lass
es
Dat
a &
XM
L
Com
mon
Lan
guag
e R
untim
e
VS.NETVS.NET
.NET Compact Framework
.NET CF
.NET CF
Win
For
mA
SP.
NE
T
VS.NETVS.NET
Bas
e C
lass
es
Dat
a &
XM
L
Win
For
m
Com
mon
Lan
guag
e R
untim
e
AS
P.N
ET
.NET 컴팩트프레임워크
(.NET Compact Framework)
System.Web
System.Web
Caching
Caching
Security
Security
Services
Services
Description
Description
Discovery
Discovery
Protocols
Protocols
UI
UI HtmlControls
HtmlControls
WebControls
WebControls
System.Drawing
System.Drawing
Drawing2D
Drawing2D
Printing
Printing
System.WinForms
System.WinForms
Design
Design
ComponentModel
ComponentModel
System
System
System.Data
System.Data
System.Xml
System.Xml
Globalization
Globalization
Text
Text
Security
Security
Collections
Collections
Resources
Resources
Reflection
Reflection
Net
Net
IOIO
Threading
Threading
Diagnostics
Diagnostics
ServiceProcess
ServiceProcess
Configuration
Configuration
Design
Design
ADO.NET
ADO.NET
SqlServerCe
SqlServerCe
SqlClient
SqlClient
Xslt/XPath
Xslt/XPath
XmlDocument
XmlDocument
Runtime
Runtime
InteropServices
InteropServices
Remoting
Remoting
Serialization
Serialization
Serialization
Serialization
Configuration
Configuration
SessionState
SessionState
Caching
Caching
Security
Security
Imaging
Imaging
Drawing2D
Drawing2D
Text
Text
Printing
Printing
Reader/Writers
Reader/Writers
.NET 컴팩트프레임워크
•스마트디바이스를위한.NET 프레임워크
•경량의구조
••데스크탑플랫폼과호환가능함
•Visual Studio® .NET 및다른회사들의도구들
•다양한범위의사용
▫다중CPU
▫다양한운영체제
▫다양한디바이스
.NET CF 설계및구조
•XML Web Service 지원
•다양한데이터처리
•다양한데이터처리
•.NET 코드들
•디바이스함수를쉽게확장
스마트디바이스를위한
.NET 개발
환경
.NET Framework
.NET Framework Local Codes
Local Codes
ASP.NET Web Pages
ASP.NET Web Pages
Mobile Web
Mobile Web
Browser
Browser
.NET Compact
.NET Compact
Framework
Framework
Windows
Windows
Environment
Environment
as a Client
as a Client
Web Program
Web Program
in a Server
in a Server
ASP.NET 모바일콘트롤
.NET Framework
.NET Framework
Mobile Web
Mobile Web
Browser
Browser
.NET Compact
.NET Compact
Framework
Framework
Local Codes
Local Codes
ASP.NET Web Pages
ASP.NET Web Pages
스마트디바이스를위한
.NET
SOAP
SOAP
XML Web Services
XML Web Services
Web Services
Web Services
User Interface
User Interface
VBVB
C++
C++
C#C#
Perl
Perl
Python
Python
……
Visual Studio .NET
Visual Studio .NET
Mobile Web Pages
Mobile Web Pages
Common Language Runtime (CLR)
Common Language Runtime (CLR)
Base Framework
Base Framework
Data and XML
Data and XML
Web Services
Web Services
User Interface
User Interface
ASP.NET, Mobile Control
ASP.NET, Mobile Control
Windows
Windows
Mobile Web Pages
Mobile Web Pages
Mobile Web
Mobile Web
Browser
Browser
Device OS
Device OS
스마트디바이스응용프로그램
.NET Framework
.NET Framework
Mobile Web
Mobile Web
Browser
Browser
.NET Compact
.NET Compact
Framework
Framework
Local Codes
Local Codes
ASP.NET Web Pages
ASP.NET Web Pages
디바이스들을위한
.NET
Local Code
Local Code
SOAP
SOAP
XML Web Services
XML Web Services
Visual Studio .NET
Visual Studio .NET
Local Code
Local Code
.NET Compact Framework
.NET Compact Framework
Window
Window
.NET Compact
.NET Compact
Framework
Framework
Device OS
Device OS
스마트디바이스프로그램개
발•마법사(Wizard) 함수
▫Visual Basic andVisual C#
▫Windows CE .NET andPocket PC
▫Windows CE .NET andPocket PC
•템플릿들
▫윈도우응용프로그램
▫클래스라이브러리
▫윈도우콘트롤라이브러리
▫GUI 기반이아닌응용프로그램
스마트디바이스프로그램개
발 •각디바이스마다서로다른IDE 사양
▫툴박스, 레퍼런스, 프라퍼티
▫인텔리센스(IntelliSense), 컨텍스트에민감한도움말
▫인텔리센스(IntelliSense), 컨텍스트에민감한도움말
•데스크탑용코드를아주약간변경하면오케이
•동일한코드에디터
•IDE에에러메시지출력
•Visual Studio .NET 통합도구들
▫XML 웹서비스
▫웹레퍼런스
▫UDDI 디렉토리, 자동화된프락시코드생성
디바이스커스터마이징
•디바이스특성에맞는프로젝트컨피규레이션
•디바이스특성에맞는콘트롤세트들
•디바이스컨피규레이션과연결셋업
에뮬레이터
•외국어를지원하는디바이스에뮬레이션(즉한국어
도지원)
•윈도우XP 호스트에서윈도우CE 운영체제작동
•다양한윈도우CE 이미지들
•다양한윈도우CE 이미지들
•다양한디바이스스킨들
디바이스컨트롤
�Windows Forms 디자이너
�Drag & Drop, Property 기반
�데스크탑컨트롤들의부분집합
�사용자인터페이스
�데이터입력
�디스플레이
�디스플레이
�RAD 콘트롤
�Organizational controls
�Helper controls
Data Entry
�Check Box
�Combo Box
�Command Button
�Domain Up/Down
�List Box
Display
�Label
�Picture Box
�Progress Bar
�Status Bar
Helper
�Context Menu
�Scroll Bars
�Image List
�Main Menu
�Open & Save
Device Control
�List Box
�Numeric Up/Down
�Radio Button
�Text Box
�Track Bar
�Open & Save
File Dialogs
�Timer
�Tool Bar
Organizational
�List View
�Panel
�Tab Control
Not Supported
�Checked List Box
�Data Grid
�DateTime Picker
�Group Box
�Month Calendar
�Tree View
�Splitter
호환성
Pinvoke로
Native 코드호출
•관리코드(Managed Program)에서도네이티브코
드호출가능
▫데스크탑프로그래밍과동일
▫Windows CE API 호출지원
▫Windows CE API 호출지원
▫기본데이터타입의자동화된Marshalling과
UnMarshalling
▫고성능및저자원사용
호환성
COM 사용
•Wrapper 가필요함
•개발자들이기존널리사용되던콘트롤들사용가능
•Managed Classes 들을통해가능함
•실행엔진의초기화가필요함
•실행엔진의초기화가필요함
ASP.NET 모바일콘트롤
•모든개발환경을Visual
Studio.NET 으로통합
.NET Framework
ASP.NET
Windows Forms
&.NET Compact
Framework
Web
Forms
Mobile
Web
Forms
Web Services
�모바일응용개발분야로
ASP.NET 확장
Studio.NET 으로통합
Services Framework
Common Language Runtime
System Services
Base
Data
Debug
…
Web Services
�다양한디바이스들과마
크업언어들
Mobile Web
Mobile Web
Form
Form
웹폼(Web Form) 대모바일폼(Mobile Form)
<Form runat="server">
<Form runat="server">
<<aspasp:Label runat=“server">
:Label runat=“server">
Hello, World
Hello, World
</</aspasp:Label>
:Label>
</Form>
</Form>
웹웹폼폼(Web Form)
(Web Form)
모바일웹폼(Mobile Web Form)
<<mobile
mobile:Form runat="server">
:Form runat="server">
<<mobile
mobile:Label runat=“server">
:Label runat=“server">
Hello, Mobile World
Hello, Mobile World
</</mobile
mobile:Label>
:Label>
</</mobile
mobile:Form>
:Form>
ASP.NET 과
IIS WML
Mobile
Capabilities
HTTP Request
HTTP Request
Get Browser
Get Browser
and Device
and Device
Select
Select
Device Adapter
Device Adapter
Get Device
Get Device
Adapter
Adapter
WAP
WAP
ASP.NET and IIS
ASP.NET and IIS
Return WML with the WTAI tag
Return WML with the WTAI tag
cHTML
HTML
PhoneCall
Return HTML with
Return HTML with
alternative text
alternative text
Mobile.ASPX
Mobile.ASPX
Get Device
Get Device
Adapter
Adapter
Page instantiates
Page instantiates
control
control
차례
•소개
•설치
•Hello, Smartphone! etc. in MFC of C++
•Hello, Smartphone! etc. in MFC of C++
•배포(Deployment) (프로그램을스마트디바이스
에업로드하는것)
•GUI Programming in C#
설치
(Microsoft Visual Studio
2005 .NET)
•First Steps in Windows Mobile Programming
(http://msdn.microsoft.com/en-us/library/aa457716.aspx)
▫Visual Studio 2005 Standard, Professional, or Team System
Editions
▫액티브싱크(ActiveSync 4.1) (http://www.microsoft.com/window
▫액티브싱크(ActiveSync 4.1) (http://www.microsoft.com/window
smobile/en-us/help/synchronize/default.mspx)
▫포켓PC 용
Windows Mobile 5.0 SDK
(http://www.microsoft.com/downloads/details.aspx?familyid=8
3A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en)
▫스마트폰용Windows Mobile 5.0 SDK
(http://www.microsoft.com/downloads/details.aspx?familyid=D
C6C00CB-738A-4B97-8910-5CD29AB5F8D9&displaylang=en)
설치
(eMbedded Visual C++ Stuites)
•First Steps in Windows Mobile Programming
(http://msdn.microsoft.com/en-us/library/aa457716.aspx)
▫eMbeddedVisual C++
▫eMbeddedVisual C++ 4.0 SP4
▫the SDK for Windows Mobile 2003-based Pocket PCs
▫the SDK for Windows Mobile 2003-based Pocket PCs
▫the SDK for Windows Mobile 2003-based Smartphones
▫Emulator Images for Windows Mobile 2003 Second Edition software for
Pocket PC
▫Developer Resources for Windows Mobile 2003 Second Edition
▫Where are Emulator Images for smartphone?
�Emulator Images for Windows Mobile 2003 Second Edition software for
Smartphone
(http://www.microsoft.com/downloads/details.aspx?FamilyID=791bae52
-b057-4d72-b263-105534825ca5)
�Localized Windows Mobile 5.0 Smartphone Emulator Images
(http://www.microsoft.com/downloads/details.aspx?FamilyID=52fed581-
8f8d-4c46-9966-4832098191b7)
차례
•소개
•설치
•Hello, Smartphone! etc. in MFC of C++
•Hello, Smartphone! etc. in MFC of C++
•배포(Deployment) (프로그램을스마트디바이스
에업로드하는것)
•GUI Programming in C#
Hello, Smartphone!
•새프로젝트(New project)
•프로젝트타입–스마트디바이스(Project type –smart device)
•다음둘중선택
▫MFC Smart Device Application
▫MFC Smart Device Application
▫Win32 Smart Device Project
•프로젝트이름선택–Hello1
•MFC/Win32 스마트디바이스(Smart Device) Project Wizard
•Smartphone 2003 또는Pocket PC 2003 선택
•기본설정따름
▫MFC –Single document, Use MFC in a static library, Doc/View
architecture support
▫Win32 –Windows application
•종료선택
MessageBox
•Construct a MFC Smart device project named
“Hello1”
•In Hello1Doc.cpp, add one line inside
“OnNewDocument()” method
“OnNewDocument()” method
1.BOOL CHello1Doc::OnNewDocument() {
2.
if (!CDocument::OnNewDocument()) return
FALSE;
3.
MessageBox(NULL, TEXT("Hello, Smartphone"),
TEXT("Hello1"), MB_OK);
4.
return TRUE;
5.}
한가지중요한점
•초기설정이끝나면, 윈도우모바일프로그래밍은
일반윈도우프로그래밍과대부분동일함
•따라서, 개발자가윈도우API/MFC 프로그래밍에
능하면, 별문제없음
DrawText
•In Hello1View.cpp, add three lines
1.void CHello1View::OnDraw(CDC* pDC)
2.{
3.
CHello1Doc* pDoc= GetDocument();
3.
CHello1Doc* pDoc= GetDocument();
4.
ASSERT_VALID(pDoc);
5.
RECT rect;
6.
GetClientRect(&rect);
7.
DrawText(*pDC, TEXT("Hello, Oman
Engineers!"), -1, &rect, DT_CENTER |
DT_VCENTER | DT_SINGLELINE);
8.}
차례
•소개
•설치
•Hello, Smartphone! etc. in MFC of C++
•Hello, Smartphone! etc. in MFC of C++
•배포(Deployment) (프로그램을스마트디바이스
에업로드하는것)
•GUI Programming in C#
프로그램배포
1.컴파일하고배포(디
플로이; deploy)함
▫빌드메뉴밑의구성관리자(Configuration Manager)
실행
실행
▫Solution Configuration –Debug/Release
▫솔루션플랫폼(Solution Platforms)
�Pocket PC 2003(ARMV4) / Smartphone 2003(ARMV4)
▫타겟디바이스(Target Device)
�Pocket PC 2003 Device / Pocket PC 2003 SE Emulator
�Smartphone 2003 Device / Smartphone 2003 SE
Emulator
어떻게프로그램을배포하는가?
2.Smart CAB 파일들생성
▫Click Solution Explorer
▫Add New Project
▫Check Project Type (left panel)
▫Check Project Type (left panel)
�Other Project Types �
Setup and Deployment
▫Choose Smart Device CAB Project
▫Name the project “Hello1Cab”
▫Click Hello1Cab Project in Solution Explorer
▫Add Project Output
�Project:Hello1 ,Primary Output, Active Configuration
▫Build Hello1Cab
차례
•소개
•설치
•Hello, Smartphone! etc. in MFC of C++
•Hello, Smartphone! etc. in MFC of C++
•배치(Deployment) (프로그램을스마트디바이스
에업로드하는것)
•GUI Programming in C#
C#을이용한
WYSIWYG 기반개발
Button 입력
•C# 용
Smartphone 2003 Device 응용생성
•Form1.Text 를“DongseoUniv.”로변경
•Label 을
화면중앙에붙임
•label1.Text 를“Hello, Mobile Systems”로변경
•버튼을더블클릭하면Form1_KeyDown 코드가열림
1.private void Form1_KeyDown(object sender,
KeyEventArgse)
KeyEventArgse)
2.{
3.
if ((e.KeyCode==
System.Windows.Forms.Keys.Up))
4.
{5.
// Up
6.
this.label1.Text = "Up";
7.
}8.}
콘트롤(Controls)과
메뉴(Menus)
•Design탭에서mainMenu1을
선택
•mainMenu1의
화살표를선택하여
Menu Task를편집
•두개의메뉴아이템을편집–HitMe
and OK
and OK
•PictureBox를화면의정면에놓음
•오만(Oman)의
오아시스이미지삽
입