<commit_before>/*!
 * \file dcxtrackbar.cpp
 * \brief blah
 *
 * blah
 *
 * \author <NAME> ( clickhere at scriptsdb dot org )
 * \version 1.0
 *
 * \b Revisions
 *
 *  ScriptsDB.org - 2006
 */

#include "dcxtrackbar.h"
#include "dcxdialog.h"

/*!
 * \brief Constructor
 *
 * \param ID Control ID
 * \param p_Dialog Parent DcxDialog Object
 * \param rc Window Rectangle
 * \param styles Window Style Tokenized List
 */

DcxTrackBar::DcxTrackBar( UINT ID, DcxDialog * p_Dialog, RECT * rc, TString & styles ) 
: DcxControl( ID, p_Dialog ) {

  LONG Styles = 0, ExStyles = 0;
  BOOL bNoTheme = FALSE;
  this->parseControlStyles( styles, &Styles, &ExStyles, &bNoTheme );

  this->m_Hwnd = CreateWindowEx(	
    0,
    DCX_TRACKBARCLASS,
    NULL,
    WS_CHILD | WS_VISIBLE | Styles, 
    rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top,
    p_Dialog->getHwnd( ),
    (HMENU) ID,
    GetModuleHandle(NULL), 
    NULL);

  if ( bNoTheme )
    SetWindowTheme( this->m_Hwnd , L" ", L" " );

	this->m_hbmp[TBBMP_BACK] = NULL;
	this->m_hbmp[TBBMP_THUMB] = NULL;
	this->m_hbmp[TBBMP_THUMBDRAG] = NULL;
	this->m_hbmp[TBBMP_CHANNEL] = NULL;
	this->m_colTransparent = -1;

  this->setControlFont( (HFONT) GetStockObject( DEFAULT_GUI_FONT ), FALSE );
  this->registreDefaultWindowProc( );
  SetProp( this->m_Hwnd, "dcx_cthis", (HANDLE) this );
}

/*!
 * \brief Constructor
 *
 * \param ID Control ID
 * \param p_Dialog Parent DcxDialog Object
 * \param mParentHwnd Parent Window Handle
 * \param rc Window Rectangle
 * \param styles Window Style Tokenized List
 */

DcxTrackBar::DcxTrackBar( UINT ID, DcxDialog * p_Dialog, HWND mParentHwnd, RECT * rc, TString & styles )
: DcxControl( ID, p_Dialog ) {

  LONG Styles = 0, ExStyles = 0;
  BOOL bNoTheme = FALSE;
  this->parseControlStyles( styles, &Styles, &ExStyles, &bNoTheme );

  this->m_Hwnd = CreateWindowEx(	
    0,
    DCX_TRACKBARCLASS,
    NULL,
    WS_CHILD | WS_VISIBLE | Styles, 
    rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top,
    mParentHwnd,
    (HMENU) ID,
    GetModuleHandle(NULL), 
    NULL);

  if ( bNoTheme )
    SetWindowTheme( this->m_Hwnd , L" ", L" " );

	this->m_hbmp[TBBMP_BACK] = NULL;
	this->m_hbmp[TBBMP_THUMB] = NULL;
	this->m_hbmp[TBBMP_THUMBDRAG] = NULL;
	this->m_hbmp[TBBMP_CHANNEL] = NULL;
	this->m_colTransparent = -1;

  this->setControlFont( (HFONT) GetStockObject( DEFAULT_GUI_FONT ), FALSE );
  this->registreDefaultWindowProc( );
  SetProp( this->m_Hwnd, "dcx_cthis", (HANDLE) this );
}

/*!
 * \brief blah
 *
 * blah
 */

DcxTrackBar::~DcxTrackBar( ) {<commit_msg>- cleaned up memory for bitmaps for trackbar upon delete<commit_after>/*!
 * \file dcxtrackbar.cpp
 * \brief blah
 *
 * blah
 *
 * \author <NAME> ( clickhere at scriptsdb dot org )
 * \version 1.0
 *
 * \b Revisions
 *
 *  ScriptsDB.org - 2006
 */

#include "dcxtrackbar.h"
#include "dcxdialog.h"

/*!
 * \brief Constructor
 *
 * \param ID Control ID
 * \param p_Dialog Parent DcxDialog Object
 * \param rc Window Rectangle
 * \param styles Window Style Tokenized List
 */

DcxTrackBar::DcxTrackBar( UINT ID, DcxDialog * p_Dialog, RECT * rc, TString & styles ) 
: DcxControl( ID, p_Dialog ) {

  LONG Styles = 0, ExStyles = 0;
  BOOL bNoTheme = FALSE;
  this->parseControlStyles( styles, &Styles, &ExStyles, &bNoTheme );

  this->m_Hwnd = CreateWindowEx(	
    0,
    DCX_TRACKBARCLASS,
    NULL,
    WS_CHILD | WS_VISIBLE | Styles, 
    rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top,
    p_Dialog->getHwnd( ),
    (HMENU) ID,
    GetModuleHandle(NULL), 
    NULL);

  if ( bNoTheme )
    SetWindowTheme( this->m_Hwnd , L" ", L" " );

	this->m_hbmp[TBBMP_BACK] = NULL;
	this->m_hbmp[TBBMP_THUMB] = NULL;
	this->m_hbmp[TBBMP_THUMBDRAG] = NULL;
	this->m_hbmp[TBBMP_CHANNEL] = NULL;
	this->m_colTransparent = -1;

  this->setControlFont( (HFONT) GetStockObject( DEFAULT_GUI_FONT ), FALSE );
  this->registreDefaultWindowProc( );
  SetProp( this->m_Hwnd, "dcx_cthis", (HANDLE) this );
}

/*!
 * \brief Constructor
 *
 * \param ID Control ID
 * \param p_Dialog Parent DcxDialog Object
 * \param mParentHwnd Parent Window Handle
 * \param rc Window Rectangle
 * \param styles Window Style Tokenized List
 */

DcxTrackBar::DcxTrackBar( UINT ID, DcxDialog * p_Dialog, HWND mParentHwnd, RECT * rc, TString & styles )
: DcxControl( ID, p_Dialog ) {

  LONG Styles = 0, ExStyles = 0;
  BOOL bNoTheme = FALSE;
  this->parseControlStyles( styles, &Styles, &ExStyles, &bNoTheme );

  this->m_Hwnd = CreateWindowEx(	
    0,
    DCX_TRACKBARCLASS,
    NULL,
    WS_CHILD | WS_VISIBLE | Styles, 
    rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top,
    mParentHwnd,
    (HMENU) ID,
    GetModuleHandle(NULL), 
    NULL);

  if ( bNoTheme )
    SetWindowTheme( this->m_Hwnd , L" ", L" " );

	this->m_hbmp[TBBMP_BACK] = NULL;
	this->m_hbmp[TBBMP_THUMB] = NULL;
	this->m_hbmp[TBBMP_THUMBDRAG] = NULL;
	this->m_hbmp[TBBMP_CHANNEL] = NULL;
	this->m_colTransparent = -1;

  this->setControlFont( (HFONT) GetStockObject( DEFAULT_GUI_FONT ), FALSE );
  this->registreDefaultWindowProc( );
  SetProp( this->m_Hwnd, "dcx_cthis", (HANDLE) this );
}

/*!
 * \brief blah
 *
 * blah
 */

DcxTrackBar::~DcxTrackBar( ) {
	if (this->m_hbmp[TBBMP_BACK] != NULL)
		DeleteObject(this->m_hbmp[TBBMP_BACK]);
	if (this->m_hbmp[TBBMP_THUMB] != NULL)
		DeleteObject(this->m_hbmp[TBBMP_THUMB]);
	if (this->m_hbmp[TBBMP_THUMBDRAG] != NULL)
		DeleteObject(this->m_hbmp[TBBMP_THUMBDRAG]);
	if (this->m_hbmp[TBBMP_CHANNEL] != NULL)
		DeleteObject(this->m_hbmp[TBBMP_CHANNEL]);
{'fraction_non_alphanumeric': 0.14482010486349667, 'fraction_numerical': 0.005062375700596637, 'mean_word_length': 3.637049455155071, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3270906', 'n_tokens_mistral': 2308, 'n_tokens_neox': 2200, 'n_words': 461}