Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Application Development with Code::Blocks

You're reading from   C++ Application Development with Code::Blocks Using Code::Blocks it's possible for C++ developers to create application consistency across multiple platforms. This book takes you through the process from installation to implementing advanced features, all with a user-friendly approach.

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher
ISBN-13 9781783283415
Length 128 pages
Edition Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
BIPLAB MODAK BIPLAB MODAK
Author Profile Icon BIPLAB MODAK
BIPLAB MODAK
Arrow right icon
View More author details
Toc

Event driven Windows app


Windows apps are event driven apps. An event can be an external or internal input to an app. Event driven apps run a message loop, which parses incoming events and then calls appropriate functions corresponding to that event. Code::Blocks default code generated by Win32 GUI project wizard generates a boilerplate code of an event driven app.

In order to understand event driven programming we shall be using following example to learn and understand it. We shall be using native Win32 API for this example. Win32 API is the base of several toolkits. Thus we should have an understanding of it in order to understand other toolkits.

Let's create another GUI app and name it App10. Replace wizard generated code with the following code. Also enable Unicode support as per the steps laid out in the previous example. As the code snippet is large we'll understand and paste it in editor window in several steps.

The following code snippet shows the header declaration, global variable...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image