Buchempfehlung
Mikrocomputertechnik mit Controllern der Atmel AVR-RISC-Familie
Mikrocomputertechnik mit Controllern der Atmel AVR-RISC-Familie
Umfassend, aber leicht verständlich führt dieses Buch in die Programmierung von ATMEL AVR Mikrocontrollern ein. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

inc\win_ext.bi

Uploader:MitgliedEternal_Pain
Datum/Zeit:19.03.2014 04:36:15
Hinweis: Dieser Quelltext ist Bestandteil des Projekts Windows Easy Gui (WEG), zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.

#define DEBUG
#define WIN_INCLUDEALL
#include "fbgfx.bi"
#Include "windows.bi"
#include "win\commctrl.bi"
#include "win\gdiplus.bi"

#Define WinExtFontSize      16
#Define WinExtFontName      "Terminal"

#Define WindowID            "WINDOW"
#Define BitmapID            "BITMAPIMAGE"
#Define GroupBoxID          "GROUPBOX"
#Define SpinBoxID           "SPINBOX"
#Define EditBoxID           "EDITBOX"
#Define CheckBoxID          "CHECKBOX"
#Define ImageComboID        "IMAGECOMBOBOX"
#Define FontSelectComboID   "FONTSELECTCOMBOBOX"
#Define StaticTextID        "STATICTEXT"

Using GDIPLUS

Declare Function WinExtProc(byval h_Wnd as HWND, byval u_Msg as UINT, byval wParam as WPARAM, byval lParam as LPARAM) as LRESULT
Declare Sub Win_Ext_Update(byval break as integer = 0)

Type Item    as Item_Node ptr                  'forward reference

Type Item_Node EXTENDS OBJECT                  'Item Head
    as String       ID
    as String       Title
    as HWND         whwnd

    as Item         NextItem
    as Item         PrevItem

    Declare ABSTRACT Sub Destroy()
End Type

Type Item_List
    as Item         FirstItem
    as Item         LastItem
    as UInteger     CountItem

    Declare Sub AddItem(byref ThisItem as Item)
    Declare Sub DelItem(byref ThisItem as Item)
End Type

Namespace Globals
    Dim as Item_List        ItemList
    Dim as HINSTANCE        hInstance
    Dim as String           ClassName
    Dim as HBRUSH           WinExtBrush
    Dim as HWND             tabstophandle
    Dim as ULONG_PTR        gdiplusToken

    Dim as byte ptr         KeyState
    Dim as HKL              KeyLayout

    Dim as HFONT            hFont
    Dim as LOGFONT          LogFont
End Namespace


Type Item_Window EXTENDS Item_Node
    as String   WindowKey

    Declare Sub Destroy()
End Type

Type Item_Bitmap EXTENDS Item_Node  'Node for static control as SS_BITMAP
    as Item             parent
    as GPBITMAP ptr     Origin      'copy from original Image
    as HBITMAP          Image       'the Image which put on screen
    as Integer          cWidth      'Width of control
    as Integer          cHeight     'Height of control

    Declare Sub Destroy()
End Type

Type Item_Group EXTENDS Item_Node
    as Integer     FontColor
    as Integer     FontBkColor
    as HBRUSH      FontBrush

    Declare Sub Destroy()
End Type

Type Item_Spin EXTENDS Item_Node
    as HWND         shwnd 'handle to UpDown control

    as Integer      minVal
    as Integer      maxVal

    Declare Sub Destroy()
End Type

Type Item_ImageCombo EXTENDS Item_Node
    as HBITMAP ptr  IList
    as Integer      ICount
    as Integer      iState
    as Integer      wSizeMode
    as Integer      hSizeMode
    as Integer      iWidth
    as Integer      iHeight

    Declare Sub Destroy()
End Type

Type Item_FontSelectCombo EXTENDS Item_Node
    as Integer      wSizeMode
    as Integer      hSizeMode
    as Integer      iWidth
    as Integer      iHeight
    as Integer      iState
    as Integer      iCount

    Declare Sub Destroy()
End Type

Type Item_StaticText EXTENDS Item_Node
    as HFONT        Font
    as Integer      FColor
    as Integer      BColor
    as HBRUSH       BckBrush
    Declare Sub Destroy()
End Type