Ok, I added in a little bit on Treeviews. Heres the updates:
Commands.cpp
#include "commands.h"
// Put DLLCMDC in front of all the functions you want to be exported "clearly"
// in the dll. Put DLLCMD in front of all the functions you want to be exported
// "mangled" in the dll.
// "clearly" - The function name will appear as it does in the editor.
// "mangled" - The function name might appear like this "_Z14MyFunctionii", in visual c++ "?MyFunction@YAXHH"
// Return the DBP HWND (Window Handle)
DLLCMDC HWND dbpHwnd(void)
{
return gCore->hWnd;
}
// Return the DBP HINSTANCE (Window Instance (Maybe it's program instance))
DLLCMDC HINSTANCE dbpHInstance(void)
{
return gCore->hInstance;
}
// Return the DBP HICON (Icon in the window)
DLLCMDC HICON dbpHIcon(void)
{
return gCore->hAppIcon;
}
// Return the desktop's HWND
DLLCMDC HWND desktopHwnd(void)
{
return HWND_DESKTOP;
}
// Create a window
DLLCMDC HWND gui_makeWindow(int width, int height, LPSTR text, HWND parent)
{
HINSTANCE myInstance = dbpHInstance();
char szClassName[]="WindowsApp";
WNDCLASSEX wClass;
/* The Window structure */
wClass.hInstance = myInstance;
wClass.lpszClassName = szClassName;
wClass.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wClass.style = CS_DBLCLKS; /* Catch double-clicks */
wClass.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wClass.hIcon = LoadIcon (NULL, IDI_WINLOGO);
wClass.hIconSm = LoadIcon (NULL, IDI_WINLOGO);
wClass.hCursor = LoadCursor (NULL, IDC_ARROW);
wClass.lpszMenuName = NULL; /* No menu */
wClass.cbClsExtra = 0; /* No extra bytes after the window class */
wClass.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
RegisterClassEx (&wClass);
HWND prnt=HWND_DESKTOP;
HINSTANCE hMyInstance=myInstance;
if (parent != NULL) { prnt=parent; }
/* The class is registered, let's create the program*/
HWND wHandle = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
text, /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
width, height, /* The window's width and height */
prnt, /* The window is a child-window to desktop */
NULL, /* No menu */
hMyInstance, /* Program Instance handler */
NULL); /* No Window Creation data */
/* Make the window visible on the screen */
ShowWindow (wHandle, true);
return wHandle;
}
// Destroy a window
DLLCMDC void gui_destroyWindow(HWND hWnd)
{
DestroyWindow(hWnd);
}
// Retrieve the X Position of a window
DLLCMDC int gui_getWindowX(HWND wHandle)
{
RECT winRect;
GetWindowRect(wHandle,&winRect);
return (int)winRect.left;
}
// Retrieve the Y Position of a window
DLLCMDC int gui_getWindowY(HWND wHandle)
{
RECT winRect;
GetWindowRect(wHandle,&winRect);
return (int)winRect.top;
}
// Retrieve the Width of a window
DLLCMDC int gui_getWindowWidth(HWND wHandle)
{
RECT winRect;
GetWindowRect(wHandle,&winRect);
return (int)winRect.right-winRect.left;
}
// Retrieve the Height of a window
DLLCMDC int gui_getWindowHeight(HWND wHandle)
{
RECT winRect;
GetWindowRect(wHandle,&winRect);
return (int)winRect.bottom-winRect.top;
}
// Show a window (More control in this function)
DLLCMDC void gui_showWindowEx(HWND wHandle, bool show)
{
ShowWindow(wHandle, show);
}
// Simply show a window
DLLCMDC void gui_showWindow(HWND wHandle)
{
ShowWindow(wHandle, true);
}
// Simply hide a window
DLLCMDC void gui_hideWindow(HWND wHandle)
{
ShowWindow(wHandle, false);
}
// Enable a window
DLLCMDC void gui_enableWindow(HWND wHandle)
{
EnableWindow(wHandle, true);
}
// Disable a window
DLLCMDC void gui_disableWindow(HWND wHandle)
{
EnableWindow(wHandle, false);
}
// Retrieve rather a window is enabled, or disabled.
DLLCMDC int gui_windowEnabled(HWND wHandle)
{
return (int)IsWindowEnabled(wHandle);
}
// Position a window
DLLCMDC void gui_positionWindow(HWND wHandle, int x, int y)
{
int width=gui_getWindowWidth(wHandle);
int height=gui_getWindowHeight(wHandle);
MoveWindow(wHandle,x,y,width,height,TRUE);
}
// Resize a window
DLLCMDC void gui_resizeWindow(HWND wHandle, int width, int height)
{
int x=gui_getWindowX(wHandle);
int y=gui_getWindowY(wHandle);
MoveWindow(wHandle,x,y,width,height,TRUE);
}
// Set a window's text
DLLCMDC void gui_setWindowText(HWND hWnd, LPSTR text="")
{
SetWindowTextA(hWnd,(LPCSTR)text);
}
void msgbox(LPSTR text)
{
MessageBoxA(NULL,text,"Message",MB_OK);
}
// Retrieve a string table from a DLL, very usefull
DLLCMDC HINSTANCE loadDll(LPSTR file)
{
HINSTANCE hInst = LoadLibrary(file);
return hInst;
}
// Free a library
DLLCMDC void destroyDll(HINSTANCE hInst)
{
FreeLibrary(hInst);
}
// Retrieve a string table string from a library
DLLCMDC DWORD dllResourceString(HINSTANCE hInst, int id)
{
char szBuffer[256];
LoadString(hInst, id, szBuffer, sizeof(szBuffer));
LPSTR szReturn = (LPSTR)szBuffer;
return dbpstring(szReturn);
}
// Retrieve the handle to the window which has focus to the keyboard
DLLCMDC HWND gui_getFocusWindow(void)
{
return GetFocus();
}
// Get if a window (preferably, a button) was pushed
DLLCMDC int gui_buttonPressed(HWND hWnd)
{
int result=0;
LRESULT lResult = SendMessage(hWnd, (UINT)BM_GETSTATE,0,0);
if (lResult==BST_PUSHED)
{ result=1; }
return result;
}
// Get if a window (preferably a checkbox, or a radiobox) is checked
DLLCMDC int gui_boxChecked(HWND hWnd)
{
int result=0;
LRESULT lResult = SendMessage(hWnd, (UINT)BM_GETSTATE,0,0);
if (lResult==BST_CHECKED)
{ result=1; }
return result;
}
// Create a button
DLLCMDC HWND gui_makeButton(LPSTR text, int x, int y, int width, int height, HWND parent)
{
HWND hWnd = CreateWindow("BUTTON", text, WS_CHILD | WS_VISIBLE| BS_TEXT, x, y, width, height, parent, NULL, dbpHInstance(), NULL);
return hWnd;
}
// Create a checkbox
DLLCMDC HWND gui_makeCheckbox(LPSTR text, int x, int y, int width, int height, HWND parent)
{
HWND hWnd = CreateWindow("BUTTON", text, WS_CHILD | WS_VISIBLE | BS_TEXT | BS_AUTOCHECKBOX, x, y, width, height, parent, NULL, dbpHInstance(), NULL);
return hWnd;
}
// Create a radiobox
DLLCMDC HWND gui_makeRadiobox(LPSTR text, int x, int y, int width, int height, HWND parent)
{
HWND hWnd = CreateWindow("BUTTON", text, WS_CHILD | WS_VISIBLE | BS_TEXT | BS_AUTORADIOBUTTON, x, y, width, height, parent, NULL, dbpHInstance(), NULL);
return hWnd;
}
// Create a groupbox
DLLCMDC HWND gui_makeGroupbox(LPSTR text, int x, int y, int width, int height, HWND parent)
{
HWND hWnd = CreateWindow("BUTTON", text, WS_CHILD | WS_VISIBLE | BS_TEXT | BS_GROUPBOX, x, y, width, height, parent, NULL, dbpHInstance(), NULL);
return hWnd;
}
// Create a combobox
DLLCMDC HWND gui_makeCombobox(int x, int y, int width, int height, int list, HWND parent)
{
DWORD dwParam = WS_CHILD | WS_VISIBLE | CBS_SIMPLE | CBS_AUTOHSCROLL | WS_VSCROLL;
if (list>0) { dwParam=dwParam | CBS_DROPDOWN; }
HWND hWnd = CreateWindow("COMBOBOX", "", dwParam, x, y, width, height, parent, NULL, dbpHInstance(), NULL);
return hWnd;
}
// Add a string to a combobox
DLLCMDC void gui_insertString(HWND hWnd, LPSTR string, int index)
{
SendMessage(hWnd, CB_INSERTSTRING, (WPARAM)index, (LPARAM)string);
}
// Remove a string from a combobox
DLLCMDC void gui_removeString(HWND hWnd, int index)
{
SendMessage(hWnd, CB_DELETESTRING, index, 0);
}
// Search for a string in a combobox
DLLCMDC int gui_findString(HWND hWnd, LPSTR text)
{
LRESULT lResult = SendMessage(hWnd, CB_FINDSTRING, 0, (LPARAM)(LPCSTR)text);
return (int)lResult;
}
// Get the total count of items in a combobox
DLLCMDC int gui_getItemCount(HWND hWnd)
{
LRESULT lResult = SendMessage(hWnd,CB_GETCOUNT,0,0);
return (int)lResult;
}
// Get the index number of the currently selected item
DLLCMDC int gui_getCurrentItem(HWND hWnd)
{
LRESULT lResult = SendMessage(hWnd,CB_GETCURSEL,0,0);
return (int)lResult;
}
// Get the text of a certain label
DLLCMDC DWORD gui_getItemText(HWND hWnd, int num, LPSTR text)
{
//LPSTR buffer;
//LRESULT lResult = SendMessage(hWnd, CB_GETLBTEXT, (WPARAM)num, (LPARAM) (LPTSTR) &buffer);
//return dbpstring(buffer);
//return dbpstring("Function is not working properly.");
SendMessage(hWnd, CB_GETLBTEXT, (WPARAM)num, (LPARAM) text);
return dbpstring(text);
}
// Reset an entire listbox/combobox
DLLCMDC void gui_clearItemData(HWND hWnd)
{
SendMessage(hWnd, CB_RESETCONTENT, 0, 0);
}
// Create a label
DLLCMDC HWND gui_makeLabel(LPSTR text, int x, int y, int width, int height, HWND parent)
{
HWND hWnd = CreateWindow("STATIC", text, WS_CHILD | WS_VISIBLE, x, y, width, height, parent,NULL,dbpHInstance(),NULL);
return hWnd;
}
// Create a trackbar gadget
DLLCMDC HWND gui_makeTrackbar(int x, int y, int width, int height, int minVal, int maxVal, HWND parent)
{
HWND hWnd = CreateWindowEx(0,TRACKBAR_CLASS,"",WS_VISIBLE | WS_CHILD | TBS_AUTOTICKS, x, y, width, height, parent, NULL,
dbpHInstance(), NULL);
SendMessage(hWnd,TBM_SETRANGEMIN,(WPARAM)true,(LPARAM)minVal);
SendMessage(hWnd,TBM_SETRANGEMAX,(WPARAM)true,(LPARAM)maxVal);
return hWnd;
}
// Set the minimum trackbar size
DLLCMDC void gui_setTrackbarMinSize(HWND hWnd, int size)
{
SendMessage(hWnd,TBM_SETRANGEMIN, (WPARAM)true,(LPARAM)size);
}
// Set the minimum trackbar size
DLLCMDC void gui_setTrackbarMaxSize(HWND hWnd, int size)
{
SendMessage(hWnd,TBM_SETRANGEMAX, (WPARAM)true,(LPARAM)size);
}
// Get the minimum trackbar size
DLLCMDC int gui_getTrackbarMinSize(HWND hWnd)
{
int result = (int) SendMessage(hWnd,TBM_GETRANGEMIN, 0,0);
return result;
}
// Get the minimum trackbar size
DLLCMDC int gui_getTrackbarMaxSize(HWND hWnd)
{
int result = (int) SendMessage(hWnd,TBM_GETRANGEMAX, 0,0);
return result;
}
// Set the trackbar's position
DLLCMDC void gui_setTrackbarPosition(HWND hWnd, int pos)
{
SendMessage(hWnd,TBM_SETPOS, (WPARAM)true, (LPARAM)pos);
}
// Get the trackbar's position
DLLCMDC int gui_getTrackbarPosition(HWND hWnd)
{
int result = (int) SendMessage(hWnd,TBM_GETPOS,0,0);
return result;
}
// For the editbox, normal, password, and digits only
DLLCMDC int editNormal(void) { return 0; }
DLLCMDC int editPassword(void) { return 1; }
DLLCMDC int editDigits(void) { return 2; }
// Create an editbox
DLLCMDC HWND gui_makeEditbox(int x, int y, int width, int height, int singleline, int type, HWND parent)
{
DWORD params;
if (singleline==0)
{ params=WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN; } else
{ params=WS_CHILD |WS_VISIBLE | ES_AUTOHSCROLL; height=20; }
if (type==editPassword()) { params=params | ES_PASSWORD; }
if (type==editDigits()) { params=params | ES_NUMBER; }
HWND hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", params, x, y, width, height, parent, (HMENU)2000, dbpHInstance(), NULL);
return hWnd;
}
// Get the text within an editbox
DLLCMDC DWORD gui_getEditText(HWND hWnd, int lineNum, LPSTR text)
{
//LPSTR result;
//result = (LPSTR) SendMessage(hWnd,EM_GETLINE,lineNum,(WPARAM)&result);
//return dbpstring(result);
char wndtext[512];
SendMessage(hWnd,EM_GETLINE,lineNum,(WPARAM)text);
return dbpstring(text);
}
// Update a window
DLLCMDC void gui_updateWindow(HWND hWnd)
{
UpdateWindow(hWnd);
}
// Get the last GUI event
DLLCMDC void gui_getEvent(void)
{
vEvent=gEvent;
}
// Get the last GUI event's HWND handle
DLLCMDC HWND gui_getEventHwnd(void)
{ return vEvent.hWnd; }
// Get the last GUI event's MESSAGE handle
DLLCMDC int gui_getEventMessage(void)
{ return (int)vEvent.msg; }
// Get the last GUI event's WPARAM handle
DLLCMDC int gui_getEventWParam(void)
{ return (int)vEvent.wParam; }
// Get the last GUI event's LPARAM handle
DLLCMDC int gui_getEventLParam(void)
{ return (int)vEvent.lParam; }
// Clear the event buffer
DLLCMDC void gui_clearEvent(void)
{
vEvent.hWnd=NULL;
vEvent.msg=NULL;
vEvent.wParam=NULL;
vEvent.lParam=NULL;
}
// Send a message to a buffer
DLLCMDC int gui_sendEvent(HWND hWnd, int message, int wParam, int lParam)
{
if(message<0) { message=0; }
int lResult = (int) SendMessage(hWnd,(UINT)message,(WPARAM)wParam,(LPARAM)lParam);
return lResult;
}
// Send a message to a buffer (without returning a value)
DLLCMDC void gui_sendEvent2(HWND hWnd, int message, int wParam, int lParam)
{
if (message<0) { message=0; }
SendMessage(hWnd,(UINT)message,(WPARAM)wParam,(LPARAM)lParam);
}
// "or" a value, basically, add a param
DLLCMDC DWORD gui_add1Param(DWORD firstVal, DWORD addVal)
{ DWORD result = firstVal || addVal; return result; }
// Add 2 params
DLLCMDC DWORD gui_add2Param(DWORD firstVal, DWORD addVal1, DWORD addVal2)
{ DWORD result = firstVal || addVal1 || addVal2; return result; }
// Add 3 params
DLLCMDC DWORD gui_add3Param(DWORD firstVal, DWORD addVal1, DWORD addVal2, DWORD addVal3)
{ DWORD result = firstVal || addVal1 || addVal2 || addVal3; return result; }
// Add 4 params
DLLCMDC DWORD gui_add4Param(DWORD firstVal, DWORD v1, DWORD v2, DWORD v3, DWORD v4)
{ DWORD result = firstVal || v1 || v2 || v3 || v4; return result; }
// Add 5 params
DLLCMDC DWORD gui_add5Param(DWORD v0, DWORD v1, DWORD v2, DWORD v3, DWORD v4, DWORD v5)
{ DWORD result = v0 || v1 || v2 || v3 || v4 || v5; return result; }
// Add 6 params
DLLCMDC DWORD gui_add6Param(DWORD v0, DWORD v1, DWORD v2, DWORD v3, DWORD v4, DWORD v5, DWORD v6)
{ DWORD result = v0 || v1 || v2 || v3 || v4 || v5 || v6; return result; }
// Add 7 Params
DLLCMDC DWORD gui_add7Param(DWORD v0, DWORD v1, DWORD v2, DWORD v3, DWORD v4, DWORD v5, DWORD v6, DWORD v7)
{ DWORD result = v0 || v1 || v2 || v3 || v4 || v5 || v6 || v7; return result; }
// Add 8 Params
DLLCMDC DWORD gui_add8Param(DWORD v0, DWORD v1, DWORD v2, DWORD v3, DWORD v4, DWORD v5, DWORD v6, DWORD v7, DWORD v8)
{ DWORD result = v0 || v1 || v2 || v3 || v4 || v5 || v6 || v7 || v8; return result; }
// Add 9 Params
DLLCMDC DWORD gui_add9Param(DWORD v0, DWORD v1, DWORD v2, DWORD v3, DWORD v4, DWORD v5, DWORD v6, DWORD v7, DWORD v8, DWORD v9)
{ DWORD result = v0 || v1 || v2 || v3 || v4 || v5 || v6 || v7 || v8 || v9; return result; }
// Create a window, with all it's crappy, crap
DLLCMDC HWND gui_createWindow(DWORD exVal, LPSTR strClass, LPSTR strTitle, DWORD params, int x, int y, int width, int height, HWND parent, HMENU menu)
{
HWND hWnd = CreateWindowEx(exVal,strClass,strTitle,params,x,y,width,height,parent,menu,dbpHInstance(),NULL);
return hWnd;
}
// Create a window
DLLCMDC HWND gui_makeWindow2(int width, int height, LPSTR text, HWND parent, DWORD style)
{
HINSTANCE myInstance = dbpHInstance();
char szClassName[]="WindowsApp";
WNDCLASSEX wClass;
/* The Window structure */
wClass.hInstance = myInstance;
wClass.lpszClassName = szClassName;
wClass.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wClass.style = CS_DBLCLKS; /* Catch double-clicks */
wClass.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wClass.hIcon = LoadIcon (NULL, IDI_WINLOGO);
wClass.hIconSm = LoadIcon (NULL, IDI_WINLOGO);
wClass.hCursor = LoadCursor (NULL, IDC_ARROW);
wClass.lpszMenuName = NULL; /* No menu */
wClass.cbClsExtra = 0; /* No extra bytes after the window class */
wClass.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
RegisterClassEx (&wClass);
HWND prnt=HWND_DESKTOP;
HINSTANCE hMyInstance=myInstance;
if (parent != NULL) { prnt=parent; }
/* The class is registered, let's create the program*/
HWND wHandle = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
text, /* Title Text */
style, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
width, height, /* The window's width and height */
prnt, /* The window is a child-window to desktop */
NULL, /* No menu */
hMyInstance, /* Program Instance handler */
NULL); /* No Window Creation data */
/* Make the window visible on the screen */
ShowWindow (wHandle, true);
return wHandle;
}
// Create a window
DLLCMDC HWND gui_makeWindow3(int width, int height, LPSTR text, HWND parent, DWORD style, DWORD exStyles)
{
HINSTANCE myInstance = dbpHInstance();
char szClassName[]="WindowsApp";
WNDCLASSEX wClass;
/* The Window structure */
wClass.hInstance = myInstance;
wClass.lpszClassName = szClassName;
wClass.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wClass.style = CS_DBLCLKS; /* Catch double-clicks */
wClass.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wClass.hIcon = LoadIcon (NULL, IDI_WINLOGO);
wClass.hIconSm = LoadIcon (NULL, IDI_WINLOGO);
wClass.hCursor = LoadCursor (NULL, IDC_ARROW);
wClass.lpszMenuName = NULL; /* No menu */
wClass.cbClsExtra = 0; /* No extra bytes after the window class */
wClass.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
RegisterClassEx (&wClass);
HWND prnt=HWND_DESKTOP;
HINSTANCE hMyInstance=myInstance;
if (parent != NULL) { prnt=parent; }
/* The class is registered, let's create the program*/
HWND wHandle = CreateWindowEx (
exStyles, /* Extended possibilites for variation */
szClassName, /* Classname */
text, /* Title Text */
style, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
width, height, /* The window's width and height */
prnt, /* The window is a child-window to desktop */
NULL, /* No menu */
hMyInstance, /* Program Instance handler */
NULL); /* No Window Creation data */
/* Make the window visible on the screen */
ShowWindow (wHandle, true);
return wHandle;
}
// Window Parameters
DLLCMDC DWORD ws_border(void) { return WS_BORDER; }
DLLCMDC DWORD ws_caption(void) { return WS_CAPTION; }
DLLCMDC DWORD ws_child(void) { return WS_CHILD; }
DLLCMDC DWORD ws_childwindow(void) { return WS_CHILDWINDOW; }
DLLCMDC DWORD ws_clipchildren(void) { return WS_CLIPCHILDREN; }
DLLCMDC DWORD ws_clipsiblings(void) { return WS_CLIPSIBLINGS; }
DLLCMDC DWORD ws_disabled(void) { return WS_DISABLED; }
DLLCMDC DWORD ws_dlgframe(void) { return WS_DLGFRAME; }
DLLCMDC DWORD ws_group(void) { return WS_GROUP; }
DLLCMDC DWORD ws_hscroll(void) { return WS_HSCROLL; }
DLLCMDC DWORD ws_iconic(void) { return WS_ICONIC; }
DLLCMDC DWORD ws_maximize(void) { return WS_MAXIMIZE; }
DLLCMDC DWORD ws_maximizebox(void) { return WS_MAXIMIZEBOX; }
DLLCMDC DWORD ws_minimize(void) { return WS_MINIMIZE; }
DLLCMDC DWORD ws_minimizebox(void) { return WS_MINIMIZEBOX; }
DLLCMDC DWORD ws_overlapped(void) { return WS_OVERLAPPED; }
DLLCMDC DWORD ws_overlappedwindow(void) { return WS_OVERLAPPEDWINDOW; }
DLLCMDC DWORD ws_popup(void) { return WS_POPUP; }
DLLCMDC DWORD ws_popupwindow(void) { return WS_POPUPWINDOW; }
DLLCMDC DWORD ws_sizebox(void) { return WS_SIZEBOX; }
DLLCMDC DWORD ws_sysmenu(void) { return WS_SYSMENU; }
DLLCMDC DWORD ws_tabstop(void) { return WS_TABSTOP; }
DLLCMDC DWORD ws_thickframe(void) { return WS_THICKFRAME; }
DLLCMDC DWORD ws_tiled(void) { return WS_TILED; }
DLLCMDC DWORD ws_tiledwindow(void) { return WS_TILEDWINDOW; }
DLLCMDC DWORD ws_visible(void) { return WS_VISIBLE; }
DLLCMDC DWORD ws_vscroll(void) { return WS_VSCROLL; }
// Retrieve the parent window to the specified window
DLLCMDC HWND gui_getParentWindow(HWND hWnd)
{ return GetParent(hWnd); }
// Set the parent window to the specified window
DLLCMDC void gui_setParentWindow(HWND hWnd, HWND hParent)
{ SetParent(hWnd,hParent); }
// Set the foreground window
DLLCMDC void gui_setForegroundWindow(HWND hWnd)
{ SetForegroundWindow(hWnd); }
// Set the active window
DLLCMDC void gui_setActiveWindow(HWND hWnd)
{ SetActiveWindow(hWnd); }
// Get the active window handle
DLLCMDC HWND gui_getActiveWindow(void)
{ return GetActiveWindow(); }
// Close a window
DLLCMDC void gui_closeWindow(HWND hWnd)
{ SendMessage(hWnd,WM_SYSCOMMAND,(WPARAM)SC_CLOSE,(LPARAM)NULL); }
// Maximize window
DLLCMDC void gui_maximizeWindow(HWND hWnd)
{ SendMessage(hWnd,WM_SYSCOMMAND,(WPARAM)SC_MAXIMIZE,(LPARAM)NULL); }
// Minimize window
DLLCMDC void gui_minimizeWindow(HWND hWnd)
{ SendMessage(hWnd,WM_SYSCOMMAND,(WPARAM)SC_MINIMIZE,(LPARAM)NULL); }
// Restore a window
DLLCMDC void gui_restoreWindow(HWND hWnd)
{ SendMessage(hWnd,WM_SYSCOMMAND,(WPARAM)SC_RESTORE,(LPARAM)NULL); }
// Set a window's color
DLLCMDC void gui_setWindowColor(HWND hWnd, int r, int g, int b)
{
SetClassLong(hWnd,
GCL_HBRBACKGROUND,
(long int)CreateSolidBrush(RGB(r,g,b)));
}
// "Paint" a window
DLLCMDC void gui_paintWindow(HWND hWnd)
{ SendMessage(hWnd,WM_PAINT,(WPARAM)NULL,(LPARAM)NULL); }
// Create a progress bar
DLLCMDC HWND gui_makeProgressBar(int x, int y, int width, int height, int rangeSize, int type, HWND parent)
{
DWORD style;
if (type<0) { type=0; }
if (type>1) { type=1; }
if (type==0) { style=WS_VISIBLE | WS_CHILD; }
if (type==1) { style=WS_VISIBLE | WS_CHILD | PBS_SMOOTH; }
//if (type==2) { style=WS_VISIBLE | WS_CHILD | PBS_MARQUEE; }
HWND hWnd = CreateWindowEx(0,PROGRESS_CLASS,"",style,x,y,width,height,parent,NULL,dbpHInstance(),NULL);
SendMessage(hWnd,PBM_SETRANGE,(WPARAM)NULL,(LPARAM)MAKELPARAM(0,rangeSize));
return hWnd;
}
// Set a progress bar's position
DLLCMDC void gui_setProgressBarPosition(HWND hWnd, int pos)
{
SendMessage(hWnd,PBM_SETPOS,(WPARAM)(int)pos,(LPARAM)NULL);
}
// Set a progress bar's range
DLLCMDC void gui_setProgressBarRange(HWND hWnd, int rangeSize)
{
SendMessage(hWnd,PBM_SETRANGE,(WPARAM)NULL,(LPARAM)MAKELPARAM(0,rangeSize));
}
// Get a progress bar's position
DLLCMDC int gui_getProgressBarPosition(HWND hWnd)
{
int pos = (int)SendMessage(hWnd,PBM_GETPOS,(WPARAM)NULL,(LPARAM)NULL);
return pos;
}
// Get a progress bar's range
DLLCMDC int gui_getProgressBarRange(HWND hWnd)
{
PBRANGE pbRng;
SendMessage(hWnd,PBM_GETRANGE,(WPARAM)false,(LPARAM)&pbRng);
int range=pbRng.iHigh;
return range;
}
// Set a window's font
DLLCMDC void gui_setWindowFont(HWND hWnd, int size, LPSTR family, int italic, int underline, int strikeout, int bold)
{
// Create data
int style;
DWORD v1, v2, v3;
// Deal with data passing
size=size*2;
if (italic==1) { v1=true; } else { v1=false; }
if (underline==1) { v2=true; } else { v2=false; }
if (strikeout==1) { v3=true; } else { v3=false; }
if (bold==1) { style=FW_BOLD; } else { style=FW_NORMAL; }
// Create the font
HFONT font = CreateFont(size,size/2,0,0,style,v1,v2,v3,ANSI_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,FF_DONTCARE,(LPCTSTR)family);
// Apply the font to a window
SendMessage(hWnd, WM_SETFONT,(WPARAM)font,MAKELPARAM(TRUE, 0));
}
// Create a menu
DLLCMDC HMENU gui_createMenu(void)
{
return CreateMenu();
}
// Add a sub menu
DLLCMDC HMENU gui_createSubMenu(HMENU parentMenu, LPSTR name)
{
HMENU hSubMenu = CreatePopupMenu();
AppendMenu(parentMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, name);
return hSubMenu;
}
// Add a menu item
DLLCMDC void gui_addSubMenuItem(HMENU subMenu, LPSTR name, int idNum)
{
//HMENU hmnu = CreatePopupMenu();
//AppendMenu(subMenu, MF_STRING | MF_POPUP, (UINT)subMenu, name);
InsertMenu(subMenu, -1, MF_BYPOSITION | MF_STRING | MF_POPUP, idNum, name);
}
// Apply Menu To a Window
DLLCMDC void gui_applyMenu(HWND hWnd, HMENU hMenu)
{
SetMenu(hWnd, hMenu);
DrawMenuBar(hWnd);
}
// Destroy Menu
DLLCMDC void gui_destroyMenu(HMENU hMenu)
{
DestroyMenu(hMenu);
}
// Find a window
DLLCMDC HWND gui_findWindow(LPSTR p0, LPSTR p1)
{
HWND hWnd = FindWindowA(p0,p1);
return hWnd;
}
// Find a window
DLLCMDC HWND gui_findWindowEx(int p0, int p1, LPSTR p2, LPSTR p3)
{
HWND hWnd = FindWindowExA((HWND)p0,(HWND)p1,p2,p3);
return hWnd;
}
// Get the system menu
DLLCMDC HMENU gui_getSystemMenu(HWND hWnd)
{
HMENU hMenu = GetSystemMenu(hWnd,0);
return hMenu;
}
// Test to retrieve a windows text
DLLCMDC void gui_getWindowTextEx(HWND hWnd, LPSTR textOut, DWORD length)
{
GetWindowText(hWnd,textOut,length);
}
// Get the length of a windows text
DLLCMDC int gui_getWindowTextLength(HWND hWnd)
{
return GetWindowTextLengthA(hWnd);
}
// Create an MDI client
DLLCMDC HWND gui_createMdiClient(HWND parent)
{
CLIENTCREATESTRUCT ccs;
ccs.idFirstChild = 50000;
HWND hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, "mdiclient", "", WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent, NULL, gCore->hInstance, &ccs);
ShowWindow(hWnd, SW_SHOW);
return hWnd;
}
// Create an MDI child
DLLCMDC HWND gui_createMdiChild(HWND mdiClient, LPSTR szString)
{
MDICREATESTRUCT mcs;
mcs.szTitle = szString;
mcs.szClass = "WindowsApp";
mcs.hOwner = gCore->hInstance;
mcs.x = CW_USEDEFAULT;
mcs.y = CW_USEDEFAULT;
mcs.style = MDIS_ALLCHILDSTYLES;
HWND hChild = (HWND)SendMessage(mdiClient, WM_MDICREATE, 0, (LONG)&mcs);
return hChild;
}
// Create a Treeview
DLLCMDC HWND gui_makeTreeview(int x, int y, int width, int height, HWND parent)
{
TVINSERTSTRUCT tvis;
HIMAGELIST ilist;
HICON hIco;
HTREEITEM hPrev;
LONG tLib;
LONG i;
HWND hTv=CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "", WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS,
x, y, width, height, parent, 0, gCore->hInstance, 0);
for(i=3; i<6; i++)
{
hIco = ExtractIcon(0,"Shell32.DLL",i);
ImageList_ReplaceIcon(ilist, -1, hIco);
DestroyIcon(hIco);
}
TreeView_SetImageList(hTv,ilist,TVSIL_NORMAL);
return hTv;
}
// Add the ability to insert an item
DLLCMDC HTREEITEM InsertTreeviewItem(HWND hTv, char* szText, int image, int selectedImage, HTREEITEM hParent)
{
TVINSERTSTRUCT tvis;
tvis.item.pszText=szText;
tvis.item.cchTextMax=strlen(szText);
tvis.item.iImage=image;
tvis.item.iSelectedImage=selectedImage;
tvis.hInsertAfter=0;
tvis.hParent=hParent;
return TreeView_InsertItem(hTv, &tvis);
}
// Add the ability to insert an item
DLLCMDC HTREEITEM InsertTreeviewRoot(HWND hTv, char* szText, int image, int selectedImage)
{
TVINSERTSTRUCT tvis;
tvis.item.pszText=szText;
tvis.item.cchTextMax=strlen(szText);
tvis.item.iImage=image;
tvis.item.iSelectedImage=selectedImage;
tvis.hInsertAfter=0;
tvis.hParent=TVI_ROOT;
return TreeView_InsertItem(hTv, &tvis);
}
commands.rc
// Resource Script
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
//#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
// Startup Function
1 "STARTWIN32%0%startup" // *void* Initialize your plugin
2 "DBPHWND[%L%dbpHwnd" // *int*, void Get the DarkBASIC Window's HWND
3 "DBPHINSTANCE[%L%dbpHInstance" // *int*, void Get the DarkBASIC Window's HINSTANCE
4 "DBPHICON[%L%dbpHIcon" // *int*, void Get the DarkBASIC Window's HICON
5 "DESKTOPHWND[%L%desktopHwnd" // *int*, void Get the desktop's HWND
6 "GUI_MAKEWINDOW[%LLLSL%gui_makeWindow" // *int*, int, int, str, int Create a window
7 "GUI_DESTROYWINDOW%L%gui_destroyWindow" // *void*, int Destroy a created window
8 "GUI_GETWINDOWX[%LL%gui_getWindowX" // *int*, int Retrieve the X Position of a window
9 "GUI_GETWINDOWY[%LL%gui_getWindowY" // *int*, int Retrieve the Y Position of a window
10 "GUI_GETWINDOWWIDTH[%LL%gui_getWindowWidth" // *int*, int Retrieve the Width of a window
11 "GUI_GETWINDOWHEIGHT[%LL%gui_getWindowHeight" // *int*, int Retrieve the Height of a window
12 "GUI_SHOWWINDOWEX%LL%gui_showWindowEx" // *void*, int, int Show, or don't show a window
13 "GUI_SHOWWINDOW%L%gui_showWindow" // *void*, int Show a window (Make visible)
14 "GUI_HIDEWINDOW%L%gui_hideWindow" // *void*, int Hide a window (Make invisible)
15 "GUI_ENABLEWINDOW%L%gui_enableWindow" // *void*, int Enable a window
16 "GUI_DISABLEWINDOW%L%gui_disableWindow" // *void*, int Disable a window
17 "GUI_WINDOWENABLED[%LL%gui_windowEnabled" // *int*, int Retrieve rather a window is, or is not enabled
18 "GUI_POSITIONWINDOW%LLL%gui_positionWindow" // *void*, int, int, int Position a window
19 "GUI_RESIZEWINDOW%LLL%gui_resizeWindow" // *void*, int, int, int Resize a window
20 "GUI_SETWINDOWTEXT%LS%gui_setWindowText" // *void*, int, str Set a window's text
21 "GUI_GETWINDOWTEXT%LSD%gui_getWindowTextEx"
22 "DLL_LOAD[%LS%loadDll" // *int*, str Load a dll
23 "DLL_DESTROY%L%destroyDll" // *void*, int Destroy an existing dll
24 "DLL_GETRCSTRING[%SLL%dllResourceString" // *str*, int, int Retrieve a resource string from a dll
25 "GUI_GETFOCUSWINDOW[%L%gui_getFocusWindow" // *int*, void Get the window in focus
26 "GUI_BUTTONPRESSED[%LL%gui_buttonPressed" // *int*, int Was a button pressed?
27 "GUI_BOXCHECKED[%LL%gui_boxChecked" // *int*, int Was a box (checkbox/radiobox) checked?
28 "GUI_MAKEBUTTON[%LSLLLLL%gui_makeButton" // *int*, str, int, int,... Create a button
29 "GUI_MAKECHECKBOX[%LSLLLLL%gui_makeCheckbox" // Same as gui_makeButton Create a checkbox
30 "GUI_MAKERADIOBOX[%LSLLLLL%gui_makeRadiobox" // Same as gui_makeButton Create a radiobox
31 "GUI_MAKEGROUPBOX[%LSLLLLL%gui_makeGroupbox" // Same as gui_makeButton Create a groupbox
32 "GUI_MAKECOMBOBOX[%LLLLLLL%gui_makeCombobox" // *int*, int, int, int... Create a combobox
33 "GUI_INSERTSTRING%LSL%gui_insertString" // *void*, int, str, int Insert a string in a combobox
34 "GUI_REMOVESTRING%LL%gui_removeString" // *void*, int, int Remove a string in a combobox
35 "GUI_FINDSTRING[%LLS%gui_findString" // *int*, int, str Find a string in a combobox
36 "GUI_GETITEMCOUNT[%LL%gui_getItemCount" // *int*, int Retrieve the quantity of items in the combobox
37 "GUI_GETCURRENTITEM[%LL%gui_getCurrentItem" // *int*, int Retrieve the index of the currently selected item
38 "GUI_GETITEMTEXT[%SLLS%gui_getItemText" // *str*, int, int Retrieve the text of an item
39 "GUI_CLEARITEMDATA%L%gui_clearItemData" // *void*, int Clear a combo/listbox's item data
40 "GUI_MAKELABEL[%LSLLLLL%gui_makeLabel" // *int*, str, int, int, int.. Create a label (Piece of text)
41 "GUI_MAKETRACKBAR[%LLLLLLLL%gui_makeTrackbar" // *int*, int, int, int.. Create a trackbar
42 "GUI_SETTRACKBARMINSIZE%LL%gui_setTrackbarMinSize" // *void*, int, int Set the trackbar's minimum size
43 "GUI_SETTRACKBARMAXSIZE%LL%gui_setTrackbarMaxSize" // *void*, int, int Set the trackbar's maximum size
44 "GUI_GETTRACKBARMINSIZE[%LL%gui_getTrackbarMinSize" // *int*, int Retrieve the trackbar's minimum size
45 "GUI_GETTRACKBARMAXSIZE[%LL%gui_getTrackbarMaxSize" // *int*, int Retrieve the trackbar's maximum size
46 "GUI_SETTRACKBARPOSITION%LL%gui_setTrackbarPosition" // *void*, int,.. Set the trackbar's position
47 "GUI_GETTRACKBARPOSITION[%LL%gui_getTrackbarPosition" // *int*, int Get the trackbar's position
48 "EDITNORMAL[%L%editNormal" // *int*, void Type for the editbox, normal edit
49 "EDITPASSWORD[%L%editPassword" // *int*, void Type for a password editbox
50 "EDITDIGITS[%L%editDigits" // *int*, void Type for a digits-only editbox
51 "GUI_MAKEEDITBOX[%LLLLLLLL%gui_makeEditbox" // *int*, int, int, .. Create an editbox
52 "GUI_GETEDITTEXT[%SLLS%gui_getEditText" // *str*, int, int Get a string from an editbox
53 "GUI_UPDATEWINDOW%L%gui_updateWindow" // *void*, int Automatically refresh a window
54 "GUI_GETEVENT%0%gui_getEvent" // *void*, void Retrieve data from the event buffer
55 "GUI_GETEVENTHWND[%L%gui_getEventHwnd" // *int*, void Get the event buffer's HWND value
56 "GUI_GETEVENTMESSAGE[%L%gui_getEventMessage" // *int*, void Get the event buffer's MESSAGE value
57 "GUI_GETEVENTWPARAM[%L%gui_getEventWParam" // *int*, void Get the event buffer's WPARAM value
58 "GUI_GETEVENTLPARAM[%L%gui_getEventLParam" // *int*, void Get the event buffer's LPARAM value
59 "GUI_CLEAREVENT%0%gui_clearEvent" // *void*, void Clear the event buffer
60 "GUI_SENDEVENT[%LLLLL%gui_sendEvent" // *int*, int, int, int, int Send an event to a window
61 "GUI_SENDEVENT%LLLL%gui_sendEvent2" // *void*, int, int, int, int Send an event to a window (Without returning a value
62 "GUI_ADDPARAM[%DDD%gui_add1Param"
63 "GUI_ADDPARAM[%DDDD%gui_add2Param"
64 "GUI_ADDPARAM[%DDDDD%gui_add3Param"
65 "GUI_ADDPARAM[%DDDDDD%gui_add4Param"
66 "GUI_ADDPARAM[%DDDDDDD%gui_add5Param"
67 "GUI_ADDPARAM[%DDDDDDDD%gui_add6Param"
68 "GUI_ADDPARAM[%DDDDDDDDD%gui_add7Param"
69 "GUI_ADDPARAM[%DDDDDDDDDD%gui_add8Param"
70 "GUI_ADDPARAM[%DDDDDDDDDDD%gui_add9Param"
71 "GUI_CREATEWINDOW[%LDSSDLLLLLL%gui_createWindow"
72 "WS_BORDER[%D%ws_border"
73 "WS_CAPTION[%D%ws_caption"
74 "WS_CHILD[%D%ws_child"
75 "WS_CHILDWINDOW[%D%ws_childwindow"
76 "WS_CLIPCHILDREN[%D%ws_clipchildren"
77 "WS_CLIPSIBLINGS[%D%ws_clipsiblings"
78 "WS_DISABLED[%D%ws_disabled"
79 "WS_DLGFRAME[%D%ws_dlgframe"
80 "WS_GROUP[%D%ws_group"
81 "WS_HSCROLL[%D%ws_hscroll"
82 "WS_ICONIC[%D%ws_iconic"
83 "WS_MAXIMIZE[%D%ws_maximize"
84 "WS_MAXIMIZEBOX[%D%ws_maximizebox"
85 "WS_MINIMIZE[%D%ws_minimize"
86 "WS_MINIMIZEBOX[%D%ws_minimizebox"
87 "WS_OVERLAPPED[%D%ws_overlapped"
88 "WS_OVERLAPPEDWINDOW[%D%ws_overlappedwindow"
89 "WS_POPUP[%D%ws_popup"
90 "WS_POPUPWINDOW[%D%ws_popupwindow"
91 "WS_SIZEBOX[%D%ws_sizebox"
92 "WS_SYSMENU[%D%ws_sysmenu"
93 "WS_TABSTOP[%D%ws_tabstop"
94 "WS_THICKFRAME[%D%ws_thickframe"
95 "WS_TILED[%D%ws_tiled"
96 "WS_TILEDWINDOW[%D%ws_tiledwindow"
97 "WS_VISIBLE[%D%ws_visible"
98 "WS_VSCROLL[%D%ws_vscroll"
99 "GUI_MAKEWINDOW[%LLLSLD%gui_makeWindow2"
100 "GUI_MAKEWINDOW[%LLLSLDD%gui_makeWindow3"
101 "GUI_GETPARENTWINDOW[%LL%gui_getParentWindow"
102 "GUI_SETPARENTWINDOW%LL%gui_setParentWindow"
103 "GUI_SETFOREGROUNDWINDOW%L%gui_setForegroundWindow"
104 "GUI_SETACTIVEWINDOW%L%gui_setActiveWindow"
105 "GUI_GETACTIVEWINDOW[%L%gui_getActiveWindow"
106 "GUI_CLOSEWINDOW%L%gui_closeWindow"
107 "GUI_MAXIMIZEWINDOW%L%gui_maximizeWindow"
108 "GUI_MINIMIZEWINDOW%L%gui_minimizeWindow"
109 "GUI_RESTOREWINDOW%L%gui_restoreWindow"
110 "GUI_SETWINDOWCOLOR%LLLL%gui_setWindowColor"
111 "GUI_PAINTWINDOW%L%gui_paintWindow"
112 "GUI_MAKEPROGRESSBAR[%LLLLLLLL%gui_makeProgressBar"
113 "GUI_SETPROGRESSBARPOSITION%LL%gui_setProgressBarPosition"
114 "GUI_SETPROGRESSBARRANGE%LL%gui_setProgressBarRange"
115 "GUI_GETPROGRESSBARPOSITION[%LL%gui_getProgressBarPosition"
116 "GUI_GETPROGRESSBARRANGE[%LL%gui_getProgressBarRange"
117 "GUI_SETWINDOWFONT%LLSLLLL%gui_setWindowFont"
118 "GUI_CREATEMENU[%L%gui_createMenu"
119 "GUI_CREATESUBMENU[%LLS%gui_createSubMenu"
120 "GUI_ADDSUBMENUITEM%LSL%gui_addSubMenuItem"
121 "GUI_DESTROYMENU%L%gui_destroyMenu"
122 "GUI_APPLYMENU%LL%gui_applyMenu"
123 "GUI_FINDWINDOW[%LSS%gui_findWindow"
124 "GUI_FINDWINDOW[%LLLSS%gui_findWindowEx"
125 "GUI_GETSYSTEMMENU[%LL%gui_getSystemMenu"
126 "GUI_GETWINDOWTEXTLENGTH[%LL%gui_getWindowTextLength"
127 "GUI_CREATEMDICLIENT[%LL%gui_createMdiClient"
128 "GUI_CREATEMDICHILD[%LLS%gui_createMdiChild"
129 "GUI_MAKETREEVIEW[%LLLLLL%gui_makeTreeview"
130 "GUI_INSERTTREEVIEWITEM[%LLSLLL%InsertTreeviewItem"
131 "GUI_INSERTTREEVIEWROOT[%LLSLL%InsertTreeviewRoot"
/* L = Integer ( IN use "int" ) ( OUT use "int" )
F = Float ( IN use "float" ) ( OUT use "DWORD" )
S = String ( IN use "LPSTR" ) ( OUT use "DWORD" )
O = Double Float (capital o) ( IN use "double" ) ( OUT use "double" )
R = Double Integer (capital r) ( IN use "LONGLONG" ) ( OUT use "LONGLONG" )
D = Boolean, BYTE, WORD and DWORD ( IN use "DWORD" ) ( OUT use "DWORD" )
0 = Zero Character (no param) ( IN use "VOID" ) ( n/a ) */
END
#endif // English resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
gui_win32.ini
STARTWIN32=main.htm=*No Parameters* - Initializes db user 2006+'s GUI Plugin
DBPHWND=main.htm=(*No Parameters*) ;Returns integer - Retrieve dbp's HWND value
DBPHINSTANCE=main.htm=(*No Parameters*) ;Returns integer - Retrieve dbp's HINSTANCE value
DBPHICON=main.htm=(*No Parameters*) ;Returns integer - Retrieve a handle to dbp's icon
DESKTOPHWND=main.htm=(*No Parameters*) ;Returns integer - Retrieve the handle to the desktop window
GUI_MAKEWINDOW=main.htm=(width, height, title$, parent [,style[,extraStyle]]) ;Returns integer - Create a window, returns handle to window
GUI_DESTROYWINDOW=main.htm=window - Destroy an existing window
GUI_GETWINDOWX=main.htm=(window) ;Returns integer - Retrieve the X Position of a window
GUI_GETWINDOWY=main.htm=(window) ;Returns integer - Retrieve the Y Position of a window
GUI_GETWINDOWWIDTH=main.htm=(window) ;Returns integer - Retrieve the width of a window
GUI_GETWINDOWHEIGHT=main.htm=(window) ;Returns integer - Retrieve the height of a window
GUI_SHOWWINDOWEX=main.htm=window, show - Show a window based on the "show" value
GUI_SHOWWINDOW=main.htm=window - Make a window visible
GUI_HIDEWINDOW=main.htm=window - Make a window invisible
GUI_ENABLEWINDOW=main.htm=window - Enable a window
GUI_DISABLEWINDOW=main.htm=window - Disable a window
GUI_WINDOWENABLED=main.htm=(window) ;Returns integer - Retrieve rather or not a window is enabled
GUI_POSITIONWINDOW=main.htm=window, x, y - Position a window
GUI_RESIZEWINDOW=main.htm=window, width, height - Resize a window
GUI_SETWINDOWTEXT=main.htm=window, text$ - Set a window's text
DLL_LOAD=main.htm=(file$) ;Returns integer - Load a useable dll for the WinGui plugin
DLL_DESTROY=main.htm=handle - Destroy a dll loaded by DLL_LOAD
DLL_GETRCSTRING=main.htm=(handle, id) ;Returns string - Get a string table string from a dll loaded with DLL_LOAD
GUI_GETFOCUSWINDOW=main.htm=() ;Returns integer - Get the window with focus to the keyboard
GUI_BUTTONPRESSED=main.htm=(handle) ;Returns integer - Get if a button was pressed or not
GUI_BOXCHECKED=main.htm=(handle) ;Returns integer - Get if a radiobox/checkbox is checked or not
GUI_MAKEBUTTON=main.htm=(text$,x,y,width,height,parent) ;Returns integer - Create a button
GUI_MAKECHECKBOX=main.htm=(text$,x,y,width,height,parent) ;Returns integer - Create a checkbox
GUI_MAKERADIOBOX=main.htm=(text$,x,y,width,height,parent) ;Returns integer - Create a radiobox
GUI_MAKEGROUPBOX=main.htm=(text$,x,y,width,height,parent) ;Returns integer - Create a groupbox
GUI_MAKECOMBOBOX=main.htm=(x,y,width,height,list,parent) ;Returns integer - Create a combobox
GUI_INSERTSTRING=main.htm=handle,string$,position - Insert a string into a combobox, position -1 appends to end of combobox
GUI_REMOVESTRING=main.htm=handle,position - Removes a string from a position, position -1 removes the last string in the combobox
GUI_FINDSTRING=main.htm=(handle,string$) ;Returns integer - Find a non-case-sensitive string in a combobox
GUI_GETITEMCOUNT=main.htm=(handle) ;Returns integer - Retrieve how many items are in a combobox
GUI_GETCURRENTITEM=main.htm=(handle) ;Returns integer - Get the currently selected item in a combobox
GUI_GETITEMTEXT=main.htm=(handle,position) ;Returns string - Retrieve the text of an item in a combobox
GUI_CLEARITEMDATA=main.htm=(handle) - Destroy all the items in a combo/listbox.
GUI_MAKELABEL=main.htm=(text$,x,y,width,height,parent) ;Returns integer - Create a label (Piece of text)
GUI_MAKETRACKBAR=main.htm=(x,y,width,height,minSize,maxSize,parent) ;Returns integer - Create a trackbar
GUI_SETTRACKBARMINSIZE=main.htm=handle,size - Set the minimum trackbar size value (Not visual size, but value size)
GUI_SETTRACKBARMAXSIZE=main.htm=handle,size - Set the maximum trackbar size value (Not visual size, but value size)
GUI_GETTRACKBARMINSIZE=main.htm=(handle) ;Returns integer - Retrieve the minimum trackbar size value
GUI_GETTRACKBARMAXSIZE=main.htm=(handle) ;Returns integer - Retrieve the maximum trackbar size value
GUI_SETTRACKBARPOSITION=main.htm=handle,position - Set the position of the slider on the trackbar
GUI_GETTRACKBARPOSITION=main.htm=(handle) ;Returns integer - Retrieve the position of the slider on the trackbar
EDITNORMAL=main.htm=() ;Returns integer - Pass to gui_makeEditbox, set the type as a normal editbox
EDITPASSWORD=main.htm=() ;Returns integer - Pass to gui_makeEditbox, set the type as a password editbox
EDITDIGITS=main.htm=() ;Returns integer - Pass to gui_makeEditbox, set the type as a digits-only editbox
GUI_MAKEEDITBOX=main.htm=(x,y,width,height,singleline,type,parent) ;Returns integer - Create an editbox
GUI_GETEDITTEXT=main.htm=(handle,linenumber) ;Returns string - Get the text in an editbox. Start from 0
GUI_UPDATEWINDOW=main.htm=handle - Automatically refresh a window
GUI_GETEVENT=main.htm=*No Parameters* - Update the event buffer
GUI_GETEVENTHWND=main.htm=() ;Returns integer - Retrieve the window handle responsible for the event
GUI_GETEVENTMESSAGE=main.htm=() ;Returns integer - Retrieve the reason for the event
GUI_GETEVENTWPARAM=main.htm=() ;Returns integer - Get extra data to the event
GUI_GETEVENTLPARAM=main.htm=() ;Returns integer - Get extra data to the event
GUI_CLEAREVENT=main.htm=*No Parameters* - Clear the event buffer
GUI_SENDEVENT=main.htm=(handle,message,wParam,lParam) ;Returns integer - Send an event to a window
GUI_ADDPARAM=main.htm=(value1, value2, ... value9) ;Returns DWORD - Add several parameters together
GUI_CREATEWINDOW=main.htm=(extraValue, className$, title$, parameters, x, y, width, height, parentWindow, menu) ;Returns integer - Create a window
WS_BORDER=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_CAPTION=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_CHILD=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_CHILDWINDOW=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_CLIPCHILDREN=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_CLIPSIBLINGS==main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_DISABLED==main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_DLGFRAME=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_GROUP=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_HSCROLL=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_ICONIC=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_MAXIMIZE=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_MAXIMIZEBOX=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_MINIMIZE=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_MINIMIZEBOX=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_OVERLAPPED=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_OVERLAPPEDWINDOW=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_POPUP=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_POPUPWINDOW=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_SIZEBOX=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_SYSMENU=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_TABSTOP=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_THICKFRAME=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_TILED=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_TILEDWINDOW=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_VISIBLE=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
WS_VSCROLL=main.htm=() ;Returns DWORD - A parameter for gui_createWindow
GUI_GETPARENTWINDOW=main.htm=(window) ;Returns integer - Get a window's parent window handle
GUI_SETPARENTWINDOW=main.htm=window - Set a window's parent window
GUI_SETFOREGROUNDWINDOW=main.htm=window - Set the foreground window
GUI_SETACTIVEWINDOW=main.htm=window - Set the active window
GUI_GETACTIVEWINDOW=main.htm=(window) ;Returns integer - Get the active window
GUI_CLOSEWINDOW=main.htm=window - Close a window
GUI_MAXIMIZEWINDOW=main.htm=window - Maximize a window
GUI_MINIMIZEWINDOW=main.htm=window - Minimize a window
GUI_RESTOREWINDOW=main.htm=window - Restore a window to it's normal state
GUI_SETWINDOWCOLOR=main.htm=window, red, green, blue - Set a window's background color
GUI_PAINTWINDOW=main.htm=window - "Paint" a window
GUI_MAKEPROGRESSBAR=main.htm=(x, y, width, height, rangeSize, type, parent) ;Returns integer - Create a progress bar
GUI_SETPROGRESSBARPOSITION=main.htm=window, position - Set a progressbar's progress
GUI_SETPROGRESSBARRANGE=main.htm=window, rangeSize - Set a progressbar's maximum range
GUI_GETPROGRESSBARPOSITION=main.htm=(window) ;Returns integer - Get a progressbar's progress
GUI_GETPROGRESSBARRANGE=main.htm=(window) ;Returns integer - Get a progressbar's progress range size
GUI_SETWINDOWFONT=main.htm=window, size, fontName$, italic, underline, strikeout, bold - Set a window's text font
GUI_CREATEMENU=main.htm=() ;Returns integer - Create a menubar
GUI_CREATESUBMENU=main.htm=(parentMenu, name$) ;Returns integer - Create a submenu of a menubar, ex, file, edit, view, help, etc...
GUI_ADDSUBMENUITEM=main.htm=subMenu, name$, referenceId - Add an item to a sub menu, ex, new, open, save, etc...
GUI_APPLYMENU=main.htm=window, menu - Apply a menubar to a window
GUI_DESTROYMENU=main.htm=menu - Destroy a menubar
GUI_FINDWINDOW=main.htm=([window, window, ] className$, windowText$) ;Returns window handle - Find a window
GUI_GETSYSTEMMENU=main.htm=(window) ;Returns handle to menu - Get the system's menu of a window
GUI_GETWINDOWTEXT=main.htm=window, text$, textLength - Gets a windows text, and stores it in text$
GUI_GETWINDOWTEXTLENGTH=main.htm=(window) ;Returns integer - Retrieve the length of a window's text
GUI_CREATEMDICLIENT=main.htm=(parentWindow) ;Returns hwnd - Create an MDI client area
GUI_CREATEMDICHILD=main.htm=(parentWindow, title$) ;Returns hwnd - Create an MDI child
GUI_MAKETREEVIEW=main.htm=(x, y, width, height, parentWindow) ;Returns hwnd - Create a treeview
GUI_INSERTTREEVIEWITEM=main.htm=(treeview, insertAfter, text, imagelistid, selectedimagelistid, parent) ;returns id - Insert a treeview item
GUI_INSERTTREEVIEWROOT=main.htm=(treeview, text, imagelistid, selectedimagelistid) ;returns id - Insert a treeview root
Cheers,
-db
What? You mean I cant sleep here???