Click here to Skip to main content
15,903,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: installed software Pin
Chandrasekharan P28-Jan-09 23:16
Chandrasekharan P28-Jan-09 23:16 
QuestionMSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa28-Jan-09 21:59
raesa28-Jan-09 21:59 
AnswerRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»28-Jan-09 22:17
professional«_Superman_»28-Jan-09 22:17 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa28-Jan-09 22:22
raesa28-Jan-09 22:22 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»28-Jan-09 22:32
professional«_Superman_»28-Jan-09 22:32 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa28-Jan-09 23:13
raesa28-Jan-09 23:13 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»28-Jan-09 23:50
professional«_Superman_»28-Jan-09 23:50 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa29-Jan-09 0:35
raesa29-Jan-09 0:35 
Hi....
My code is pasted here below.I developed this in VS 2005, type of project: MFC Application(.exe)
When i debug the code, it fails in function CreateDlgIndirect (in dlgcore.cpp which is system file)
Please do have a look.Thnx again.

BOOL CMFCExecutableApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();

if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}

// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_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
// 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(4); // 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_MFCExecutableTYPE,
RUNTIME_CLASS(CMFCExecutableDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMFCExecutableView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
// Connect the COleTemplateServer to the document template
// The COleTemplateServer creates new documents on behalf
// of requesting OLE containers by using information
// specified in the document template
m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
// Register all OLE server factories as running. This enables the
// OLE libraries to create objects from other applications
COleTemplateServer::RegisterAll();
// Note: MDI applications register all server objects without regard
// to the /Embedding or /Automation on the command line

// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME))
{
delete pMainFrame;
return FALSE;
}
m_pMainWnd = pMainFrame;
// call DragAcceptFiles only if there's a suffix
// In an MDI app, this should occur immediately after setting m_pMainWnd


// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);

// App was launched with /Embedding or /Automation switch.
// Run app as automation server.
if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
{
// Don't show the main window
return TRUE;
}
// App was launched with /Unregserver or /Unregister switch. Unregister
// typelibrary. Other unregistration occurs in ProcessShellCommand().
else if (cmdInfo.m_nShellCommand == CCommandLineInfo::AppUnregister)
{
m_server.UpdateRegistry(OAT_DISPATCH_OBJECT, NULL, NULL, FALSE);
AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor);
}
// App was launched standalone or with other switches (e.g. /Register
// or /Regserver). Update registry entries, including typelibrary.
else
{
m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
COleObjectFactory::UpdateRegistryAll();
AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid);
}

// Dispatch commands specified on the command line. Will return FALSE if
// app was launched with /RegServer, /Register, /Unregserver or /Unregister.
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The main window has been initialized, so show and update it
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();

return TRUE;
}
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»29-Jan-09 1:28
professional«_Superman_»29-Jan-09 1:28 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa29-Jan-09 18:21
raesa29-Jan-09 18:21 
QuestionCalling a function from another program Pin
Tom Hubin28-Jan-09 21:17
Tom Hubin28-Jan-09 21:17 
AnswerRe: Calling a function from another program Pin
Stuart Dootson28-Jan-09 22:14
professionalStuart Dootson28-Jan-09 22:14 
GeneralRe: Calling a function from another program Pin
Tom Hubin29-Jan-09 19:06
Tom Hubin29-Jan-09 19:06 
GeneralRe: Calling a function from another program Pin
Tom Hubin29-Jan-09 19:25
Tom Hubin29-Jan-09 19:25 
GeneralRe: Calling a function from another program Pin
Stuart Dootson29-Jan-09 23:22
professionalStuart Dootson29-Jan-09 23:22 
GeneralRe: Calling a function from another program Pin
Tom Hubin30-Jan-09 11:18
Tom Hubin30-Jan-09 11:18 
GeneralRe: Calling a function from another program Pin
Stuart Dootson31-Jan-09 0:00
professionalStuart Dootson31-Jan-09 0:00 
AnswerRe: Calling a function from another program Pin
«_Superman_»28-Jan-09 22:14
professional«_Superman_»28-Jan-09 22:14 
QuestionHow can set UP and DOWN arrow in header of CListCtrl? [modified] Pin
Le@rner28-Jan-09 19:39
Le@rner28-Jan-09 19:39 
AnswerRe: How can set UP and DOWN arrow in sorted column in CListCtrl? Pin
SandipG 28-Jan-09 19:45
SandipG 28-Jan-09 19:45 
AnswerRe: How can set UP and DOWN arrow in header of CListCtrl? Pin
Stuart Dootson28-Jan-09 21:57
professionalStuart Dootson28-Jan-09 21:57 
Questionhow to force paint a view in MFC. Pin
VC++Maniac28-Jan-09 19:24
VC++Maniac28-Jan-09 19:24 
AnswerRe: how to force paint a view in MFC. Pin
SandipG 28-Jan-09 19:42
SandipG 28-Jan-09 19:42 
AnswerRe: how to force paint a view in MFC. Pin
CPallini28-Jan-09 21:08
mveCPallini28-Jan-09 21:08 
GeneralRe: how to force paint a view in MFC. Pin
nitin328-Jan-09 21:53
nitin328-Jan-09 21:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.