Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Tran Minh Thai - Bai giang VC

Tran Minh Thai - Bai giang VC

Ratings: (0)|Views: 11 |Likes:
Published by api-3746617
Tài liệu C
Tài liệu C

More info:

Published by: api-3746617 on Oct 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

M\u1ee5c l\u1ee5c
Trang
B\u00e0i 1: GI\u1edaI THI\u1ec6U CHUNG.................................................................. 2

1. M\u1edf \u0111\u1ea7u.........................................................................................................2 2. C\u00e1c th\u01b0 vi\u1ec7n l\u1eadp tr\u00ecnh c\u1ee7a Windows............................................................. 3 3. C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n................................................................................... 4 4. L\u1eadp tr\u00ecnh s\u1ef1 ki\u1ec7n (Even driven programming)............................................... 5 5. C\u00e1c th\u00e0nh ph\u1ea7n giao di\u1ec7n\u0111\u1ed3 h\u1ecda (GUI)....................................................... 6 6. C\u1ea5u tr\u00fac ch\u01b0\u01a1ng tr\u00ecnh C for Win................................................................. 10 7. Qui tr\u00ecnh ho\u1ea1t\u0111\u1ed9ng c\u1ee7a ch\u01b0\u01a1ng tr\u00ecnh\u1ee9ng d\u1ee5ng........................................ 10 8. M\u1ed9t s\u1ed1 quy\u01b0\u1edbc\u0111\u1eb7t t\u00ean............................................................................... 11 9. V\u00ed d\u1ee5...........................................................................................................11 10. T\u00e0i nguy\u00ean c\u1ee7a\u1ee9ng d\u1ee5ng (Resources)................................................... 18 11. M\u1ed9t s\u1ed1 ki\u1ec3u d\u1eef li\u1ec7u m\u1edbi........................................................................... 19 12. Ph\u00e2n t\u00edch, t\u00ecm hi\u1ec3u source code c\u1ee7a project........................................... 19

B\u00e0i 2: PAINT V\u00c0 REPAINT................................................................. 24

1. Gi\u1edbi thi\u1ec7u....................................................................................................24 2. T\u1ed5ng quan v\u1ec1 GDI (Graphics Device Interface).......................................... 25 3. M\u1ed9t s\u1ed1 h\u00e0m\u0111\u1ed3 h\u1ecda c\u01a1 s\u1edf........................................................................... 28 4. K\u1ebft lu\u1eadn.......................................................................................................30

B\u00e0i 3: C\u00c1C THI\u1ebeT B\u1eca NH\u1eacP LI\u1ec6U...................................................... 31
U

1. B\u00e0n ph\u00edm....................................................................................................31 2. Thi\u1ebft b\u1ecb chu\u1ed9t..............................................................................................38 3. Timer...........................................................................................................41

B\u00e0i 4: H\u1ed8P THO\u1ea0I V\u00c0\u0110I\u1ec0U KHI\u1ec2N................................................... 45
1. H\u1ed9p tho\u1ea1i.....................................................................................................45
2. Menu...........................................................................................................57
B\u00e0i 5: X\u1eec L\u00dd V\u0102N B\u1ea2N...................................................................... 62

1. Hi\u1ec3n th\u1ecb v\u0103n b\u1ea3n.......................................................................................... 62 2.\u0110\u1ecbnh d\u1ea1ng v\u0103n b\u1ea3n...................................................................................... 64 3. S\u1eed d\u1ee5ng font...............................................................................................65

T\u00e0i li\u1ec7u tham kh\u1ea3o............................................................................... 69
B\u00e0i 1:Gi\u1edbi thi\u1ec7u chung
Tr\u1ea7n Minh Th\u00e1i
B\u00e0i 1: GI\u1edaI THI\u1ec6U CHUNG
Ph\u00e2n b\u1ed1 th\u1eddi l\u01b0\u1ee3ng:

- S\u1ed1 ti\u1ebft gi\u1ea3ng\u1edf l\u1edbp: 6 ti\u1ebft
- S\u1ed1 ti\u1ebft t\u1ef1 h\u1ecdc\u1edf nh\u00e0: 6 ti\u1ebft
- S\u1ed1 ti\u1ebft c\u00e0i\u0111\u1eb7t ch\u01b0\u01a1ng tr\u00ecnh\u1edf nh\u00e0: 12 ti\u1ebft

1.
M\u1edf \u0111\u1ea7u

C\u00e1c\u1ee9ng d\u1ee5ng c\u1ee7a Windows r\u1ea5t d\u1ec5 s\u1eed d\u1ee5ng, nh\u01b0ng r\u1ea5t kh\u00f3\u0111\u1ed1i v\u1edbi ng\u01b0\u1eddi\u0111\u00e3 t\u1ea1o l\u1eadp ra ch\u00fang. \u0110\u1ec3 \u0111\u1ea1t\u0111\u01b0\u1ee3c t\u00ednh d\u1ec5 d\u00f9ng\u0111\u00f2i h\u1ecfi ng\u01b0\u1eddi l\u1eadp tr\u00ecnh ph\u1ea3i b\u1ecf ra r\u1ea5t nhi\u1ec1u c\u00f4ng s\u1ee9c\u0111\u1ec3 c\u00e0i\u0111\u1eb7t.

\ue004

L\u1eadp tr\u00ecnh tr\u00ean Windows kh\u00f3 v\u00e0 ph\u1ee9c t\u1ea1p h\u01a1n nhi\u1ec1u so v\u1edbi l\u1eadp tr\u00ecnh tr\u00ean DOS. Tuy nhi\u00ean l\u1eadp tr\u00ecnh tr\u00ean Windows s\u1ebd gi\u1ea3i quy\u1ebft\u0111\u01b0\u1ee3c m\u1ed9t s\u1ed1 v\u1ea5n\u0111\u1ec1 kh\u00f3 kh\u0103n trong m\u00f4i tr\u01b0\u1eddng DOS nh\u01b0 x\u00e2y d\u1ef1ng giao di\u1ec7n ng\u01b0\u1eddi d\u00f9ng, qu\u1ea3n l\u00fd b\u1ed9 nh\u1edb\u1ea3o,\u0111\u1ed9c l\u1eadp thi\u1ebft b\u1ecb v\u00e0o ra, th\u00e2m nh\u1eadp Internet, kh\u1ea3 n\u0103ng chia s\u1ebb t\u00e0i nguy\u00ean, ...

\ue004

Windows cung c\u1ea5p c\u00e1c h\u00e0m\u0111\u1ec3 ng\u01b0\u1eddi l\u1eadp tr\u00ecnh th\u00e2m nh\u1eadp c\u00e1c\u0111\u1eb7c tr\u01b0ng c\u1ee7a h\u1ec7\u0111i\u1ec1u h\u00e0nh g\u1ecdi l\u00e0 giao di\u1ec7n l\u1eadp tr\u00ecnh\u1ee9ng d\u1ee5ng (Application Programming Interface \u2013 API). Nh\u1eefng h\u00e0m n\u00e0y\u0111\u01b0\u1ee3c\u0111\u1eb7t trong c\u00e1c th\u01b0 vi\u1ec7n li\u00ean k\u1ebft\u0111\u1ed9ng (Dynamic Link Library \u2013 DLL). C\u00e1c ch\u01b0\u01a1ng tr\u00ecnh\u1ee9ng d\u1ee5ng s\u1eed d\u1ee5ng ch\u00fang th\u00f4ng qua c\u00e1c l\u1eddi g\u1ecdi h\u00e0m v\u00e0 ch\u1ec9 chia s\u1ebb \u0111\u01b0\u1ee3c khi trong m\u00e1y c\u00f3 c\u00e0i\u0111\u1eb7t Windows.

\ue004
\ue004V\u00e0i\u0111i\u1ec3m kh\u00e1c bi\u1ec7t gi\u1eefa l\u1eadp tr\u00ecnh Windows v\u00e0 DOS:
Windows
DOS
L\u1eadp tr\u00ecnh s\u1ef1 ki\u1ec7n, d\u1ef1a v\u00e0o th\u00f4ng\u0111i\u1ec7p
(message)
Th\u1ef1c hi\u1ec7n tu\u1ea7n t\u1ef1 theo ch\u1ec9 \u0111\u1ecbnh
Multi-tasking
Single task
Multi-CPU
Single CPU
T\u00edch h\u1ee3p s\u1eb5n Multimedia
Ph\u1ea3i d\u00f9ng c\u00e1c th\u01b0 vi\u1ec7n Multimedia ri\u00eang
H\u1ed7 tr\u1ee3 32 bits hay h\u01a1n n\u1eefa
\u1ee8ng d\u1ee5ng 16 bits
H\u1ed7 tr\u1ee3 nhi\u1ec1u c\u00f4ng ngh\u1ec7 DLL, OLE,
DDE, COM, OpenGL, DirectX,\u2026
Kh\u00f4ng c\u00f3
B\u00e0i gi\u1ea3ng: L\u1eadp tr\u00ecnh C for Win............................................................................................... Trang 2/69
B\u00e0i 1:Gi\u1edbi thi\u1ec7u chung
Tr\u1ea7n Minh Th\u00e1i
2.
C\u00e1c th\u01b0 vi\u1ec7n l\u1eadp tr\u00ecnh c\u1ee7a Windows
SDK \u2013 Software Development Kit
L\u00e0 b\u1ed9 th\u01b0 vi\u1ec7n l\u1eadp tr\u00ecnh n\u1ec1n t\u1ea3ng c\u1ee7a H\u0110H Windows.
\ue004
Cung c\u1ea5p t\u1ea5t c\u1ea3 c\u00e1c c\u00f4ng c\u1ee5 c\u1ea7n thi\u1ebft\u0111\u1ec3 x\u00e2y d\u1ef1ng 1\u1ee9ng d\u1ee5ng tr\u00ean
Windows.
\ue004
\u0110\u01b0\u1ee3c s\u1eedd\u1ee5ng nh\u01b0 l\u00e0 th\u01b0vi\u1ec7n c\u01a1s\u1edf \u0111\u1ec3t\u1ea1o ra nh\u1eefng th\u01b0vi\u1ec7n cao c\u1ea5p h\u01a1n
trong nh\u1eefng ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh. VD: OWL c\u1ee7a BorlandC, MFC c\u1ee7a Visual
C++,\u2026
\ue004
M\u1ed9t s\u1ed1 th\u00e0nh ph\u1ea7n c\u01a1 b\u1ea3n c\u1ee7a SDK:
\ue004
\u2022
Win32 API.
\u2022
GDI/GDI+.
\u2022
Windows Multimedia.
\u2022
OpenGL.
\u2022
DirectX.
\u2022
COM/COM+.
\u2022
ADO (ActiveX Data Object).
\u2022
OLE DB.
\u2022
\u2026
(Xem
th\u00eam
MSDN/PlatForm
SDK
Documentation/Getting
started/Content of Platform SDK).
\ue004OWL \u2013 Object Windows Library:
\u2022
L\u00e0 b\u1ed9 th\u01b0 vi\u1ec7n h\u01b0\u1edbng\u0111\u1ed1i t\u01b0\u1ee3ng c\u1ee7a BorlandC++.
\ue004 MFC \u2013 Microsoft Foundation Classes:
\u2022
L\u00e0 b\u1ed9 th\u01b0 vi\u1ec7n h\u01b0\u1edbng\u0111\u1ed1i t\u01b0\u1ee3ng c\u1ee7a Visual C++.
\ue004 M\u1ed9t\u1ee9ng d\u1ee5ng tr\u00ean Windows c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng:
\u2022
Th\u01b0 vi\u1ec7n SDK.
\u2022
M\u1ed9t th\u01b0 vi\u1ec7n kh\u00e1c (OWL, MFC,\u2026) ph\u1ed1i h\u1ee3p v\u1edbi SDK.
\ue004 C\u00e1c lo\u1ea1i\u1ee9ng d\u1ee5ng:
\u2022
Win32 Console:\u1ee9ng d\u1ee5ng 32 bits, v\u1edbi giao di\u1ec7n d\u1ea1ng DOS command
line.
B\u00e0i gi\u1ea3ng: L\u1eadp tr\u00ecnh C for Win............................................................................................... Trang 3/69

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->