Creating Controls in Assembler
  • Preface
    • Author
    • Guidelines
  • Introduction
    • Controls & Modern UI Design
    • The HotMenu Quest
  • Our First Control
    • External End-User Functions
    • Internal Functions
  • Registering Our Control
  • Creating Our Control
  • Inside Our Control
    • On Creation: WM_CREATE
    • On Destroying: WM_NCDESTROY
    • Handling Other Messages For Our Control
  • Initializing Our Control
  • Painting Our Control
  • Using Our Control
  • Control Properties
    • The Memory Used To Store Properties
    • Property Structures & Constants
    • Using Macros To Get/Set Properties
    • Using The Win32 API To Get/Set Properties
    • Internal Wrapper Functions
  • Additional Resources
    • RadASM Auto-complete
    • The ModernUI Framework
Powered by GitBook
On this page

Was this helpful?

  1. Our First Control

Internal Functions

PreviousExternal End-User FunctionsNextRegistering Our Control

Last updated 5 years ago

Was this helpful?

Functions that will defined for use internally by the control will be:

_SB_WndProc             PROTO :DWORD, :DWORD, :DWORD, :DWORD
_SB_Init                PROTO :DWORD
_SB_Cleanup             PROTO :DWORD
_SB_Paint               PROTO :DWORD
_SB_PaintBackground     PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
_SB_PaintText           PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
_SB_PaintBorder         PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD

These internal functions are the core functions that handle the main processing and painting of our SimpleButton control.

In addition, we will define a few other internal helper functions for use in this control. In my own development projects I combine the functions next into a library or framework for easy re-use, but I have recreated them here and included them in the SimpleButton.asm file just for ease of use and clarity in covering the features in the control. The internal helper functions are:

__AllocMemProperties     PROTO :DWORD, :DWORD, :DWORD
__FreeMemProperties      PROTO :DWORD, :DWORD
__GetIntProperty         PROTO :DWORD, :DWORD
__SetIntProperty         PROTO :DWORD, :DWORD, :DWORD
__GetExtProperty         PROTO :DWORD, :DWORD
__SetExtProperty         PROTO :DWORD, :DWORD, :DWORD

These functions are briefly covered later on (see ) and some more detail can be found in the section.

Inside Our Control
Control Properties