MAPIAddress Problem (OpenInsight 32-Bit)
At 20 FEB 2003 09:15:40AM Richard Richter wrote:
I have a small program that I created to send email to a fixed group and with the use of MAPIAddress, to any other individuals that might require it on a specific day. Everything works fine except when MAPIAddress pops up the Address Book, the window is buried under all the other windows open on the desktop and has to be moved to the front. Is there any way to get the Address Book to open on top of all the other windows on the desktop?
Richard Richter
At 20 FEB 2003 04:34PM Richard Bright wrote:
If you can get the MAPI Windows's handle, then yes, you should be able to set it as Topmost using WinAPI -
BringWindowToTop(hwnd) *
The BringWindowToTop function brings the specified window to the top of the Z order. If the window is a top-level window, it is activated. If the window is a child window, the top-level parent window associated with the child window is activated.
* the code below is for a 16bit system
* In DLL_USER add the line
VOID PASCAL BringWindowToTop(USHORT)
* the code for 32bit system is
In DLL_USER32 add line
INT STDCALL BringWindowToTop(HANDLE)
Note: You can Set Topmost within OI for an OI window thus * Sets this window to Topmost Call SetStyleEx(Win,8) Subroutine SetStyleEX *
subroutine SETSTYLEEX(CtrlEntID,AddStyle)
declare function Get_Property, Set_Property
get the current StyleSTYLE_EX')
If Style1,2_eqc "0x" thenconvert @lower.case to @upper.case in StyleMX")end
add the new styleSTYLE_EX',Style)
Return
Of cause there may be an easier way that I have forgotten, overlooked…
Richard Bright
BrightIdeas New Zealand
At 20 FEB 2003 08:49PM Richard Richter wrote:
I know I've done this before, but how do I access DLL_User32. I think it has something to do with Declare_Fcns but i don't remember anything else.
Thanks,
Richard
At 21 FEB 2003 01:17AM Richard Bright wrote:
In Sysprog account, System Editor Open File | SYSPROCS | DLL_USER32 ie source code files, record DLL_USER32)
Add the line for 32bit API, if not already there then SAVE. Then -
RUN DECLARE_FCNS 'DLL_USER32'
This makes the function available.
Richard Bright
BrightIdeas New Zealand