Just a little announcement here, but WinGui (A plugin for dark basic pro) is going to be ready for DarkGDK first. As a side note, it's not *just* for DarkGDK, it's for C++ in general. To make myself even more clear, you don't need DarkGDK to use the C++ version of WinGui. However, I will add DarkGDK specific features to WinGui. Such as controlling menus properly with the DarkGDK window and such.
WinGui is built as part of the Twilight Engine, but due to it's initial release it is being kept free. All WinGui commands are prefixed with "tw". The following is a list of WinGui commands that currently exist. To find a demo, go to the WIP -> Free Windows GUI DLL thread.
void twSync(void);
void twEnd(void);
BOOL twRunning(void);
void _GadgetModify(sGadget* pGadget, int x, int y, int width, int height);
sGadget* _AddGadget(sGadget pGadget);
void _RemoveGadget(sGadget* ppGadget);
void _RemoveAllGadgets(void);
sGadget* _FindGadgetByHwnd(HWND hWnd);
void _StartGui(void);
void _EndGui(void);
DWORD twGetStandardWindowColor(void);
int twNotice(string sMessage, string sTitle="", int iButton=0, int iIcon=0, sGadget* pParent=NULL, int iDefButton=0);
void twSetEventLogging(int iLog);
int twGetEventLogging(void);
DWORD twGetEventCount(void);
DWORD twGetEvent(void);
DWORD twGetEventGadget(void);
DWORD twGetEventMessage(void);
DWORD twGetEventWParam(void);
DWORD twGetEventLParam(void);
void twClearAllEvents(void);
DWORD twMakeGadget(DWORD dwType, DWORD dwFlags, string szText, DWORD dwWidth, DWORD dwHeight, DWORD dwParent);
void twKillGadget(DWORD dwGadget);
DWORD twMakeWindow(DWORD dwWidth=640, DWORD dwHeight=480, string szText="", DWORD dwFlags=twWindow_Normal, DWORD dwParent=NULL);
DWORD twMakeForm(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=100, DWORD dwFlags=NULL);
DWORD twMakeButton(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=40, string szText="", DWORD dwFlags=NULL);
DWORD twMakeEdit(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=30, string szText="", DWORD dwFlags=NULL);
DWORD twMakeSlider(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=40, int minVal=0, int maxVal=20, DWORD dwFlags=NULL);
DWORD twMakeGroupBox(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=100, string szText="");
DWORD twMakeListBox(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=150, DWORD dwFlags=NULL);
DWORD twMakeTreeView(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=150, DWORD dwFlags=NULL);
DWORD twMakeTab(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=150, DWORD dwHeight=30, DWORD dwFlags=NULL);
DWORD twMakeProgressBar(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=20, DWORD dwFlags=NULL);
DWORD twMakeComboBox(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=100, DWORD dwHeight=100);
DWORD twMakeCheckBox(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=150, DWORD dwHeight=20, string szText="");
DWORD twMakeRadioBox(DWORD dwParent, int x=0, int y=0, DWORD dwWidth=150, DWORD dwHeight=20, string szText="");
DWORD twMakeMenu(DWORD dwParent, string szText="", int id=0);
DWORD twMakeToolBar(DWORD dwParent);
void twSetGadgetColor(DWORD dwGadget, DWORD dwColor=0xffc9c9c9);
DWORD twGetGadgetColor(DWORD dwGadget);
void twSetGadgetTextColor(DWORD dwGadget, DWORD dwColor);
DWORD twGetGadgetTextColor(DWORD dwGadget);
void twSetGadgetText(DWORD dwGadget, string szText="");
string twGetGadgetText(DWORD dwGadget);
void twPositionGadget(DWORD dwGadget, int x=0, int y=0);
int twGetGadgetX(DWORD dwGadget);
int twGetGadgetY(DWORD dwGadget);
void twResizeGadget(DWORD dwGadget, int width=0, int height=0);
int twGetGadgetWidth(DWORD dwGadget);
int twGetGadgetHeight(DWORD dwGadget);
void twSetGadgetParent(DWORD dwGadget, DWORD dwParent);
DWORD twGetGadgetParent(DWORD dwGadget);
DWORD twGetClientWidth(DWORD dwGadget);
DWORD twGetClientHeight(DWORD dwGadget);
void twSetGadgetDrawCallback(DWORD dwGadget, tDrawCallback func);
tDrawCallback twGetGadgetDrawCallback(DWORD dwGadget);
void twSetGadgetModifyCallback(DWORD dwGadget, tModifyCallback func);
tModifyCallback twGetGadgetModifyCallback(DWORD dwGadget);
void twSetGadgetCloseCallback(DWORD dwGadget, tCloseCallback func);
tCloseCallback twGetGadgetCloseCallback(DWORD dwGadget);
DWORD twGetGadgetClickCount(DWORD dwGadget);
DWORD twGetGadgetMiddleClickCount(DWORD dwGadget);
DWORD twGetGadgetRightClickCount(DWORD dwGadget);
void twSetSliderRangeMin(DWORD dwSlider, int range=0);
void twSetSliderRangeMax(DWORD dwSlider, int range=20);
int twGetSliderRangeMin(DWORD dwSlider, int range);
int twGetSliderRangeMax(DWORD dwSlider, int range);
void twSetSliderPosition(DWORD dwSlider, int pos=0);
int twGetSliderPosition(DWORD dwSlider);
int twAddListBoxString(DWORD dwListBox, string szText="");
void twKillListBoxString(DWORD dwListBox, int index=0);
int twFindListBoxString(DWORD dwListBox, string szText="");
int twGetListBoxItemCount(DWORD dwListBox);
int twGetListBoxSelection(DWORD dwListBox);
int twGetListBoxItemSelected(DWORD dwListBox, int item=0);
int twGetListBoxSelectedItemCount(DWORD dwListBox);
string twGetListBoxItemString(DWORD dwListBox, int item=0);
void twSetListBoxSelectedItem(DWORD dwListBox, int item=0);
DWORD twAddTreeViewRoot(DWORD dwTreeView, string szText="");
DWORD twAddTreeViewItem(DWORD dwTreeView, DWORD dwItemAfter, string szText="");
void twKillTreeViewItem(DWORD dwTreeView, DWORD dwItem);
void twKillAllTreeViewItems(DWORD dwTreeView);
DWORD twGetTreeViewSelection(DWORD dwTreeView);
DWORD twGetTreeViewItemCount(DWORD dwTreeView);
int twAddTab(DWORD dwTab, int index=-1, string szText="");
void twSetCurrentTab(DWORD dwTab, int index=0);
int twGetCurrentTab(DWORD dwTab);
int twGetTabCount(DWORD dwTab);
void twKillTab(DWORD dwTab, int index);
void twKillAllTabs(DWORD dwTab);
void twSetTabText(DWORD dwTab, int index, string szText="");
string twGetTabText(DWORD dwTab, int index);
void twSetProgressBarPosition(DWORD dwProgressBar, int pos=0);
void twSetProgressBarRange(DWORD dwProgressBar, int min=0, int max=100);
int twGetProgressBarPosition(DWORD dwProgressBar);
int twGetProgressBarRangeMin(DWORD dwProgressBar);
int twGetProgressBarRangeMax(DWORD dwProgressBar);
int twAddComboBoxString(DWORD dwComboBox, string szText="");
void twKillComboBoxString(DWORD dwComboBox, int index);
int twFindComboBoxString(DWORD dwComboBox, string szText);
int twGetComboBoxItemCount(DWORD dwComboBox);
int twGetComboBoxSelection(DWORD dwComboBox);
string twGetComboBoxItemString(DWORD dwComboBox, int item);
void twSetComboBoxSelectedItem(DWORD dwComboBox, int item);
void twSetCheckBoxCheck(DWORD dwCheckBox, int checked=1);
int twGetCheckBoxChecked(DWORD dwCheckBox);
void twSetRadioBoxCheck(DWORD dwRadioBox, int checked);
int twGetRadioBoxChecked(DWORD dwRadioBox);
DWORD twGetLastMenuClicked(void);
void twAddToolBarButton(DWORD dwToolBar, int iCommand, DWORD dwBitmap=0);
void twAddToolBarSeparator(DWORD dwToolBar);
void twClearCanvas(DWORD dwCanvas, DWORD dwColor=0xffffffff);
Cheers,
-naota
Madness never stops..... It takes a breather every once in a while, but then it grabs it's inhaler and chases you down the street with a cane.
Aex.Uni forums