Click here to Skip to main content
16,012,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Menu messaging Pin
Dor2-Sep-03 12:30
Dor2-Sep-03 12:30 
QuestionHow to resize the MDI child window at startup Pin
mr20032-Sep-03 8:46
mr20032-Sep-03 8:46 
AnswerRe: How to resize the MDI child window at startup Pin
John R. Shaw3-Sep-03 7:12
John R. Shaw3-Sep-03 7:12 
QuestionHow do I add controls to my view? Pin
Anonymous2-Sep-03 8:37
Anonymous2-Sep-03 8:37 
AnswerRe: How do I add controls to my view? Pin
valikac2-Sep-03 9:35
valikac2-Sep-03 9:35 
GeneralRe: How do I add controls to my view? Pin
Anonymous2-Sep-03 10:20
Anonymous2-Sep-03 10:20 
AnswerRe: How do I add controls to my view? Pin
Navin2-Sep-03 10:28
Navin2-Sep-03 10:28 
GeneralHiding MDI child window at startup, check the code please Pin
mr20032-Sep-03 8:24
mr20032-Sep-03 8:24 
Hi,
I have posted this question before and got an answer, but for some reasons it doesn't seem to work, or I have the code at the wrong place.

I copy pasted the code in my InitInstance()
so now it looks like the following:

BOOL CMotionControllerApp::InitInstance()
{
// CG: The following block was added by the Splash Screen component.
\
{
\
CCommandLineInfo cmdInfo;
\
ParseCommandLine(cmdInfo);
\

\
CSplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash);
\
}
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

// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and

CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMotionControllerDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMotionControllerView));
AddDocTemplate(pDocTemplate);

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

/////////////////////////////////////////////////////
//This is the code, it is at the correct spot?
/////////////////////////////////////////////////////
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;

//////////////////////////////////////////////////////
// The one and only window has been initialized, so show and update
// m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
// m_pMainWnd->UpdateWindow();

return TRUE;

Ehsan Behboudi
GeneralRe: Hiding MDI child window at startup, check the code please Pin
valikac2-Sep-03 9:38
valikac2-Sep-03 9:38 
GeneralRe: Hiding MDI child window at startup, check the code please Pin
Brian Shifrin3-Sep-03 12:08
Brian Shifrin3-Sep-03 12:08 
GeneralAutomation server help needed Pin
Gilrock2-Sep-03 8:13
Gilrock2-Sep-03 8:13 
GeneralRe: Automation server help needed Pin
Brian Shifrin3-Sep-03 12:10
Brian Shifrin3-Sep-03 12:10 
GeneralRe: Automation server help needed Pin
Gilrock3-Sep-03 12:53
Gilrock3-Sep-03 12:53 
GeneralRe: Automation server help needed Pin
igor19603-Sep-03 13:48
igor19603-Sep-03 13:48 
GeneralRe: Automation server help needed Pin
Gilrock3-Sep-03 20:07
Gilrock3-Sep-03 20:07 
GeneralRe: Automation server help needed Pin
Gilrock4-Sep-03 6:10
Gilrock4-Sep-03 6:10 
GeneralRe: Automation server help needed Pin
igor19604-Sep-03 7:05
igor19604-Sep-03 7:05 
GeneralRe: Automation server help needed Pin
Gilrock4-Sep-03 8:15
Gilrock4-Sep-03 8:15 
Generalfree(pMemory) Pin
ravingcoder2-Sep-03 8:11
ravingcoder2-Sep-03 8:11 
GeneralRe: free(pMemory) Pin
igor19602-Sep-03 8:15
igor19602-Sep-03 8:15 
GeneralRe: free(pMemory) Pin
ravingcoder2-Sep-03 8:24
ravingcoder2-Sep-03 8:24 
Generalexporting std::string Pin
Jim Crafton2-Sep-03 7:46
Jim Crafton2-Sep-03 7:46 
GeneralRe: exporting std::string Pin
cmk2-Sep-03 7:52
cmk2-Sep-03 7:52 
GeneralRe: exporting std::string Pin
Neville Franks2-Sep-03 10:01
Neville Franks2-Sep-03 10:01 
GeneralRe: exporting std::string Pin
Navin2-Sep-03 10:22
Navin2-Sep-03 10:22 

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.