Jason Coley
Posts: 272
Joined: 2005-05-26
|
OK, i have a right Pane and a command bar button. The command bar button Enabled/disables the Right Pane. There are no controls on the Pane as yet.
if cbStandard.Controls[0].AsButton.State = adxMsoButtonUp then
begin
cbStandard.Controls[0].AsButton.State := adxMsoButtonDown;
adxOlFormsManager1.Items[0].Enabled := True;
end
else
begin
cbStandard.Controls[0].AsButton.State := adxMsoButtonUp;
adxOlFormsManager1.Items[0].Enabled := False;
end;
OK pretty simple, but when I do this, the screen flickers quite a bit, and the header, above the actual explorer view contents disappears when the pane does. (The header that displayes the folder name as you switch through the folders).
The Pane is set to show in contact folders only.
Any ideas, I am using BDS2006 Delphi Win32, and tried both Outlook 2003 and 2007, 2007 the header panel doesn't disappear, but there is other odd drawing things happening.
Jason |
|
Fedor Shihantsov
Guest
|
I don't quite understand you. Could you please send me some screenshots? Use my support e-mail address. |
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
Hmm, it seems to have gone at present in Outlook 2k3, after installing SP1, i'll keep an eye on this.
As for the flickering, I understand the control navigates Outlook to the sent items folder then back to reapint things, I am wondering is there any way to Lock the window updates during this process? How would I get the handle to the Outlook window so I can try using LockWindowUpdate around the enabling to see if this will help?
Jason |
|
Fedor Shihantsov
Guest
|
You can use the following code for getting the handle.
IOleWindow = interface(IUnknown)
['{00000114-0000-0000-C000-000000000046}']
function GetWindow(out wnd: HWnd): HResult; stdcall;
function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall;
end;
function GetExplorerWindowHandle(explorer: IDispatch):HWND;
var
IWindow: IOleWindow;
begin
Result := 0;
if explorer = nil then exit;
explorer.QueryInterface(IOleWindow, IWindow);
if Assigned(IWindow) then IWindow.GetWindow(Result)
end;
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
Cool thanks for that, however it didn't work, so I have just decided to make the width 0 when not in use and all code that runs on selection change to not run if width is 0, this seems to be the best way around the issue.
Jason |
|