Ejemplo n.º 1
0
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"));
}
Ejemplo n.º 2
0
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"));
}
Ejemplo n.º 3
0
// 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"));
}
Ejemplo n.º 4
0
// 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"));
}
Ejemplo n.º 5
0
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);
}
Ejemplo n.º 6
0
// 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"));
}
Ejemplo n.º 7
0
// 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"));
}
Ejemplo n.º 8
0
///////////////////////////////////////////////////////////////////////////////
//  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;
}
Ejemplo n.º 9
0
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);
}
Ejemplo n.º 10
0
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"));
}
Ejemplo n.º 11
0
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;
}