New mail in top most

Add-in Express™ Support Service
That's what is more important than anything else

New mail in top most
 
karim




Posts: 22
Joined: 2005-11-30
hi,

i Add in my prog a functionnality for i create a new mail always in top most.

This code works.
but don't work if property IsWordMail is true.

i don't undertand why.


procedure TAddInModule.adxOlInspectorCommandBar1BeforeAdd(
CmdBar: TadxOlInspectorCommandBar; Inspector: _Inspector;
var Cancel: Boolean);
begin
LoadIniFile;
if OTopmost then
SetWindowPos(GetActiveWindow,HWND_TOPMOST ,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE)
else
SetWindowPos(GetActiveWindow,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE);
end;
Posted 31 Jan, 2006 05:44:29 Top
Dmitry Kostochko


Add-in Express team


Posts: 2799
Joined: 2004-04-05
Hi Karim,

If IsWordMail returns true, try to use GetForegroundWindow instead of GetActiveWindow.

Posted 31 Jan, 2006 07:03:37 Top
karim




Posts: 22
Joined: 2005-11-30
Thanks Dmitry.
Posted 31 Jan, 2006 10:22:37 Top