Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
34Activity
0 of .
Results for:
No results containing your search query
P. 1
Borland - C++ Win32 API

Borland - C++ Win32 API

Ratings:

4.5

(1)
|Views: 487|Likes:
Published by mgdown
weq
weq

More info:

Published by: mgdown on Jul 09, 2009
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

12/08/2010

pdf

text

original

 
ContentsGetting Started................................................................................................................................4What this tutorial is all about.......................................................................................................4Important notes...........................................................................................................................4The simplest Win32 program......................................................................................................4Calling Conventions................................................................................................................5Win32 Data Types..................................................................................................................5A Simple Window..........................................................................................................................6Step 1: Registering the Window Class.........................................................................................7Step 2: Creating the Window......................................................................................................9Step 3: The Message Loop........................................................................................................10Step 4: the Window Procedure..................................................................................................10Step 5: There is no Step 5..........................................................................................................11Handling Messages.......................................................................................................................11Understanding the Message Loop.................................................................................................15What is a Message?...............................................................................................................15Dialogs.................................................................................................................................16What is the Message Queue...................................................................................................16What is a Message Loop.......................................................................................................16Using Resources...........................................................................................................................17Menus and Icons...........................................................................................................................19The program file icon............................................................................................................24Dialogs, GUI coders best friend....................................................................................................24Modeless Dialogs.........................................................................................................................27Standard Controls: Button, Edit, List Box.....................................................................................29Controls................................................................................................................................30Messages...............................................................................................................................30Edits.........................................................................................................................................30Edits with Numbers...............................................................................................................31List Boxes.................................................................................................................................32Adding Items........................................................................................................................32Notifications.........................................................................................................................32Getting Data from the ListBox..............................................................................................33Statics.......................................................................................................................................33Dialog FAQ..................................................................................................................................34Changing Colours.....................................................................................................................34Giving the Dialog an Icon.........................................................................................................34Why Doesn't my Combo Box Work?........................................................................................35What about all the other controls!..............................................................................................35App Part 1: Creating controls at runtime.......................................................................................36Creating controls...................................................................................................................36Sizing of dynamically created controls..................................................................................37Creating other controls at runtime.........................................................................................37App Part 2: Using files and the common dialogs...........................................................................38The Common File Dialogs........................................................................................................38Reading and Writing Files.........................................................................................................39Reading.................................................................................................................................39Writing..................................................................................................................................40
 
App Part 3: Tool and Status bars...................................................................................................41An IMPORTANT Word on Common Controls.....................................................................41Toolbars....................................................................................................................................42Toolbar buttons.....................................................................................................................42Adding Standard Buttons......................................................................................................42Status bars.................................................................................................................................43Proper Sizing............................................................................................................................44App Part 4: Multiple Document Interface......................................................................................44MDI Overview..........................................................................................................................45Getting Started with MDI..........................................................................................................46MDI Client Window.............................................................................................................46Child Window Class.............................................................................................................47MDI Child Procedure............................................................................................................48Creating and Destroying Windows........................................................................................50Bitmaps, Device Contexts and BitBlt............................................................................................51GDI..........................................................................................................................................52Device Contexts....................................................................................................................52Bitmaps.................................................................................................................................52GDI Leaks............................................................................................................................52Displaying Bitmaps...................................................................................................................53Getting the Window DC........................................................................................................54Setting up a Memory DC for the Bitmap...............................................................................54Drawing................................................................................................................................54Cleanup.................................................................................................................................54Transparent Bitmaps.....................................................................................................................55Transparency............................................................................................................................55BitBlt operations...................................................................................................................55Mask Creation.......................................................................................................................56How does all this work?............................................................................................................57SRCAND..............................................................................................................................57SRCPAINT...........................................................................................................................58SRCINVERT........................................................................................................................58Example....................................................................................................................................58Timers and Animation..................................................................................................................58Setting up..................................................................................................................................58Setting the Timer......................................................................................................................59Animating in WM_TIMER.......................................................................................................60Double Buffering......................................................................................................................61Faster Double Buffering........................................................................................................61Killing the Timer......................................................................................................................62Text and Fonts..............................................................................................................................62Loading Fonts...........................................................................................................................62Default Fonts........................................................................................................................63Drawing Text............................................................................................................................63Choosing Fonts.........................................................................................................................64Choosing Colours.....................................................................................................................65Control Fonts............................................................................................................................66Appendix A: References...............................................................................................................66
 
Books.......................................................................................................................................66Links.........................................................................................................................................67Appendix B: Free Borland C++ Command Line Tools..................................................................67Getting Them............................................................................................................................67Using Them..............................................................................................................................68Basic commands...................................................................................................................68Linking in Resources.............................................................................................................68Appendix C: Why you should learn the API before MFC..............................................................69The Controversy.......................................................................................................................69My Answer...............................................................................................................................69So basically...............................................................................................................................70Appendix D: Resource file notes...................................................................................................70Argh!........................................................................................................................................70Compatibility............................................................................................................................71Compiling resources under BC++.............................................................................................71

Activity (34)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Kan15 liked this
scott_krueger liked this
dayaaol liked this
theblessed liked this
zzmgd6 liked this
shusan2020 liked this
adamovic5 liked this
jfscrbd liked this

You're Reading a Free Preview

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