This works fine:
class MoveItemDialog:CDialog
{
// Overridden Methods
declare OnClose(),int;
declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare OnInitDialog(),int;
// Public Methods
declare SetSelectedText(string sText);
// Member Variables
string m_sSelectedItem;
}
...
MoveItemDialog::OnInitDialog(),int
{
TREE_ITEM *node;
TREE_ITEM *item;
CListBox *pListBox = GetControl(MD_LST_NODELIST);
for(node = g_List.GetFirst(); node <> 0; node = g_List.GetNext(node))
{
item = g_List.GetData(node);
pListBox->AddString(item->sText);
}
CenterWindow();
return true;
}
MoveItemDialog::SetSelectedText(string sText)
{
m_sSelectedItem = sText;
}
But if I try this (to reduce clutter), node = g_List.GetFirst() returns zero:
class MoveItemDialog:CDialog
{
// Member Variables
string m_sSelectedItem;
// Overridden Methods
declare OnClose(),int;
declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare OnInitDialog(),int;
// Public Methods
declare SetSelectedText(string sText) {m_sSelectedItem = sText;}
}
I don't see a correlation myself. How about the rest of the code?
It's now almost 1300 lines. I could send it to you if you want.