quote:
Originally posted by couturier
Hi Nikolay,
thanks for that trick. But I don't want to show an additional item in my dialog.
I'm wondering if it's possible to use Dialog::Create to make the getn modalless.
Or if I can show a _ icon in title bar (left to X icon) so I can roll up the dialog and access the wks, just like in nonlinear curve fit dialog
GetN dialog cannot be modeless. You may create one from resource dll.
However, if GetN is the preferred option and you can stand the dialog position, just hack a modeless one like this:
#include <origin.h>
#include <GetNBox.h>
static bool hackEvent(TreeNode& myTree, int nRow, int nType, Dialog& dlgGetNBox)
{
if(nType < 0)
return false;
Window dlg(dlgGetNBox);
dlg.SendMessage(WM_CLOSE);
return false;
}
void MakeGetNModeless()
{
GETN_TREE(hack)
GetNBox(hack, NULL, NULL, NULL, hackEvent);
return;
}
static bool gtEvent(TreeNode& myTree, int nRow, int nType, Dialog& dlgGetNBox)
{
if(nRow < 0)
{
MakeGetNModeless();
return false;
}
return false;
}
void foo()
{
GETN_TREE(gt)
if(GetNBox(gt, NULL, NULL, NULL, gtEvent))
{
}
return;
}
&&&&&&&&&
&&&
&&
& _____ ___________
II__|[] | | I I |
| |_|_ I I _|
< OO----OOO OO---OO
**********************************************************