本文整理匯總了C++中Enable3dControls函數的典型用法代碼示例。如果您正苦於以下問題:C++ Enable3dControls函數的具體用法?C++ Enable3dControls怎麽用?C++ Enable3dControls使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Enable3dControls函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AfxEnableControlContainer
BOOL CMFCTestApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMFCTestDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMFCTestView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
示例2: AfxSocketInit
BOOL CLLKCLIApp::InitInstance()
{
AfxSocketInit();
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
GetPrivateProfileStringA("SERVER_INFO","IP","127.0.0.1",ip,sizeof(ip),"./set.ini");
char strPort[5];
GetPrivateProfileStringA("SERVER_INFO","PORT","5601",strPort,sizeof(strPort),"./set.ini");
port = atoi(strPort);
m_pSockThd = new CSockThd;
m_pSockThd->CreateThread();
CLLKCLIDlg login;
int nResponse = login.DoModal();
if(nResponse == IDCANCEL)
return FALSE;
CLLKHome home;
home.m_uid=userInfo.id;
home.m_nick=userInfo.nick;
home.m_score=userInfo.type;
if(userInfo.sex==0){
home.m_sex="Å®";
}
else{
home.m_sex="ÄÐ";
}
m_pMainWnd = &home;
home.DoModal();
return FALSE;
}
示例3: Enable3dControls
BOOL CImagingApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_IMAGINTYPE,
RUNTIME_CLASS(CImagingDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CImagingView));
AddDocTemplate(pDocTemplate);
// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame;
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The main window has been initialized, so show and update it.
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
return TRUE;
}
示例4: ParseCommandLine
BOOL CDataViewApp::InitInstance()
{
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// ProcessShellCommand(cmdInfo);
CSplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash);
//Set up date and time defaults so they're the same as system defaults
setlocale(LC_ALL, "usa");
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
AfxEnableControlContainer();
HBRUSH hBrush=(HBRUSH)GetStockObject(WHITE_BRUSH);
HCURSOR hCur=(HCURSOR)::LoadCursor(NULL,IDC_ARROW);
HICON hIco=LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME));
LPCTSTR lpClass=AfxRegisterWndClass(CS_DBLCLKS|CS_VREDRAW,hCur,hBrush,hIco);
CMainFrame *pMainFrame = new CMainFrame;
RECT rcM = { 0,0,100,100 };
::GetWindowRect(::GetDesktopWindow(),&rcM);
if (!pMainFrame->Create(lpClass,"Interactive Time Series Viewer", WS_VISIBLE | WS_OVERLAPPEDWINDOW,rcM,NULL,NULL)) return FALSE;
m_pMainWnd = pMainFrame;
pMainFrame->ShowWindow(m_nCmdShow|SW_SHOWMAXIMIZED);
pMainFrame->UpdateWindow();
pMainFrame->MaiFrameMenu.LoadMenu(IDR_MAINFRAME);
pMainFrame->SetMenu(&pMainFrame->MaiFrameMenu);
pMainFrame->SendMessage(WM_COMMAND,IDC_AUTOAMP);
LoadGainMenu();
LoadFilterMenu();
return TRUE;
}
示例5: InitCommonControls
BOOL CStatusPanesApp::InitInstance()
{
InitCommonControls();
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#if _MFC_VER < 0x700
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey( _T("Foss") );
// To create the main window, this code creates a new frame window
// object and then sets it as the application's main window object.
CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
// create and load the frame with its resources
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
// // The one and only window has been initialized, so show and update it.
// pFrame->ShowWindow(SW_SHOW);
// pFrame->UpdateWindow();
// window placement persistence
pFrame->ActivateFrame( SW_SHOW );
return TRUE;
}
示例6: Enable3dControls
BOOL CIgnitionApp::InitInstance()
{
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
m_state = IGNITION_STATE_STARTUP;
m_stateError = 0;
m_pMainWnd = &theDlg;
theDlg.DoModal();
return FALSE;
}
示例7: Enable3dControls
BOOL AtheroApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
Enable3dControls();
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
CMainWindow dlg;
m_pMainWnd = &dlg;
dlg.DoModal();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
示例8: CMutex
BOOL CVideoIntecomSrvApp::InitInstance()
{
m_Mutex = new CMutex(FALSE,"VedioIntercomSrv030407",NULL);
if(m_Mutex->Lock(1) == 0)
{
AfxMessageBox("已經有另外一個實例在運行");
return FALSE;
}
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
NET_DVR_Init();
SetDialogBkColor(RGB(233,233,233),RGB(0,0,0));
CVideoIntecomSrvDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
示例9: Enable3dControls
BOOL CCStatusLogDemoApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
g_statusLog.Init("StatusLog.txt");
g_statusLog.PrintTime(TRUE);
g_statusLog.PrintAppName(TRUE);
g_statusLog.StatusOut("%s", "Howdy, stranger!");
g_statusLog.StatusOut("Did you know that %d * %4.2f = %4.2f ?", 15, 32.434, (15 * 32.434));
g_statusLog.StatusOut("Ain't that great?");
g_statusLog.StatusOut("I'm at : 0x%x", this);
g_statusLog.StatusOut("Is anyone else here?");
CCStatusLogDemoDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
g_statusLog.StatusOut("Bye bye");
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
示例10: AfxEnableControlContainer
BOOL CPKCSDemoApp::InitInstance()
{
AfxEnableControlContainer();
CK_RV rv;
rv = C_Initialize(NULL_PTR);
if(CKR_OK != rv)
{
AfxMessageBox("Can not load ePassNG PKCS#11 runtime!", MB_OK | MB_ICONERROR);
return FALSE;
}
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CPKCSDemoDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
C_Finalize(NULL_PTR);
return FALSE;
}
示例11: CreateMutex
BOOL CVolumeControlApp::InitInstance()
{
CreateMutex( NULL, TRUE, PROG_INSTANCE_NAME );
if( GetLastError() == ERROR_ALREADY_EXISTS )
{
HWND hChatterWnd = FindWindow( NULL, PROG_NAME );
ShowWindow( hChatterWnd, SW_RESTORE );
MessageBox( NULL, "Volume Control already running", "Volume Control",
MB_OK | MB_ICONASTERISK );
return FALSE;
}
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CVolumeControlDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
示例12: AfxEnableControlContainer
BOOL CCallMeSleepApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
if(*m_lpCmdLine != 0) {
int hour = 0;
int min = 0;
int sec = 0;
_stscanf(m_lpCmdLine, _T("%d:%d:%d"), &hour, &min, &sec);
_Module.Init(m_hInstance, _T("CallMeSleep"), NULL);
_Module.m_bService = TRUE;
_Module.SetTime(hour, min, sec);
_Module.Start();
} else {
CCallMeSleepDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
示例13: AfxEnableControlContainer
BOOL CEnrollApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CEnrollDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CCourseView));
AddDocTemplate(pDocTemplate);
// Enable DDE Execute open
EnableShellOpen();
RegisterShellFileTypes(TRUE);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// Enable drag/drop open
m_pMainWnd->DragAcceptFiles();
return TRUE;
}
示例14: Enable3dControls
BOOL CXphoneApp::InitInstance()
{
CWaitCursor pCursor;
if ( ! SetFirstInstance() ) return FALSE;
CString xUserId, xPassword;
if ( ! CheckUsage( xUserId, xPassword ) ) return FALSE;
Enable3dControls();
SetRegistryKey( gcszCopyright );
GetVersionNumber();
AfxOleInit();
AfxEnableControlContainer();
CSplashDlg* dlgSplash = new CSplashDlg;
dlgSplash->Topmost();
dlgSplash->Step( _T("Winsock") );
WSADATA wsaData;
if ( WSAStartup( 0x0101, &wsaData ) ) return FALSE;
dlgSplash->Step( _T("注冊表") );
Settings.Load();
Skin.Apply();
dlgSplash->Step( _T("GUI") );
m_pMainWnd = new CConnectDlg;
CoolMenu.EnableHook();
dlgSplash->Topmost();
m_pMainWnd->ShowWindow( SW_SHOWNORMAL );
// m_pMainWnd->BringWindowToTop();
dlgSplash->Step( _T("連接") );
m_pMainWnd->SendMessage( WM_COMMAND, ID_NETWORK_CONNECT );
dlgSplash->Hide();
pCursor.Restore();
return m_bInitialized = TRUE;
}
示例15: Enable3dControls
BOOL CFraktaleApp::InitInstance()
{
// Standardinitialisierung
// Wenn Sie diese Funktionen nicht nutzen und die Größe Ihrer fertigen
// ausführbaren Datei reduzieren wollen, sollten Sie die nachfolgenden
// spezifischen Initialisierungsroutinen, die Sie nicht benötigen, entfernen.
#ifdef _AFXDLL
Enable3dControls(); // Diese Funktion bei Verwendung von MFC in gemeinsam genutzten DLLs aufrufen
#else
Enable3dControlsStatic(); // Diese Funktion bei statischen MFC-Anbindungen aufrufen
#endif
// Ändern des Registrierungsschlüssels, unter dem unsere Einstellungen gespeichert sind.
// ZU ERLEDIGEN: Sie sollten dieser Zeichenfolge einen geeigneten Inhalt geben
// wie z.B. den Namen Ihrer Firma oder Organisation.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(0); // Standard INI-Dateioptionen laden (einschließlich MRU)
// Dokumentvorlagen der Anwendung registrieren. Dokumentvorlagen
// dienen als Verbindung zwischen Dokumenten, Rahmenfenstern und Ansichten.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CFraktaleDoc),
RUNTIME_CLASS(CMainFrame), // Haupt-SDI-Rahmenfenster
RUNTIME_CLASS(CFraktaleView));
AddDocTemplate(pDocTemplate);
// Befehlszeile parsen, um zu prüfen auf Standard-Umgebungsbefehle DDE, Datei offen
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Verteilung der in der Befehlszeile angegebenen Befehle
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// Das einzige Fenster ist initialisiert und kann jetzt angezeigt und aktualisiert werden.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}