RustyKnight
10-15-2007, 08:58 AM
Hi All!!
I've been bagging my against this problem all day.
Basically, I've created myself a ICUIFrame, onto which (I think) I've attached a IRollupWindow
// Create the custom window...
HWND hToolbar = CreateWindow(
CUSTTOOLBARWINDOWCLASS,
NULL,
WS_CHILD | WS_VISIBLE,
0, 0, 250, 100,
hWnd,
NULL,
hInstance,
NULL);
// -- Now link the toolbar to the CUI frame
ICustToolbar *iToolBar = GetICustToolbar(hToolbar);
iToolBar->LinkToCUIFrame(hWnd, NULL);
iToolBar->SetBottomBorder(FALSE);
iToolBar->SetTopBorder(FALSE);
iToolBar->SetNumRows(2);
// Manages the messages for our toolbar...
tbMsgHandler = new TBMsgHandler(iFrame);
iFrame->InstallMsgHandler(tbMsgHandler);
// Set up the size and position
RECT rect;
SIZE sz;
iToolBar->GetFloatingCUIFrameSize(&sz);
rect.top = 200; rect.left = 200;
rect.right = rect.left+250; rect.bottom = rect.top+100;
GetCUIFrameMgr()->FloatCUIWindow(hWnd, &rect);
MoveWindow(hWnd, rect.left, rect.right, 250, 100, TRUE);
// Dynamically create the rollup window...
IRollupWindow *irup = CreateRollupWindow(_T("ruTest"), 0, 0, 100, 100, iToolBar->GetHwnd(), hInstance);
Thus far, we seem to doing quite well. My problem is now, how do I add a new IRollupPanel to the IRollupWindow?!
Now I know, you've all gone, that's easy...actually, it's not...for me....
virtual int IRollupWindow::AppendRollup ( HINSTANCE hInst,
MCHAR * dlgTemplate,
DLGPROC dlgProc,
MCHAR * title,
LPARAM param = 0,
DWORD flags = 0,
int category = ROLLUP_CAT_STANDARD
) [pure virtual]
The problem I have is I don't have dlgTemplate (parameter 2). This is typically derived from the imbeded resource file, but I don't have one.
I thought of creating one with the rollout window on it, but then how do I make it into a custom toolbar?!
I've spent some time trying to figure out how I can create one, but without any real luck.
Any ideas and help would be appriciated.
I've been bagging my against this problem all day.
Basically, I've created myself a ICUIFrame, onto which (I think) I've attached a IRollupWindow
// Create the custom window...
HWND hToolbar = CreateWindow(
CUSTTOOLBARWINDOWCLASS,
NULL,
WS_CHILD | WS_VISIBLE,
0, 0, 250, 100,
hWnd,
NULL,
hInstance,
NULL);
// -- Now link the toolbar to the CUI frame
ICustToolbar *iToolBar = GetICustToolbar(hToolbar);
iToolBar->LinkToCUIFrame(hWnd, NULL);
iToolBar->SetBottomBorder(FALSE);
iToolBar->SetTopBorder(FALSE);
iToolBar->SetNumRows(2);
// Manages the messages for our toolbar...
tbMsgHandler = new TBMsgHandler(iFrame);
iFrame->InstallMsgHandler(tbMsgHandler);
// Set up the size and position
RECT rect;
SIZE sz;
iToolBar->GetFloatingCUIFrameSize(&sz);
rect.top = 200; rect.left = 200;
rect.right = rect.left+250; rect.bottom = rect.top+100;
GetCUIFrameMgr()->FloatCUIWindow(hWnd, &rect);
MoveWindow(hWnd, rect.left, rect.right, 250, 100, TRUE);
// Dynamically create the rollup window...
IRollupWindow *irup = CreateRollupWindow(_T("ruTest"), 0, 0, 100, 100, iToolBar->GetHwnd(), hInstance);
Thus far, we seem to doing quite well. My problem is now, how do I add a new IRollupPanel to the IRollupWindow?!
Now I know, you've all gone, that's easy...actually, it's not...for me....
virtual int IRollupWindow::AppendRollup ( HINSTANCE hInst,
MCHAR * dlgTemplate,
DLGPROC dlgProc,
MCHAR * title,
LPARAM param = 0,
DWORD flags = 0,
int category = ROLLUP_CAT_STANDARD
) [pure virtual]
The problem I have is I don't have dlgTemplate (parameter 2). This is typically derived from the imbeded resource file, but I don't have one.
I thought of creating one with the rollout window on it, but then how do I make it into a custom toolbar?!
I've spent some time trying to figure out how I can create one, but without any real luck.
Any ideas and help would be appriciated.
