CMainFrame::CMainFrame() { SetView(m_MainView); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Splitter Sample")); }
CMainFrame::CMainFrame() : m_pLeftPane(0), m_ShowHidden(FALSE) { // Set m_MainView as the view window of the frame SetView(m_RightPane); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Explorer Sample")); }
// Definitions for the CMainFrame class CMainFrame::CMainFrame() { // Constructor for CMainFrame. Its called after CFrame's constructor //Set m_View as the view window of the frame SetView(m_View); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Frame")); }
// Definitions for the CMainFrame class CMainFrame::CMainFrame() : m_pLastActiveDocker(0) { // Constructor for CMainFrame. Its called after CFrame's constructor //Set m_DockTabbedMDI as the view window of the frame SetView(m_DockTabbedMDI); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\TabbedMDI Docking")); }
CMainFrame::CMainFrame() { // Set m_View as the view window of the frame SetView(m_View); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Scribble Sample")); // Load the settings from the registry with 4 MRU entries LoadRegistryMRUSettings(4); }
// Definitions for the CMainFrame class CMainFrame::CMainFrame() : m_nColor(IDM_BLUE), m_UseThemes(TRUE), m_UseBandColors(TRUE), m_UseFlatStyle(FALSE), m_KeepBandsLeft(TRUE), m_LockMenuBand(TRUE), m_UseRoundBorders(TRUE), m_UseShortBands(TRUE), m_UseLines(FALSE), m_ShowArrows(TRUE), m_ShowCards(TRUE) { // Constructor for CMainFrame. Its called after CFrame's constructor //Set m_View as the view window of the frame SetView(m_View); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Themes Sample")); }
// Definitions for the CMainFrame class CMainFrame::CMainFrame() { // Constructor for CMainFrame. Its called after CFrame's constructor m_UseProportionalResize = FALSE; m_Use3DBorder = TRUE; m_DisableUndocking = FALSE; m_DisableResize = FALSE; m_DisableDockLR = FALSE; m_DisableDockClose = FALSE; m_UseDynamicResize = TRUE; //Set m_View as the view window of the frame SetView(m_View); // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\Dock")); }
/////////////////////////////////////////////////////////////////////////////// // SDH_Init - the init entry point // Input: dwContext - the context for this init // Output: // Return: returns instance context // Notes: /////////////////////////////////////////////////////////////////////////////// DWORD SDH_Init(DWORD dwContext) { PSDCARD_HC_CONTEXT pHostContext; // new HC context SD_API_STATUS status; // SD status PSDH_HARDWARE_CONTEXT pController; // new instance HKEY hKeyDevice; LPCTSTR pszActiveKey; DbgPrintZo(SDCARD_ZONE_INIT, (TEXT("SDH: +SDH_Init\n"))); DbgPrintZo(SDCARD_ZONE_INIT, (TEXT("SDH: Active RegPath: %s \n"), (PTSTR)dwContext)); pController = NULL; // allocate the context status = SDHCDAllocateContext(SDH_SLOTS, &pHostContext); if (!SD_API_SUCCESS(status)) { DbgPrintZo(SDCARD_ZONE_ERROR, (TEXT("SDH: Failed to allocate context : 0x%08X \n"), status)); return 0; } // create our extension pController = (PSDH_HARDWARE_CONTEXT)malloc( sizeof(SDH_HARDWARE_CONTEXT) ); if( pController == NULL ) { DbgPrintZo(SDCARD_ZONE_ERROR, (TEXT("SDH: Failed to allocate extension\n"))); return 0; } memset( pController, 0, sizeof(SDH_HARDWARE_CONTEXT) ); // Set our extension pHostContext->pHCSpecificContext = pController; pController = GetExtensionFromHCDContext(PSDH_HARDWARE_CONTEXT, pHostContext); pszActiveKey = (LPCTSTR) dwContext; pController->pszActiveKey = pszActiveKey; pController->hBusAccessHandle = CreateBusAccessHandle( pszActiveKey ); hKeyDevice = OpenDeviceKey(pszActiveKey); if (!hKeyDevice || !LoadRegistrySettings(hKeyDevice, pController) ) { DbgPrintZo(SDCARD_ZONE_ERROR, (TEXT("SDH: Failed load the registry settings\n"))); return 0; } RegCloseKey( hKeyDevice ); DbgPrintZo(SDCARD_ZONE_INIT, (TEXT("SDH: Real RegPath: %s \n"),pController->RegPath)); // save off the host context pController->pHCContext = pHostContext; // set the name SDHCDSetHCName(pHostContext, TEXT("Lubbock")); // set init handler SDHCDSetControllerInitHandler(pHostContext,SDInitialize); // set deinit handler SDHCDSetControllerDeinitHandler(pHostContext, SDDeinitialize); // set the bus request handler SDHCDSetBusRequestHandler(pHostContext,SDHBusRequestHandler); // set the cancel I/O handler SDHCDSetCancelIOHandler(pHostContext, SDHCancelIoHandler); // set the slot option handler SDHCDSetSlotOptionHandler(pHostContext, SDHSlotOptionHandler); // now register the host controller status = SDHCDRegisterHostController(pHostContext); if (!SD_API_SUCCESS(status)) { if( pController ) { free( pController ); } SDHCDDeleteContext(pHostContext); DbgPrintZo(SDCARD_ZONE_ERROR, (TEXT("SDH: Failed to register host controller: %0x08X \n"),status)); return 0; } DbgPrintZo(SDCARD_ZONE_INIT, (TEXT("SDH: -SDH_Init\n"))); // return the Host Controller context return (DWORD)pHostContext; }
CMainMDIFrame::CMainMDIFrame() { // Set the registry key name, and load the initial window position // Use a registry key name like LiteSQL_L( "CompanyName\\Application" ) LoadRegistrySettings(CMDIFrameApp::REGISTRY_KEY); }
CMainMDIFrame::CMainMDIFrame() { // Set the registry key name, and load the initial window position // Use a registry key name like "CompanyName\\Application" LoadRegistrySettings(_T("Win32++\\MDIFrameSplitter")); }
LRESULT CALLBACK WindowProcedure (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { LPMINMAXINFO lpmmi; switch (message) /* handle the messages */ { case WM_WTSSESSION_CHANGE: switch ( wParam ) { case WTS_SESSION_LOCK: SaveEnergyShort(); break; case WTS_SESSION_UNLOCK: break; default: break; } break; case WM_CREATE: { LoadRegistrySettings(); TRAY_Init(hWnd,AUTO_START_FLAG); OnTray(wParam); } break; case WM_KEYDOWN : if (wParam == VK_ESCAPE) { ShowWindow(hWnd, SW_SHOWMINIMIZED); } break; case WM_SIZE: OnSizeTray(wParam); // Minimize/Restore to/from tray break; case WM_NOTIFYICONTRAY: OnNotifyTray(lParam); // Manages message from tray return TRUE; case WM_COMMAND: { if (OnCommandTrayMenu(wParam)) break; } break; case WM_RBUTTONDOWN: { TRAY_Menu_Show();//load POPUP menu in main window (why?) } break; case WM_CLOSE: ShowWindow(hWnd, SW_SHOWMINIMIZED); // Minimize/Restore to/from tray break; case WM_DESTROY: UnregisterSession(hWnd); OnDestroyTray(); PostQuitMessage (0); /* send a WM_QUIT to the message queue */ break; default: /* for messages that we don't deal with */ return DefWindowProc (hWnd, message, wParam, lParam); } return 0; }