Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
$9.99 | ALL EBOOKS & VIDEOS
Save more on purchases! Buy 2 and save 10%, Buy 3 and save 15%, Buy 5 and save 20%
C++ Windows Programming
C++ Windows Programming

C++ Windows Programming: Develop real-world applications in Windows.

By Stefan Björnander
$15.99 per month
Book Sep 2016 588 pages 1st Edition
eBook
$43.99 $9.99
Print
$54.99
Subscription
$15.99 Monthly
eBook
$43.99 $9.99
Print
$54.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

C++ Windows Programming

Chapter 1. Introduction

The purpose of this book is to learn how to develop applications in Windows. In order to do so, I have developed Small Windows, which is a C++ object-oriented class library for graphical applications in Windows.

The idea is to guide you into Windows programming by introducing increasingly more advanced applications written in C++ with Small Windows, thereby hiding the technical details of the Windows 32-bit Applications Programming Interface (Win32 API), which is the underlying library for Windows development. With this approach, we can focus on the business logic without struggling with the underlying technical details. If you are interested in knowing how the Win32 API works, the second part of this book gives a detailed description of how Small Windows is implemented.

This book is made up of two parts, where the first part describes the applications developed in C++ with Small Windows. While some books have many examples, this book only includes six examples, among which the last four are rather advanced: the Tetris game, a drawing program, a word processor, and a spreadsheet program. Note that this book is not only a tutorial about Windows programming, but also a tutorial about how to develop object-oriented graphical applications.

The second part holds a detailed description of the implementation of Small Windows in the Win32 API. Note that the Win32 API is not introduced until the second part. Some of you may be satisfied with the high level aspects of Small Windows and only want to study application-specific problems, while others may want to read the second part in order to understand how the classes, methods, and macros of Small Windows are implemented in the Win32 API.

Naturally, I am aware of the existence of modern object-oriented class libraries for Windows. However, the purpose of those libraries is to make it easier for the developer by hiding the details of the architecture, which also prevents the developer from using the Windows architecture to its full extent. Even though the Win32 API has been around for a while, I regard it as the best way to develop professional Windows applications and to understand the Windows architecture.

All source code is given in this book; it is also available as a Visual Studio solution.

The library


This section gives an introduction to Small Windows. The first part of a Small Windows application is the MainWindow function. It corresponds to main in regular C++. Its task is to set the name of the application and create the main window of the application.

In this book we talk about definitions and declarations. A declaration is just a notification for the compiler, while a definition is what defines the feature. Below is the declaration of the MainWindow function. Its definition is left to the user of Small Windows.

void MainWindow(vector<String>argumentList,
                SmallWindows::WindowShow windowShow);

Simply put, in Windows the application does not take any initiative; rather, it waits for messages and reacts when it receives them. Informally speaking, you do not call Windows, Windows calls you.

The most central part of Small Windows is the Application class. In Windows, each event generates a message that is sent to the window that has input focus at the moment. The Application class implements the RunMessageLoop method, which makes sure that each message is sent to the correct window. It also closes the application when a special quit message is sent.

The creation of a window takes place in two steps. In the first step, the RegisterWindowClasses method sets features such as style, color, and appearance. Note that Windows classes are not C++ classes:

class Application { 
  public: 
    static int RunMessageLoop(); 
    static void RegisterWindowClasses(HINSTANCE instanceHandle); 
}; 

The next step is to create an individual window, which is done by the Window class. All virtual methods are empty and are intended to be overridden by sub classes shown as follows:

  class Window { 
    public: 

A window can be visible or invisible, enabled or disabled. When a window is enabled, it accepts mouse, touch, and keyboard input:

      void ShowWindow(bool visible); 
      void EnableWindow(bool enable); 

The OnMove and the OnSize methods are called when the window is moved or resized. The OnHelp method is called when the user presses the F1 key or the Help button in a message box:

      virtual void OnMove(Point topLeft); 
      virtual void OnSize(Size windowSize); 
      virtual void OnHelp(); 

The client area is the part of the window that it is possible to paint in. Informally, the client area is the window minus its frame. The contents of the client area can be zoomed. The default zoom factor is 1.0:

      double GetZoom() const; 
      void SetZoom(double zoom); 

The timer can be set to an interval in milliseconds. The OnTimer method is called on every interval. It is possible to set up several timers, as long as they have different identity numbers:

      void SetTimer(int timerId, unsigned int interval); 
      void DropTimer(int timerId); 
      virtual void OnTimer(int timerId); 

The OnMouseDown, OnMouseUp, and OnDoubleClick methods are called when the user presses, releases, or double-clicks on a mouse button. The OnMouseMove method is called when the user moves the mouse with at least one button pressed. The OnMouseWheel method is called when the user moves the mouse wheel with one click:

      virtual void OnMouseDown(MouseButton mouseButtons, 
                           Point mousePoint, bool shiftPressed, 
                           bool controlPressed); 


      virtual void OnMouseUp(MouseButton mouseButtons, 
                           Point mousePoint, bool shiftPressed, 
                           bool controlPressed); 
      virtual void OnDoubleClick(MouseButton mouseButtons, 
                           Point mousePoint, bool shiftPressed, 
                           bool controlPressed); 
      virtual void OnMouseMove(MouseButton mouseButtons, 
                           Point mousePoint, bool shiftPressed, 
                           bool controlPressed); 
      virtual void OnMouseWheel(WheelDirection direction, 
                           bool shiftPressed, bool controlPressed); 

The OnTouchDown, OnTouchMove, and OnTouchDown methods work in the same way as the mouse methods. However, as the user can touch several points at the same time, the methods takes lists of points rather than an individual point:

    virtual void OnTouchDown(vector<Point> pointList); 
    virtual void OnTouchMove(vector<Point> pointList); 
    virtual void OnTouchUp(vector<Point> pointList); 

The OnKeyDown and OnKeyUp methods are called when the user presses or releases a key. If the user presses a graphical key (a key with an ASCII value between 32 and 127, inclusive), the OnChar method is called in between:

      virtual bool OnKeyDown(WORD key, bool shiftPressed, 
                             bool controlPressed); 
      virtual void OnChar(TCHAR tChar); 
      virtual bool OnKeyUp(WORD key, bool shiftPressed, 
                           bool controlPressed); 

The Invalidate method marks a part of the client area (or the whole client area) to be repainted; the area becomes invalidated. The area is cleared before the painting if clear is true. The UpdateWindow method forces a repainting of the invalidated area. It causes the OnPaint method to be called eventually:

      void Invalidate(Rect areaRect, bool clear = true) const; 
      void Invalidate(bool clear = true) const; 
      void UpdateWindow(); 

The OnPaint method is called when some part of the client area needs to be repainted and the OnPrint method is called when it is sent to a printer. Their default behavior is to call the OnDraw method with Paint or Print as the value of the drawMode parameter:

      virtual void OnPaint(Graphics& graphics) const;
      virtual void OnPrint(Graphics& graphics, int page, 
                           int copy, int totalPages) const;
      virtual void OnDraw(Graphics& graphics, DrawMode drawMode)
                          const;

The OnClose method closes the window if TryClose returns true. The OnDestroy method is called when the window is being closed:

      virtual void OnClose(); 
      virtual bool TryClose(); 
      virtual void OnDestroy(); 

The following methods inspect and modify the size and position of the window. Note that we cannot set the size of the client area; it can only be set indirectly by resizing the window:

      Size GetWindowSize() const; 
      void SetWindowSize(Size windowSize); 
      Point GetWindowPosition() const; 
      void SetWindowPosition(Point topLeft); 
      Size GetClientSize() const; 

In the word processor and spreadsheet programs in this book, we handle text and need to calculate the size of individual characters. The following methods calculate the width of a character with a given font. They also calculate the height, ascent, and average character width of a font:

      int GetCharacterWidth(Font font, TCHAR tChar) const; 
      int GetCharacterHeight(Font font) const; 
      int GetCharacterAscent(Font font) const; 
      int GetCharacterAverageWidth(Font font) const; 

The ascent line separates the upper and lower part of a letter, shown as follows:

Finally, the MessageBox method displays a simple message box in the window:

      Answer MessageBox(String message,
                    String caption = TEXT("Error"),
                    ButtonGroup buttonGroup = Ok,
                    Icon icon = NoIcon, bool help = false) const;
};

The Window class also uses the Graphics class responsible for drawing text and geometrical objects in the window. A reference to a Graphics object is sent to the OnPaint, OnPrint, and OnDraw methods in the Window class. It can be used to draw lines, rectangles, and ellipses and to write text:

  class Graphics { 
    public: 
      void DrawLine(Point startPoint, Point endPoint, 
                    Color penColor, PenStyle penStyle = Solid); 
      void DrawRectangle(Rect rect, Color penColor, 
                         PenStyle = Solid); 
      void FillRectangle(Rect rect, Color penColor, 
                       Color brushColor, PenStyle penStyle=Solid); 
      void DrawEllipse(Rect rect, Color penColor, 
                       PenStyle = Solid); 
      void FillEllipse(Rect rect, Color penColor, 
                       Color brushColor, PenStyle penStyle=Solid); 
      void DrawText(Rect areaRect, String text, Font font, 
                    Color textColor, Color backColor, 
                    bool pointsToMeters = true); 
  }; 

The Document class extends the Window class with some functionality common to document-based applications. The scroll thumbs are automatically set to reflect the visible part of the document. The mouse wheel moves the vertical scroll bar one line-height for each click. The height of a line is set by the constructor. The code snippet for it is shown as follows:

  class Document : public Window { 
    public: 

The dirty flag is true when the user has made a change in the document and it needs to be saved. In Document, the dirty flag is set manually, but in the following StandardDocument subclass it is handled by the framework:

      bool IsDirty() const; 
      void SetDirty(bool dirty); 

The caret is the blinking marker that indicates to the user where they should input the next character. The keyboard can be set (with the Insert key) to insert or overwrite mode. The caret is often a thin vertical bar in insert mode and a block with the width of an average character in overwrite mode.

The caret can be set or cleared. For instance, in the word processor, the caret is visible when the user writes text and invisible when the user marks text. When the window gains focus, the caret becomes visible if it has earlier been set. When the window loses focus, the caret becomes invisible, regardless of whether it has earlier been set:

      void SetCaret(Rect caretRect); 
      void ClearCaret(); 
      void OnGainFocus(); 
      void OnLoseFocus(); 

A document may hold a menu bar, which is set by the SetMenuBar method:

      void SetMenuBar(Menu& menuBar); 

The OnDropFiles method is called when the user drops one or several files in the window. Their paths are stored in the path list:

      virtual void OnDropFile(vector<String> pathList); 

The keyboard mode of a document can be set to insert or overwrite as follows:

      KeyboardMode GetKeyboardMode() const; 
      void SetKeyboardMode(KeyboardMode mode); 

The OnHorizontalScroll and OnVerticalScroll methods are called when the user scrolls the bar by clicking on the scroll bar arrows or the scroll bar fields, or dragging the scroll thumbs. The code snippet for it is shown as follows:

      virtual void OnHorizontalScroll(WORD flags,WORD thumbPos=0); 
      virtual void OnVerticalScroll(WORD flags, WORD thumbPos =0); 

There is a large set of methods for inspecting or changing scroll bar settings. The size of a line or page is set by the constructor:

      void SetHorizontalScrollPosition(int scrollPos); 
      int GetHorizontalScrollPosition() const; 
      void SetVerticalScrollPosition(int scrollPos); 
      int GetVerticalScrollPosition() const; 
 
      void SetHorizontalScrollLineWidth(int lineWidth); 
      int GetHorizontalScrollLineHeight() const; 
      void SetVerticalScrollLineHeight(int lineHeight); 
      int GetVerticalScrollLineHeight() const; 
 
      void SetHorizontalScrollPageWidth(int pageWidth); 
      int GetHorizontalScrollPageWidth() const; 
      void SetVerticalScrollPageHeight(int pageHeight); 
      int GetVerticalScrollPageHeight() const; 


 
      void SetHorizontalScrollTotalWidth(int scrollWidth); 
      int GetHorizontalScrollTotalWidth() const; 
      void SetVerticalScrollTotalHeight(int scrollHeight); 
      int GetVerticalScrollTotalHeight() const; 
  }; 

The Menu class handles the menu bar, a menu, a menu item, or a menu item separator (a horizontal bar) in the document. The selection listener is called when the user selects the menu item. The enable, check, and radio listeners are called (unless they are null) when the item is about to become visible. If they return true, the item is enabled or annotated with a check box or radio button:

  class Menu { 
    public: 
      void AddMenu(Menu& menu); 
      void AddSeparator(); 
      void AddItem(String text, VoidListener selection, 
                   BoolListener enable = nullptr, 
                   BoolListener check = nullptr, 
                   BoolListener radio = nullptr); 
  }; 

An accelerator is a shortcut command. For instance, often, the Open item in the File menu is annotated with the text Ctrl+O. This means that you can obtain the same result by pressing the Ctrl key and the O key at the same time, just as if you selected the Open menu item. In both cases, the Open dialog is displayed.

The Accelerator class holds only the TextToAccelerator method. It interprets the menu item text and adds the accelerator, if present, to the accelerator set:

class Accelerator { 
    public: 
      static void TextToAccelerator(String& text, int idemId, 
                                    list<ACCEL>& acceleratorSet); 
  }; 

The StandardDocument class extends the Document class and sets up a framework that takes care of all traditional tasks, such as load and save, and cut, copy, and paste, in a document-based application:

  class StandardDocument : public Document { 
    public: 

The StandardDocument class comes equipped with the common File, Edit, and Help menus. The File menu can optionally (if the print parameter is true) be equipped with menu items for printing and print previewing:

      Menu StandardFileMenu(bool print); 
      Menu StandardEditMenu(); 
      Menu StandardHelpMenu(); 

The ClearDocument method is called when the user selects the New menu item; its task is to clear the document. The WriteDocumentToStream method is called when the user selects the Save or Save As menu item and the ReadDocumentFromStream method is called when the user selects the Open menu item:

      virtual void ClearDocument(); 
      virtual bool WriteDocumentToStream(String name, 
                                         ostream& outStream)const; 
      virtual bool ReadDocumentFromStream(String name, 
                                          istream& inStream); 

The CopyAscii, CopyUnicode, and CopyGeneric methods are called when the user selects the Cut or Copy menu item and the corresponding ready method returns true. The code snippet for it is shown as follows:

      virtual void CopyAscii(vector<String>& textList) const; 
      virtual bool IsCopyAsciiReady() const; 
      virtual void CopyUnicode(vector<String>& textList) const; 
      virtual bool IsCopyUnicodeReady() const; 
      virtual void CopyGeneric(int format, InfoList& infoList)  
                               const; 
      virtual bool IsCopyGenericReady(int format) const; 

In the same way, the PasteAscii, PasteUnicode, and PasteGeneric methods are called when the user selects the Paste menu item and the corresponding ready method returns true:

      virtual void PasteAscii(const vector<String>& textList); 
      virtual bool IsPasteAsciiReady 
                   (const vector<String>& textList) const; 
      virtual void PasteUnicode(const vector<String>& textList); 
      virtual bool IsPasteUnicodeReady 
                   (const vector<String>& textList) const; 
      virtual void PasteGeneric(int format, InfoList& infoList); 
      virtual bool IsPasteGenericReady(int format, 
                                       InfoList& infoList) const; 

The OnDropFile method checks the path list and accepts the drop if exactly one file has the suffix of the document type of the application (set by the constructor):

      void OnDropFile(vector<String> pathList); 
  }; 

In Small Windows, we do not care about the pixel size. Instead, we use logical units that stay the same, regardless of the physical resolution of the screen. We can choose from the following three coordinate systems:

  • LogicalWithScroll: A logical unit is one hundredth of a millimeter, with the current scroll bar settings taken into account. The drawing program and word processor use this system.

  • LogicalWithoutScroll: A logical unit is one hundredth of a millimeter also in this case, but the current scroll bar settings are ignored. The spreadsheet program uses this system.

  • PreviewCoordinate: The client area of the window is set to a fixed logical size when the window is created. This means that the size of the logical units changes when the user changes the window size. The Tetris game and the PreviewDocument class uses this system.

Besides the StandardDocument class, there is also the PrintPreviewDocument, which class that also extends the Document class. It displays one of the pages of a standard document. It is possible for the user to change the page by using the arrow keys and the Page Up and Page Down keys or by using the vertical scroll bar:

  class PrintPreviewDocument : Document { 
    public: 
      PrintPreviewDocument(StandardDocument* parentDocument, 
                  int page = 1, Size pageSize = USLetterPortrait); 
      bool OnKeyDown(WORD key, bool shiftPressed, 
                     bool controlPressed); 
      void OnVerticalScroll(WORD flags, WORD thumbPos = 0); 
      void OnPaint(Graphics& graphics) const; 
  }; 

There are also the simple auxiliary classes:

  • Point: It holds a two-dimensional point (x and y)

  • Size: It holds two-dimensional width and height

  • Rect: It holds the four corners of a rectangle

  • DynamicList: It holds a dynamic list

  • Tree: It holds a tree structure

  • InfoList: It holds a list of generic information that can be transformed into a memory block

The Registry class holds an interface to the Windows Registry, the database in the Windows system that we can use to store values in between the execution of our applications. The Clipboard class holds an interface to the Windows Clipboard, an area in Windows intended for short-term data storage that we can use to store information cut, copied, and pasted between applications.

The Dialog class is designed for customized dialogs. The Control class is the root class for the controls of the dialog. The CheckBox, RadioButton, PushButton, ListBox, and ComboBox classes are classes for the specific controls. The TextField class holds a text field that can be translated to different types by the Converter class. Finally, the PageSetupDialog class extends the Dialog class and implements a dialog with controls and converters.

Summary


This chapter has given an introduction to Small Windows. In Chapter 2, Hello, Small World, we will start to develop applications with Small Windows.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create diverse applications featuring the versatility of Small Windows C++ library
  • Learn about object-oriented programming in Windows and how to develop a large object-oriented class library in C++
  • Understand how to tackle application-specific problems along with acquiring a deep understanding of the workings of Windows architecture

Description

It is critical that modern developers have the right tools to build practical, user-friendly, and efficient applications in order to compete in today’s market. Through hands-on guidance, this book illustrates and demonstrates C++ best practices and the Small Windows object-oriented class library to ease your development of interactive Windows applications. Begin with a focus on high level application development using Small Windows. Learn how to build four real-world applications which focus on the general problems faced when developing graphical applications. Get essential troubleshooting guidance on drawing, spreadsheet, and word processing applications. Finally finish up with a deep dive into the workings of the Small Windows class library, which will give you all the insights you need to build your own object-oriented class library in C++.

What you will learn

[*] Develop advanced real-world applications in Windows [*] Design and implement a graphical object-oriented class library in C++ [*] Get to grips with the workings of the integral aspects of the Win32 API, such as mouse input, drawing, cut-and-paste, file handling, and drop files [*] Identify general problems when developing graphical applications as well as specific problems regarding drawing, spreadsheet, and word processing applications [*] Implement classes, functions, and macros of the object-oriented class library developed in the book and how we implement its functionality by calling functions and macros in the Win32 API

Product Details

Country selected

Publication date : Sep 12, 2016
Length 588 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781786464224
Vendor :
Microsoft
Category :

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Sep 12, 2016
Length 588 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781786464224
Vendor :
Microsoft
Category :

Table of Contents

22 Chapters
C++ Windows Programming Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewer Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Dedication Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. Introduction Chevron down icon Chevron up icon
2. Hello, Small World! Chevron down icon Chevron up icon
3. Building a Tetris Application Chevron down icon Chevron up icon
4. Working with Shapes and Figures Chevron down icon Chevron up icon
5. The Figure Hierarchy Chevron down icon Chevron up icon
6. Building a Word Processor Chevron down icon Chevron up icon
7. Keyboard Input and Character Calculation Chevron down icon Chevron up icon
8. Building a Spreadsheet Application Chevron down icon Chevron up icon
9. Formula Interpretation Chevron down icon Chevron up icon
10. The Framework Chevron down icon Chevron up icon
11. The Document Chevron down icon Chevron up icon
12. The Auxiliary Classes Chevron down icon Chevron up icon
13. The Registry, Clipboard, Standard Dialogs, and Print Preview Chevron down icon Chevron up icon
14. Dialogs, Controls, and Page Setup Chevron down icon Chevron up icon
Rational and Complex Numbers Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.