Home » U++ Library support » Splitter » DHCtrl in SplitterForm
Re: DHCtrl in SplitterForm [message #40619 is a reply to message #40617] |
Fri, 23 August 2013 18:00   |
iST1
Messages: 107 Registered: August 2013
|
Experienced Member |
|
|
koldo wrote on Fri, 23 August 2013 16:42 | Hello iST1
Although I prepared it some time ago, there are some samples of DHCtrl in Bazaar/Controls4U/FirefoxBrowser.cpp - IExplorerBrowser.cpp - VLCPlayer.cpp that could help you.
What window do you want to attach?
|
I want to plase Excel application in left frame of window and for this use OfficeSheet like:
OfficeSheet sheet;
SplitterFrame sf;
if (sheet.IsAvailable("Open")) {
sheet.Init("Open");
} else if (sheet.IsAvailable("Microsoft")) {
sheet.Init("Microsoft");
} else {
Exclamation("No Excel like");
}
Vector<HWND> hw;
GetProcessMainWindows(GetProcessIdFromName("EXCEL"), hw);
AddFrame(sf.Right(fileForm, 500));
AddFrame(InsetFrame());
for (int i = 0; i < hw.GetCount(); i++) {
HWND excel = hw[i];
::SetParent(excel, GetHWND());
}
void GetProcessMainWindows (DWORD dwProcessID, Vector <HWND> &vWindows)
{
HWND hwnd = NULL;
do {
hwnd = FindWindowEx (NULL, hwnd, NULL, NULL);
DWORD dwPID = 0;
GetWindowThreadProcessId (hwnd, &dwPID);
if (dwPID == dwProcessID)
vWindows.Add (hwnd);
} while (hwnd != NULL);
}
This code works without DHCtrl, but when changing splitter, Excel window remains fixed. May be need to catch some Resize-event in SplitterFrame and call SetWindowPos like in DHCtrl::SyncHWND.
[Updated on: Fri, 23 August 2013 18:02] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jun 06 21:08:09 CEST 2025
Total time taken to generate the page: 0.04820 seconds
|