Also, Camlorn, I would like to know where you found out that PB was C. What pot were you smoking - or what alcohol were you drinking when you wrote that post? It sounds like you were drunk or jacked up because I know that you wouldn't write a retort like that if you were in a normal state or normal mindset.
Now, I'm going to add to Steve's post by saying this: I know that all of PB's libraries are not C. Here's how:
The PB library maker says so. I quote this from its documentation:
PureBasic is a complete programming language which uses third party libraries (called 'PureLibraries' to avoid conflit with systems libraries) to ease the programmer's life. These libraries can be wrote in ASM (with NAsm, FAsm etc.) or in C (with VisualC++, etc.).
Now, that said ASM or C. I can probably bet you 100 percent that every PureLibrary to date has been written in ASM. Some of them might be written in C, but that still doesn't mean you are writing something using C. This situation is just like any programming situation: Everything goes all the way back to C/C++. Every language does some sort of source-to-souce translation - from that language to another language and then to executable code - but that still doesn't mean you wrote it in C. When you write these things, please back them up.
As an example, let's examine some of the examples.
I'll start with the Visual C PureLibs, the SampleGadget one:
/*
*/
#include "ListIconSampleGadget.h"
/* Usage of the Data fields in the Gadget Structure:
* [0] length of largest string in the Gadget
* [1] pointer to PB_GadgetImageList for this gadget (0 if no images yet)
* [2] GridLine Color
* [3] internal flags (not Gadget flags), to know if custom colors are set etc
*/
#define DATA_MaxString 0
#define DATA_ImageList 1
#define DATA_GridColor 2
#define DATA_InternalFlags 3
// values for the InternalFlags field
//
#define FLAG_FrontColorSet (1)
#define FLAG_BackColorSet (1 << 1)
#define FLAG_DisplayGrid (1 << 2)
#define FLAG_ThreeStateMode (1 << 3) // 3state mode is on
#define FLAG_ThreeStateBlocked (1 << 4) // block state change in 3state mode
/* Storage of individual cell colors + user data for each item.
* This data is stored in a memoryblock which is stored in lParam of each item struct.
* It is only allocated when needed, so always check the lParam for 0!
* If the memory exists though, it has the number of cells inside as there are columns in the gadget.
*/
typedef struct
{
int FrontColor; // colors are stored as (ColorValue+1), so 0 means no color stored yet
int BackColor;
} PB_ListIconCell;
typedef struct
{
integer UserData;
PB_ListIconCell Cells[];
} PB_ListIconItem;
// only the base struct, not the following cells
#define SIZEOF_ListIconItem sizeof(integer)
static PB_GadgetVT ListIconVT;
static int Initialized;
static int OriginalFrontColor, OriginalBackColor;
static WNDPROC StandardListIconCallback;
// -----------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_Callback(PB_Gadget *Gadget, HWND Window, UINT Message, WPARAM wParam, LPARAM lParam)
{
integer Result = PB_EventNotProcessed;
if (Message == WM_NOTIFY) // Handle any message here
{
Result = 0; // set Result to 0, if you don't want the event to be populated to next handlers
}
return Result;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetColor(PB_Gadget *Gadget, int ColorType, int Color)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_GetGadgetColor(PB_Gadget *Gadget, int ColorType)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetItemColor2(PB_Gadget *Gadget, int Item, int ColorType, int Color, int Column)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(int) ListIcon_GetGadgetItemColor2(PB_Gadget *Gadget, int Item, int ColorType, int Column)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_FreeGadget(PB_Gadget *Gadget)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_FillColumns(PB_Gadget *Gadget, int Position, TCHAR *Cursor)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_AddGadgetItem2(PB_Gadget *Gadget, int Position, const TCHAR *Text, int *Image)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(int) ListIcon_CountGadgetItems(PB_Gadget *Gadget)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_ClearGadgetItems(PB_Gadget *Gadget)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_RemoveGadgetItem(PB_Gadget *Gadget, int Position)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetState(PB_Gadget *Gadget, integer Index)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_GetGadgetItemText(PB_Gadget *Gadget, int ItemID, int ColumnID, int PreviousStringPosition)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_GetGadgetState(PB_Gadget *Gadget)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_GetGadgetText(PB_Gadget *Gadget, int PreviousStringPosition)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetText(PB_Gadget *Gadget, const TCHAR *Text)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(int) ListIcon_GetGadgetItemState(PB_Gadget *Gadget, int ItemID)
{
return 0;
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetItemState(PB_Gadget *Gadget, int ItemID, int State)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetItemText(PB_Gadget *Gadget, int ItemID, const TCHAR *Text, int ColumnID)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_AddGadgetColumn(PB_Gadget *Gadget, int Position, const TCHAR *Text, int Width)
{
}
// ---------------------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_RemoveGadgetColumn(PB_Gadget *Gadget, int Position)
{
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetItemData(PB_Gadget *Gadget, int Item, integer Value)
{
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_GetGadgetItemData(PB_Gadget *Gadget, int Item)
{
return 0;
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetItemAttribute2(PB_Gadget *Gadget, int Item, int Attribute, int Value, int Column)
{
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(int) ListIcon_GetGadgetItemAttribute2(PB_Gadget *Gadget, int Item, int Attribute, int Column)
{
return 0;
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(integer) ListIcon_GetGadgetAttribute(PB_Gadget *Gadget, int Attribute)
{
return 0;
}
// -----------------------------------------------------------------------------
static M_GADGETVIRTUAL(void) ListIcon_SetGadgetAttribute(PB_Gadget *Gadget, int Attribute, int Value)
{
}
// -----------------------------------------------------------------------------
static LRESULT CALLBACK CustomCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_NCDESTROY:
RemoveProp(hWnd, PB_RectTopProperty);
RemoveProp(hWnd, PB_RectBottomProperty);
break;
case WM_SETFONT:
RemoveProp(hWnd, PB_RectTopProperty); // It's this one which triggers the new measure for the empty list grid
break;
}
return CallWindowProc(StandardListIconCallback, hWnd, message, wParam, lParam);
}
// -----------------------------------------------------------------------------
M_PBFUNCTION(HWND) PB_ListIconSampleGadget2(integer GadgetID, int x, int y, int Width, int Height, const TCHAR *Title, int ColumnWidth, int Flags)
{
PB_GadgetGlobals *Globals = PB_Object_GetThreadMemory(PB_Gadget_Globals);
HWND Result;
PB_Gadget *Gadget;
int Mask = WS_TABSTOP | WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SHAREIMAGELISTS | Flags;
int ExMask = LVS_EX_DOUBLEBUFFER; // We do use double buffered listview (needs XP or above, but will be ignored on previous Windows)
HIMAGELIST ImageList;
if ((Flags & LVS_SINGLESEL) == 0) // Multiselection emulation
Mask |= LVS_SINGLESEL;
else
Mask &= ~LVS_SINGLESEL;
// We don't use 'LVS_EX_GRIDLINES' flags because of this nasty Windows bug: http://support.microsoft.com/kb/813791 (http://www.purebasic.fr/english/viewtopic.php?t=32912)
// As we have our own ownerdraw line routine, use it all the time.
//
// if (Flags & WS_TABSTOP)
// ExMask |= LVS_EX_GRIDLINES;
if (Flags & WS_CHILD)
ExMask |= LVS_EX_FULLROWSELECT;
if (Flags & WS_VISIBLE)
ExMask |= LVS_EX_HEADERDRAGDROP;
if (Flags & LVS_REPORT)
ExMask |= LVS_EX_CHECKBOXES;
// Useful: LVS_NOSORTHEADER (no clickable titles)
//
if (Result = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, 0, Mask, x, y, Width, Height, Globals->CurrentWindow, (HMENU)0, PB_Instance, 0))
{
// done after window creation to get the default colors...
if (!Initialized)
{
PB_Gadget_GetCommonControlsVersion(); // make sure its called as the custom grid drawing needs to know the skin mode
OriginalFrontColor = ListView_GetTextColor(Result);
OriginalBackColor = ListView_GetBkColor(Result);
ZeroMemory(&ListIconVT, sizeof(PB_GadgetVT));
ListIconVT.GadgetType = PB_GadgetType_ListIcon;
ListIconVT.SizeOf = sizeof(PB_GadgetVT);
ListIconVT.GadgetCallback = ListIcon_Callback;
ListIconVT.FreeGadget = ListIcon_FreeGadget;
ListIconVT.AddGadgetColumn = ListIcon_AddGadgetColumn;
ListIconVT.AddGadgetItem2 = ListIcon_AddGadgetItem2;
ListIconVT.GetGadgetState = ListIcon_GetGadgetState;
ListIconVT.SetGadgetState = ListIcon_SetGadgetState;
ListIconVT.GetGadgetText = ListIcon_GetGadgetText;
ListIconVT.SetGadgetText = ListIcon_SetGadgetText;
ListIconVT.CountGadgetItems = ListIcon_CountGadgetItems;
ListIconVT.ClearGadgetItems = ListIcon_ClearGadgetItems;
ListIconVT.RemoveGadgetItem = ListIcon_RemoveGadgetItem;
ListIconVT.GetGadgetItemState = ListIcon_GetGadgetItemState;
ListIconVT.SetGadgetItemState = ListIcon_SetGadgetItemState;
ListIconVT.GetGadgetItemText = ListIcon_GetGadgetItemText;
ListIconVT.SetGadgetItemText = ListIcon_SetGadgetItemText;
ListIconVT.RemoveGadgetColumn = ListIcon_RemoveGadgetColumn;
ListIconVT.SetGadgetColor = ListIcon_SetGadgetColor;
ListIconVT.GetGadgetColor = ListIcon_GetGadgetColor;
ListIconVT.SetGadgetItemColor2 = ListIcon_SetGadgetItemColor2;
ListIconVT.GetGadgetItemColor2 = ListIcon_GetGadgetItemColor2;
ListIconVT.SetGadgetItemData = ListIcon_SetGadgetItemData;
ListIconVT.GetGadgetItemData = ListIcon_GetGadgetItemData;
ListIconVT.SetGadgetAttribute = ListIcon_SetGadgetAttribute;
ListIconVT.GetGadgetAttribute = ListIcon_GetGadgetAttribute;
ListIconVT.SetGadgetItemAttribute2 = ListIcon_SetGadgetItemAttribute2;
ListIconVT.GetGadgetItemAttribute2 = ListIcon_GetGadgetItemAttribute2;
Initialized = 1;
}
SendMessage(Result, LVM_SETEXTENDEDLISTVIEWSTYLE, ExMask, ExMask);
StandardListIconCallback = (WNDPROC)SetWindowLongPtr(Result, GWLP_WNDPROC, (LONG_PTR)CustomCallback);
Gadget = PB_Gadget_GetOrAllocateID(GadgetID);
Gadget->Data[DATA_GridColor] = -1;
if (Flags & WS_TABSTOP)
Gadget->Data[DATA_InternalFlags] |= FLAG_DisplayGrid; // Uses the colormask as storage, to avoid allocating a 'prop' only for that flag
// 3state mode is only on when both flags are set
//
if ((Flags & LVS_REPORT) && (Flags & LVS_SHAREIMAGELISTS))
{
// The blocked flag disallows the user from selecting the inbetween state himself
// (to match the behavior of the CheckBoxGadget)
//
Gadget->Data[DATA_InternalFlags] |= FLAG_ThreeStateMode|FLAG_ThreeStateBlocked;
if (ImageList = ListView_GetImageList(Result, LVSIL_STATE))
PB_Gadget_AddInbetweenImage(Result, ImageList);
}
Result = PB_Gadget_RegisterGadget(GadgetID, Gadget, Result, &ListIconVT);
ListIcon_AddGadgetColumn(Gadget, 0, Title, ColumnWidth);
}
return Result;
}
M_PBFUNCTION(HWND) PB_ListIconSampleGadget(integer GadgetID, int x, int y, int Width, int Height, const TCHAR *Title, int ColumnWidth)
{
return PB_ListIconSampleGadget2(GadgetID, x, y, Width, Height, Title, ColumnWidth, 0);
}
Here's the header:
/*
* ListIconGadget() command for PureBasic
*/
#include <Gadget/Gadget.h>
// Define the unicode functions
#define PB_ListIconSampleGadget M_UnicodeFunction(PB_ListIconSampleGadget)
#define PB_ListIconSampleGadget2 M_UnicodeFunction(PB_ListIconSampleGadget2)
Here's the desc:
; Langage used to code th library: ASM or C
;
C
; Number of windows DLL than the library need
;
0
; Library type (Can be OBJ or LIB)
;
LIB
; Number of PureBasic library needed by the library
;
1
Gadget
; Help directory name
;
MyGadget
;
; Library functions (FunctionName, Arg1, Arg2, ...)
;
ListIconSampleGadget, Long, Word, Word, Word, Word, String, Long, [Long], (#Gadget, x, y, Width, Height, Title$, TitleWidth [, Flags]) - Create a ListIcon gadget in the current GadgetList.
Long | Unicode
Finally, the PB file:
Enumeration
#GADGET_ListIconSample
EndEnumeration
If OpenWindow(0, 0, 0, 640, 480, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "Hello")
CreateGadgetList(WindowID(0))
ListIconSampleGadget(#GADGET_ListIconSample, 0, 0, 200, 250, "Hello", 100, 0)
AddGadgetItem(#GADGET_ListIconSample, -1, "Hello")
GetGadgetColor(#GADGET_ListIconSample, 0)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Here's a combo box gadget in assembly:
;
; ComboBox assembly example for gadget interface
;
; (c) 2002 Fantaisie Software
;
%macro APIDeclareA 2
EXTERN _%1A@%2
%define %1 _%1A@%2
%endmacro
%macro APIDeclare 2
EXTERN _%1@%2
%define %1 _%1@%2
%endmacro
%macro PBFunction 1
GLOBAL PB_%1
PB_%1:
%endmacro
EXTERN PB_MemoryBase
EXTERN _PB_Instance
EXTERN PB_StringBase
EXTERN _PB_Gadget_ObjectsArea
EXTERN _PB_Gadget_CreateGadget
EXTERN _PB_Gadget_CurrentObject
EXTERN _PB_Gadget_DefaultFont
EXTERN PB_Gadget_CheckReAllocate
APIDeclareA SendMessage,16
APIDeclareA CreateWindowEx,48
STRUC VT
.FreeGadget RESD 1
.GetGadgetState RESD 1
.SetGadgetState RESD 1
.GetGadgetText RESD 1
.SetGadgetText RESD 1
.AddGadgetItem RESD 1
.AddGadgetItem2 RESD 1
.RemoveGadgetItem RESD 1
.ClearGadgetItemList RESD 1
.ResizeGadget RESD 1
.CountGadgetItems RESD 1
.GetGadgetItemState RESD 1
.SetGadgetItemState RESD 1
.GetGadgetItemText RESD 1
.SetGadgetItemText RESD 1
ENDSTRUC
CB_ADDSTRING equ 143h
CB_GETCURSEL equ 147h
CB_RESETCONTENT equ 14Bh
CB_INSERTSTRING equ 14Ah
CB_DELETESTRING equ 144h
CB_SETCURSEL equ 14Eh
CB_GETCOUNT equ 146h
CB_GETLBTEXT equ 148h
CB_SELECTSTRING equ 14Dh
CBS_SIMPLE equ 1h
CBS_DROPDOWN equ 2h
CBS_DROPDOWNLIST equ 3h
CBS_HASSTRINGS equ 200h
WS_CHILD equ 40000000h
WS_VISIBLE equ 10000000h
WS_TABSTOP equ 10000h
WS_BORDER equ 800000h
WS_VSCROLL equ 200000h
WS_HSCROLL equ 100000h
WS_CLIPSIBLINGS equ 4000000h
WS_GROUP equ 20000h
WS_EX_CLIENTEDGE equ 00000200h
WS_EX_WINDOWEDGE equ 00000100h
WS_EX_STATICEDGE equ 00020000h
WS_EX_TRANSPARENT equ 20h
WM_SETFONT equ 30h
SEGMENT .text USE32 CLASS=CODE
PBFunction ComboBoxGadgetTest
POP ecx
POP dword [arg1]
POP dword [arg2]
POP dword [arg3]
POP dword [arg4]
MOV dword [arg5],0 ; Name
PUSH ecx
MOV ecx,WS_CHILD | WS_VISIBLE | WS_BORDER | CBS_HASSTRINGS | WS_GROUP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST
MOV edx,WS_EX_CLIENTEDGE
PB_ComboBoxGadgetReal:
MOV dword [ComboBoxVT+VT.GetGadgetState], ComboBox_GetGadgetState
MOV dword [ComboBoxVT+VT.SetGadgetState], ComboBox_SetGadgetState
MOV dword [ComboBoxVT+VT.AddGadgetItem] , ComboBox_AddGadgetItem
MOV dword [ComboBoxVT+VT.GetGadgetText] , ComboBox_GetGadgetText
MOV dword [ComboBoxVT+VT.SetGadgetText] , ComboBox_SetGadgetText
MOV dword [ComboBoxVT+VT.ClearGadgetItemList], ComboBox_ClearGadgetItemList
MOV dword [ComboBoxVT+VT.CountGadgetItems], ComboBox_CountGadgetItems
MOV dword [ComboBoxVT+VT.RemoveGadgetItem], ComboBox_RemoveGadgetItem
CALL PB_Gadget_CheckReAllocate
MOV [ActualNumber],eax
PUSH dword 0
PUSH dword [_PB_Instance]
PUSH eax ; Our ID (was Menu...)
PUSH dword [_PB_Gadget_CurrentObject] ; ParentWindow
PUSH dword [arg4] ; Height
PUSH dword [arg3] ; Width
PUSH dword [arg2] ; y
PUSH dword [arg1] ; x
PUSH ecx
PUSH dword [arg5] ; Name
PUSH dword ComboBoxClass ; Template class..
PUSH edx
CALL CreateWindowEx
MOV ecx,eax
PUSH eax ; Save eax for future use
MOV eax,[ActualNumber]
MOV edx,[_PB_Gadget_ObjectsArea] ; Point on the right entry in the memory bank to store our new gadget infos
SHL eax,4 ; eax*16
ADD edx,eax ;
MOV [edx],ecx
MOV dword [edx+4], ComboBoxVT ; Store the gadget associated class for fast GetGadgetState()
PUSH dword 1 ; Set the default Windows font for the gadgets...
PUSH dword [_PB_Gadget_DefaultFont]
PUSH dword WM_SETFONT ;
PUSH ecx ;
CALL SendMessage ;
POP eax ; Return the Gadget address in 'eax'
RET
PBFunction ComboBoxGadgetTest2
POP ecx
POP dword [arg1]
POP dword [arg2]
POP dword [arg3]
POP dword [arg4]
MOV dword [arg5],0 ; Name
POP dword [Flags]
PUSH ecx
MOV ecx, [Flags]
AND ecx, CBS_DROPDOWN
JZ CBG_NotEditable
MOV ecx, [Flags]
JMP CBG_Next
CBG_NotEditable:
MOV ecx, [Flags]
OR ecx, CBS_DROPDOWNLIST
CBG_Next:
OR ecx, WS_CHILD | WS_VISIBLE | WS_BORDER| CBS_HASSTRINGS | WS_GROUP | WS_VSCROLL | WS_TABSTOP
MOV edx, WS_EX_CLIENTEDGE
JMP PB_ComboBoxGadgetReal
; (#Gadget, Position, String$)
;
ComboBox_AddGadgetItem:
PUSH dword [esp+12] ; String to add (Position on the stack)
PUSH dword [esp+12] ; Position
PUSH dword CB_INSERTSTRING
PUSH dword [esp+16] ; Gadget
CALL SendMessage
RET 12
; (#Gadget)
;
ComboBox_ClearGadgetItemList:
PUSH dword 0
PUSH dword 0
PUSH dword CB_RESETCONTENT
PUSH dword [esp+16]
CALL SendMessage
RET 4
; (#Gadget)
;
ComboBox_CountGadgetItems:
PUSH dword 0
PUSH dword 0
PUSH dword CB_GETCOUNT
PUSH dword [esp+16] ; Gadget
CALL SendMessage
RET 4
; (#Gadget)
;
ComboBox_GetGadgetState:
PUSH dword 0 ;
PUSH dword 0 ;
PUSH dword CB_GETCURSEL ;
PUSH dword [esp+16] ; The gadget address...
CALL SendMessage ; Result in eax is the gadget result state
RET 4
; (#Gadget)
;
ComboBox_GetGadgetText:
PUSH dword 0
PUSH dword 0
PUSH dword CB_GETCURSEL
PUSH dword [esp+16]
CALL SendMessage ; Get the current select indes in 'eax'
CMP eax,-1
JE ComboBox_GGT_End
PUSH dword [PB_StringBase]
PUSH eax
PUSH dword CB_GETLBTEXT ; CB_GETTEXT or LB_GETTEXT, depending of the gadget type
PUSH dword [esp+16]
CALL SendMessage
CMP eax,-1
JE ComboBox_GGT_End
ADD dword [PB_StringBase], eax
ComboBox_GGT_End:
MOV eax, [PB_StringBase]
MOV byte [eax], 0
RET 4
; (#Gadget, Position)
;
ComboBox_RemoveGadgetItem:
PUSH dword 0
PUSH dword [esp+12] ;
PUSH dword CB_DELETESTRING ;
PUSH dword [esp+16] ; The gadget address...
CALL SendMessage ;
RET 8
; (#Gadget, State)
;
ComboBox_SetGadgetState:
PUSH dword 0
PUSH dword [esp+12] ;
PUSH dword CB_SETCURSEL ;
PUSH dword [esp+16] ; The gadget address...
CALL SendMessage ; Result in eax is 1 if the checkbox is pressed !
RET 8
; (#Gadget, String$)
;
ComboBox_SetGadgetText:
PUSH dword [esp+8] ;
PUSH dword 0
PUSH dword CB_SELECTSTRING ;
PUSH dword [esp+16] ; The gadget address...
CALL SendMessage ;
RET 8
SEGMENT .data CLASS=DATA
ComboBoxClass: db "COMBOBOX",0
SEGMENT .bss CLASS=DATA
Flags: RESD 1
arg1: RESD 1
arg2: RESD 1
arg3: RESD 1
arg4: RESD 1
arg5: RESD 1
arg6: RESD 1
ActualNumber RESD 1
; VirtualTable for Combobox
;
ComboBoxVT: RESD 15
So, you are partially right - some libs are written in C. But you are still not - never - coding in C when using PureBASIC. Remember that just because a library is written in c, you are not actually coding in C. You're coding in that language - and that language only - unless your able to make a hybrid source code set - more than one language makes up the project.
"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." — Charles Babbage.
My Github