我在APP中加入InitializeSkin(_T("XPCorona.ssk"));
运行可以出现带皮肤的程序。。可是过了一下子,马上就自动退出程序了。。这是怎么一回事??
把这句注释掉 程序正常运行

解决方案 »

  1.   

    SKIN++。。
    代码就是在应用程序类添加了一天初始化语句BOOL CMyApp::InitInstance() 
    {

    AfxEnableControlContainer();
                    //这条是添加的
    InitializeSkin(_T("XPCorona.ssk"));
     #ifdef _AFXDLL
      Enable3dControls(); // Call this when using MFC in a shared DLL
         #else
      Enable3dControlsStatic(); // Call this when linking to MFC statically
     #endif

    }
      

  2.   

    复杂的程序 用任何皮肤库 都得经受皮肤库的折磨 现在不会以后会 偶深有体会 但一直在用xtreme 可试之
      

  3.   


    BOOL CTestSDIApp::InitInstance()
    {
    /*
    { // BLOCK: doc template registration
    // Register the document template.  Document templates serve
    // as the connection between documents, frame windows and views.
    // Attach this form to another document or frame window by changing
    // the document or frame class in the constructor below.
    CSingleDocTemplate* pNewDocTemplate = new CSingleDocTemplate(
    IDR_TESTSDIFORMVIEW_TMPL,
    RUNTIME_CLASS(CTestSDIDoc), // document class
    RUNTIME_CLASS(CMainFrame), // frame class
    RUNTIME_CLASS(CTestSDIFormView)); // view class
    AddDocTemplate(pNewDocTemplate);
    }
    */ 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.
    //--------------------------------------------------------------------------
    InitializeSkin(_T("XPCorona.ssk"));  //Very good
    // InitializeSkin(_T("Minimized.ssk")); //Very good
    // InitializeSkin(_T("SoftCrystal.ssk"));  //Very good CSingleDocTemplate* pDocTemplate;
    pDocTemplate = new CSingleDocTemplate(
    IDR_MAINFRAME,
    RUNTIME_CLASS(CTestSDIDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CTestSDIView));
    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;
    }这个是 skin++ 原版例子你看看~···
      

  4.   

    我就在初始化那地方加了一个计时器结果就不能正常运行了要是我去掉那个计时器的话 就可以正常运行了求大侠指点BOOL CMyDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();// InitializeSkin("XPCorona.ssk");
    // LoadSkin(_T("XPCorona.ssk"));
     
    // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range.
    ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
    ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE);
    if (pSysMenu != NULL)
    {
    CString strAboutMenu;
    strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
    } // Set the icon for this dialog.  The framework does this automatically
    //  when the application's main window is not a dialog
    SetIcon(m_hIcon, TRUE); // Set big icon
    SetIcon(m_hIcon, FALSE); // Set small icon

    // TODO: Add extra initialization here CTime t = CTime::GetCurrentTime();
    CString str;
    str.Format("µ±Ç°Ê±¼äΪ£º%dÄê%dÔÂ%dÈÕ%dʱ%d·Ö%dÃë",t.GetYear(),t.GetMonth(),t.GetDay(),t.GetHour(),t.GetMinute(),t.GetSecond());
        SetDlgItemText(IDC_CURRENTTIME,str);
    SetTimer(1,1000,NULL);  // 我把这行注释掉就可以运行了。。
        MinuteSet(); m_menu.LoadMenu(IDR_MENU1);
    SetMenu(&m_menu);

        return TRUE;  // return TRUE  unless you set the focus to a control
    }