本文整理汇总了C++中InitApplication函数的典型用法代码示例。如果您正苦于以下问题:C++ InitApplication函数的具体用法?C++ InitApplication怎么用?C++ InitApplication使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了InitApplication函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: acrxEntryPoint
/////////////////////////////////////////////////////////////////////////////
// ObjectARX EntryPoint
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
AcRxDynamicLinker *pLinker = acrxDynamicLinker;
switch (msg) {
case AcRx::kInitAppMsg:
// Comment out the following line if your
// application should be locked into memory
pLinker->unlockApplication(pkt);
pLinker->registerAppMDIAware(pkt);
// check if the arx app is loaded or not.
// if not, load it as UI so that we won't have
// proxy if this dll is unloaded by OS
if (!isModuleLoaded("AsdkSmileyDb.dbx"))
{
if (!pLinker->loadModule("AsdkSmileyDb.dbx", false, true))
return AcRx::kRetError;
}
// bump the reference count
pLinker->loadModule("AsdkSmileyDb.dbx", false, false);
InitApplication();
break;
case AcRx::kUnloadAppMsg:
pLinker->unloadModule("AsdkSmileyDb.dbx");
UnloadApplication();
break;
}
return AcRx::kRetOK;
}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:31,代码来源:SmileyUi.cpp
示例2: return
BOOL WinParent::Init(HINSTANCE hInstance, int nCmdShow)
{
// Save the application-instance handle.
m_hInstance = hInstance;
return ( InitApplication() && InitInstance(nCmdShow) );
}
开发者ID:Zandriy,项目名称:RedBook8th,代码行数:7,代码来源:WinParent.cpp
示例3: acrxEntryPoint
/////////////////////////////////////////////////////////////////////////////
// ObjectARX EntryPoint
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
switch (msg) {
case AcRx::kInitAppMsg:
// Comment out the following line if your
// application should be locked into memory
acrxDynamicLinker->unlockApplication(pkt);
acrxDynamicLinker->registerAppMDIAware(pkt);
InitApplication();
break;
case AcRx::kUnloadAppMsg:
UnloadApplication();
break;
// add or remove items to/from document status
// bar here because all databases are active at this point.
case AcRx::kLoadDwgMsg:
//CreateDocumentWorkspace(curDoc());
break;
case AcRx::kUnloadDwgMsg:
//DestroyDocumentWorkspace(curDoc());
break;
}
return AcRx::kRetOK;
}
开发者ID:MadhukarMoogala,项目名称:MyBlogs,代码行数:28,代码来源:BarsWorkspace.cpp
示例4: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
// if (CheckAvailableIOCP())
// {
if (!InitApplication(hInstance))
return (FALSE);
if (!InitInstance(hInstance, nCmdShow))
return (FALSE);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
/* }
else
{
TCHAR szMsg[1024];
LoadString(hInstance, IDS_NOTWINNT, szMsg, sizeof(szMsg));
MessageBox(NULL, szMsg, _LOGINGATE_SERVER_TITLE, MB_OK|MB_ICONINFORMATION);
return -1;
}
*/
return (msg.wParam);
}
开发者ID:KaSt,项目名称:mir2ei,代码行数:30,代码来源:GameSvr.cpp
示例5: WinMain
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
HANDLE hAccelTable;
if (!InitApplication(hInstance))
{
return (FALSE);
}
if (!InitInstance(hInstance, nCmdShow))
{
return (FALSE);
}
StartTimer();
hAccelTable = LoadAccelerators (hInstance, MAKEINTRESOURCE(IDR_GENERIC));
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator (msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
StopTimer();
return (msg.wParam); /* Returns the value from PostQuitMessage */
}
开发者ID:fruitsamples,项目名称:RollerCoaster,代码行数:33,代码来源:Win32Application.c
示例6: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInst*/, LPSTR /*lpszCmdParam*/, int nCmdShow)
{
MSG msg;
HACCEL hAccel = AtlLoadAccelerators(IDR_ACCELERATOR1);
if (!LoadLibrary("RICHED32.DLL"))
{
MessageBox(nullptr, "Could not load RICHED32.DLL", nullptr, MB_OK);
return (FALSE);
}
if (!InitApplication(hInstance))
{
MessageBox(nullptr, "Could not initialize application", nullptr, MB_OK);
return (FALSE);
}
if (!InitInstance(hInstance, nCmdShow))
{
MessageBox(nullptr, "Could not create window", nullptr, MB_OK);
return (FALSE);
}
// message loop
while (GetMessage(&msg, nullptr, 0, 0))
{
if (!TranslateAccelerator(hwnd_main,hAccel,&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} // while(GetMessage...
return static_cast<int>(msg.wParam);
} // WinMain
开发者ID:dbremner,项目名称:Nullsoft_Sex,代码行数:34,代码来源:sex.cpp
示例7: WinMain
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
HANDLE hAccelTable;
if(!hPrevInst)
{
if(!InitApplication(hInst))
return FALSE;
}
if(!InitInstance(hInst, nCmdShow))
return FALSE;
hAccelTable = LoadAcceleratorsW(hInst, MAKEINTRESOURCEW(IDA_OLEVIEW));
while(GetMessageW(&msg, NULL, 0, 0))
{
if(TranslateAcceleratorW(globals.hMainWnd, hAccelTable, &msg)) continue;
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
return msg.wParam;
}
开发者ID:Kelimion,项目名称:wine,代码行数:26,代码来源:oleview.c
示例8: WinMain
/* ************************************
* WinMain
* 功能 程序入口点,调用InitApplication,InitInstance
* 消息循环
* 参数 hinstance,应用程序本次运行实例
* hPrevInstance,应用程序之前的实例,始终为NULL
* lpCmdLine,命令行参数
* nCmdShow,如果窗口,SW_SHOW
* 返回值 失败返回FALSE
**************************************/
int WINAPI WinMain(
HINSTANCE hinstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
BOOL fGotMessage;
// InitApplication
if (!InitApplication(hinstance))
{
return FALSE;
}
// InitInstance
if (!InitInstance(hinstance, nCmdShow))
{
return FALSE;
}
// 消息循环
while ((fGotMessage = GetMessage(&msg, (HWND) NULL, 0, 0)) != 0 && fGotMessage != -1)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
UNREFERENCED_PARAMETER(lpCmdLine);
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:37,代码来源:ClipView.c
示例9: WinMain
/*************************************
* WinMain
**************************************/
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
BOOL fGotMessage;
if (!InitApplication(hinstance))
return 1;
if (!InitInstance(hinstance, nCmdShow))
return 1;
if(!DoRegisterDeviceInterface( GUID_DEVINTERFACE_DISK, &hDevNotify ))
// GUID_DEVINTERFACE_MEDIUMCHANGER
// GUID_DEVINTERFACE_VOLUME
// GUID_DEVINTERFACE_STORAGEPORT
// ……
{
return 1;
}
while ((fGotMessage = GetMessage(&msg, (HWND) NULL, 0, 0)) != 0 && fGotMessage != -1)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
UNREFERENCED_PARAMETER(lpCmdLine);
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:32,代码来源:DevChg.c
示例10: WinMain
int PASCAL WinMain(HANDLE hInstance, /* current instance */
HANDLE hPrevInstance, /* current instance */
LPSTR lpCmdLine, /* command line */
int nCmdShow) /* show-window type (open/icon) */
{
MSG msg; /* message */
if (!hPrevInstance) /* Other instances of app running? */
if (!InitApplication(hInstance)) /* Initialize shared things */
return (FALSE); /* Exits if unable to initialize */
/* Perform initializations that apply to a specific instance
*/
if (!InitInstance(hInstance, lpCmdLine, nCmdShow))
return (FALSE);
/* Acquire and dispatch messages until a WM_QUIT message is received.
*/
while (GetMessage(&msg, /* message structure */
(HWND) NULL, /* handle of window receiving the message */
0, /* lowest message to examine */
0)) /* highest message to examine */
{
TranslateMessage(&msg); /* Translates virtual key codes */
DispatchMessage(&msg); /* Dispatches message to window */
}
return (msg.wParam); /* Returns the value from PostQuitMessage */
} // WinMain
开发者ID:kellysautter,项目名称:10cKelly,代码行数:31,代码来源:xodgen.c
示例11: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow)
{
MSG msg;
// HANDLE hAccelTable;
BOOL fActivated;
SetUnhandledExceptionFilter(&MyExceptionFilter);
hInst = hInstance;
if(FAILED(ActivatePreviousInstance(szAppName, NULL, &fActivated)) || fActivated)
return 0;
InitCommonControls();
if (!InitApplication())
return 0;
// hAccelTable = LoadAccelerators(hInst,MAKEINTRESOURCE(IDACCEL));
if ((hwndMain = CreateboxworldWndClassWnd()) == (HWND)0)
return 0;
ShowWindow(hwndMain, nCmdShow);
UpdateWindow(hwndMain);
while (GetMessage(&msg,NULL,0,0)) {
// if (!TranslateAccelerator(msg.hwnd,hAccelTable,&msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
// }
}
return msg.wParam;
}
开发者ID:larryli,项目名称:BoxWorld,代码行数:29,代码来源:boxworld.c
示例12: zhfzhftool_dttk
// ----- zhfzhftool._dttk command (do not rename)
static void zhfzhftool_dttk(void)
{
// Add your code for command zhfzhftool._dttk here
if (g_bIsTukuFirst)
{
InitApplication() ;
}
else
{
CMDIFrameWnd* pAcadFrame = acedGetAcadFrame();
if (g_pArrayZhfPaletteSet.GetCount()>1)
{
CZhfPaletteSet* pSet = g_pArrayZhfPaletteSet.GetAt(1) ;
if (pSet->IsWindowVisible())
{
pAcadFrame->ShowControlBar(pSet, FALSE, FALSE);
}
else
{
pAcadFrame->ShowControlBar(pSet, TRUE, FALSE);
}
}
else
{
acutPrintf(_T("\n图库面板没有创建或创建失败,无法显示!")) ;
}
}
}
开发者ID:luosin,项目名称:Temp,代码行数:30,代码来源:acrxEntryPoint.cpp
示例13: WinMain
/****************************************************************************
*
* FUNCTION: WinMain
*
* PURPOSE: Main entry point for this app
*
* PARAMS: HANDLE hInstance - This instance
* HANDLE hPrevInstance - Previous instance
* LPSTR lpszCmdLine - Command Line
* int nCmdShow - Desired window status
*
* RETURNS: int - return code
*
* History:
* July '95 - Created
*
\****************************************************************************/
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
MSG msg;
// standard init stuff
if( ! hPrevInstance )
{
if( ! InitApplication( hInstance ) )
{
return FALSE;
}
}
if( ! InitInstance( hInstance, nCmdShow ) )
{
return FALSE;
}
// Standard message loop
while (GetMessage(&msg, (HWND) NULL, 0, 0))
{
if( !TranslateMDISysAccel(hMDIClientWnd, &msg) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
开发者ID:Springuin,项目名称:Mailnotifier-ConfigurationTool,代码行数:45,代码来源:ICONPRO.C
示例14: wWinMain
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
MSG msg;
/* Other instances of app running? */
if (!hPrevInstance)
{
/* stuff to be done once */
if (!InitApplication(hInstance))
{
return FALSE; /* exit */
}
}
/* stuff to be done every time */
if (!InitInstance(hInstance, nCmdShow))
{
return FALSE;
}
HandleCommandLine(lpCmdLine);
/* Main loop */
/* Acquire and dispatch messages until a WM_QUIT message is received */
while (GetMessageW(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
return msg.wParam;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:32,代码来源:view.c
示例15: CreateWindows
int CreateWindows()
{
if (!InitApplication(NULL))
return FALSE;
if (!InitInstance(NULL, TRUE))
return FALSE;
// register the video window class
WNDCLASSEX wcx;
wcx.cbSize = sizeof(wcx); // size of structure
wcx.style = 0; // redraw if size changes
wcx.lpfnWndProc = MainWndProc; // points to window procedure
wcx.cbClsExtra = 0; // no extra class memory
wcx.cbWndExtra = 0; // no extra window memory
wcx.hInstance = NULL; // handle to instance
wcx.hIcon = LoadIcon(NULL,
IDI_APPLICATION); // predefined app. icon
wcx.hCursor = LoadCursor(NULL,
IDC_ARROW); // predefined arrow
wcx.hbrBackground = (HBRUSH)GetStockObject(
BLACK_BRUSH); // black background brush
wcx.lpszMenuName = NULL; // name of menu resource
wcx.lpszClassName = "PlaceCallVideoClass"; // name of window class
wcx.hIconSm = NULL;
ATOM x = RegisterClassEx(&wcx);
// create the Preview Window and the Video Window
HWND hPreview = createPreviewWindow(hMain);
HWND hVideo = createVideoWindow(hMain);
return 0;
}
开发者ID:Jaroslav23,项目名称:sipxtapi,代码行数:33,代码来源:PlaceCallWntApp.cpp
示例16: init_gui
bool init_gui(HINSTANCE hInstance, HINSTANCE hPrevInstance, int nShowCmd) {
if (!InitApplication(hInstance)) {
return false;
}
if (!InitInstance(hInstance, nShowCmd)) {
return false;
}
return true;
}
开发者ID:jiangxilong,项目名称:yari,代码行数:9,代码来源:Main_wince.cpp
示例17: init_windows
static BOOL init_windows(HINSTANCE hInstance, int nShowCmd) {
if (!InitApplication(hInstance)) {
return FALSE;
}
if (!InitInstance(hInstance, nShowCmd)) {
return FALSE;
}
return TRUE;
}
开发者ID:sfsy1989,项目名称:j2me,代码行数:9,代码来源:winceapp_export.cpp
示例18: WinMain
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
LPSTR /*lpCmdLine*/, int nCmdShow) {
sprintf(szAppClass, "GameServer%d", (int) hInstance);
if (!InitApplication(hInstance)) return (false);
if (!InitInstance(hInstance, nCmdShow)) return (false);
Initialize();
EventLoop();
return 0;
}
开发者ID:JoshShangTsung,项目名称:HB-Shadow,代码行数:10,代码来源:Wmain.cpp
示例19: AppInit
BOOL AppInit (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
int nCmdShow)
{
if (!hPrevInstance) {
if (!InitApplication (hInstance, szAppName, szChildName))
return FALSE;
}
return InitInstance (hInstance, szAppName, nCmdShow);
}
开发者ID:banica,项目名称:educatie,代码行数:10,代码来源:Checker3.c
示例20: main
main(int argc, char *argv[], char *envp[])
{
HAB hab;
HMQ hmq;
QMSG qmsg;
char szBuf[MAX_BUF];
ATOM atom;
hab = WinInitialize( 0 );
hmq = WinCreateMsgQueue( hab, 0 );
atom = WinAddAtom(WinQuerySystemAtomTable(), CLASS_NAME);
if(Initialize(0, argv[0]))
{
WinPostQueueMsg(0, WM_QUIT, 1, 0);
}
else if(!InitApplication(0))
{
char szEFailed[MAX_BUF];
if(NS_LoadString(0, IDS_ERROR_FAILED, szEFailed, MAX_BUF) == WIZ_OK)
{
sprintf(szBuf, szEFailed, "InitApplication().");
PrintError(szBuf, ERROR_CODE_SHOW);
}
WinPostQueueMsg(0, WM_QUIT, 1, 0);
}
else if(ParseUninstallIni(argc, argv))
{
WinPostQueueMsg(0, WM_QUIT, 1, 0);
}
else if(ugUninstall.bUninstallFiles == TRUE)
{
if(diUninstall.bShowDialog == TRUE)
hDlgUninstall = InstantiateDialog(hWndMain, DLG_UNINSTALL, diUninstall.szTitle, DlgProcUninstall);
else
ParseAllUninstallLogs();
}
if((ugUninstall.bUninstallFiles == TRUE) && (diUninstall.bShowDialog == TRUE))
{
while ( WinGetMsg( hab, &qmsg, NULLHANDLE, 0, 0 ) )
WinDispatchMsg( hab, &qmsg );
}
/* Do clean up before exiting from the application */
DeInitialize();
WinDeleteAtom(WinQuerySystemAtomTable(), atom);
WinDestroyMsgQueue( hmq );
WinTerminate( hab );
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:55,代码来源:uninstall.c
注:本文中的InitApplication函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论