📄 mailgui.cxx
字号:
/*
* mailgui.cxx
*
* Electronic mail GUI interface.
*
* Portable Windows Library
*
* Copyright (c) 1993-1998 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Portions are Copyright (C) 1993 Free Software Foundation, Inc.
* All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* $Log: mailgui.cxx,v $
* Revision 1.5 1998/11/30 04:49:49 robertj
* New directory structure
*
* Revision 1.4 1998/09/24 03:42:48 robertj
* Added open software license.
*
* Revision 1.3 1997/04/27 05:50:32 robertj
* DLL support.
*
* Revision 1.2 1995/08/24 12:45:13 robertj
* Implementation of mail for GUIs.
*
* Revision 1.1 1995/04/01 08:13:50 robertj
* Initial revision
*
*/
#include <pwlib.h>
#include <pwlib/mailgui.h>
//////////////////////////////////////////////////////////////////////////////
// PMail
PMailGUI::PMailGUI(PInteractor * parent)
{
owner = parent;
if (parent != NULL)
LogOnGUI(parent);
}
PMailGUI::~PMailGUI()
{
LogOff();
}
BOOL PMailGUI::LogOnGUI(PInteractor * parent)
{
if (parent != NULL)
owner = parent;
if (owner == NULL)
owner = PApplication::Current().GetWindow();
hUserInterface = (UINT)owner->GetHWND();
return LogOnCommonInterface(NULL, NULL, NULL);
}
BOOL PMailGUI::SendGUI()
{
#if P_HAS_CMC
if (cmc.IsLoaded()) {
CMC_message message;
memset(&message, 0, sizeof(message));
lastError = cmc.send(sessionId, &message,
CMC_SEND_UI_REQUESTED | CMC_ERROR_UI_ALLOWED,
(CMC_ui_id)hUserInterface, NULL);
return lastError == CMC_SUCCESS;
}
#endif
#if P_HAS_MAPI
if (mapi.IsLoaded()) {
MapiMessage message;
memset(&message, 0, sizeof(message));
lastError = mapi.SendMail(sessionId,
(HWND)hUserInterface, &message, MAPI_DIALOG, 0);
return lastError == SUCCESS_SUCCESS;
}
#endif
lastError = 1;
return FALSE;
}
// End Of File ///////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -