c++.mfc - WOOOOOOOOOO IT WORKS!!!!
- James Kirkham (5/5) Oct 15 2002 Thank you bw, Jan and user@domian.invalid!!! I finally managed to get my
- James Kirkham (10/15) Oct 15 2002 Just one little thing.....
- Jan Knepper (4/22) Oct 15 2002 I guess you might be using a wrong .def file, indicating that the progra...
- James Kirkham (56/80) Oct 15 2002 Here is some info:
- Jan Knepper (2/87) Oct 15 2002
- Jan Knepper (5/90) Oct 15 2002 Do not know what your problem is.
- bw (3/5) Oct 15 2002 to kill the console window opening use a def file (EXETYPE NT) there's p...
- bw (9/11) Oct 15 2002 well actually i made an assumption, cuz using /EXETYPE:NT switch to the ...
- James Kirkham (6/17) Oct 16 2002 So I can just use this .def file to kill the console?
- James Kirkham (9/20) Oct 16 2002 Yes it worked thanks bw! Whats even more amazing is I rembered how to us...
- Charles Sanders (7/18) Nov 01 2003 The subsytem call.
Thank you bw, Jan and user domian.invalid!!! I finally managed to get my basic app to compile and it works!!!! Expect me to be coming back with more coding problems later ;o) now I've just got to wait for my mfc tutorial book to come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
Just one little thing..... When I run my app it opens a window (as expected) but it also opens a blank console screen first. Why does it do this? Is it in the code or something I need to workaround (i.e a compiler issue) etc? I got the code from the msdn site to test the compiler, so if its just something in there when I learn mfc it wont matter. "James Kirkham" <JamesKirkham1 hotmail.com> wrote in message news:aoham6$2i4$1 digitaldaemon.com...Thank you bw, Jan and user domian.invalid!!! I finally managed to get my basic app to compile and it works!!!! Expect me to be coming back withmorecoding problems later ;o) now I've just got to wait for my mfc tutorialbookto come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
I guess you might be using a wrong .def file, indicating that the program you compile is a console program or you link command might be wrong, but that would require a 'main' function somewhere in your code. James Kirkham wrote:Just one little thing..... When I run my app it opens a window (as expected) but it also opens a blank console screen first. Why does it do this? Is it in the code or something I need to workaround (i.e a compiler issue) etc? I got the code from the msdn site to test the compiler, so if its just something in there when I learn mfc it wont matter. "James Kirkham" <JamesKirkham1 hotmail.com> wrote in message news:aoham6$2i4$1 digitaldaemon.com...Thank you bw, Jan and user domian.invalid!!! I finally managed to get my basic app to compile and it works!!!! Expect me to be coming back withmorecoding problems later ;o) now I've just got to wait for my mfc tutorialbookto come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
Here is some info: Command Line Compile: c:\dm\bin\sc code.cpp -L/ENTRY:WinMainCRTStartup My Code: #include <afxwin.h> #ifdef MINIMAL // Stub out non-critical CRT initialization functions extern "C" void _setenvp() { } extern "C" void _setargv() { } // Define a window class derived from CWnd class CHelloWindow : public CWnd { public: CHelloWindow() { CreateEx(WS_EX_CLIENTEDGE, AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1)), _T("Hello World!"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, 0); } }; #else // Define a window class derived from CFrameWnd class CHelloWindow : public CFrameWnd { public: CHelloWindow() { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, rectDefault); } }; #endif // Define an application class derived from CWinApp class CHelloApp : public CWinApp { public: virtual BOOL InitInstance() { m_pMainWnd = new CHelloWindow(); m_pMainWnd->ShowWindow(m_nCmdShow); m_pMainWnd->UpdateWindow(); return TRUE; } }; CHelloApp HelloApp; // HelloApp's constructor initializes and runs the app "Jan Knepper" <jan smartsoft.us> wrote in message news:3DAC660E.68565CF9 smartsoft.us...I guess you might be using a wrong .def file, indicating that the programyoucompile is a console program or you link command might be wrong, but thatwouldrequire a 'main' function somewhere in your code. James Kirkham wrote:blankJust one little thing..... When I run my app it opens a window (as expected) but it also opens asomethingconsole screen first. Why does it do this? Is it in the code ortheI need to workaround (i.e a compiler issue) etc? I got the code frommymsdn site to test the compiler, so if its just something in there when I learn mfc it wont matter. "James Kirkham" <JamesKirkham1 hotmail.com> wrote in message news:aoham6$2i4$1 digitaldaemon.com...Thank you bw, Jan and user domian.invalid!!! I finally managed to getwithbasic app to compile and it works!!!! Expect me to be coming backtutorialmorecoding problems later ;o) now I've just got to wait for my mfcbookto come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
What about the .DEF file? James Kirkham wrote:Here is some info: Command Line Compile: c:\dm\bin\sc code.cpp -L/ENTRY:WinMainCRTStartup My Code: #include <afxwin.h> #ifdef MINIMAL // Stub out non-critical CRT initialization functions extern "C" void _setenvp() { } extern "C" void _setargv() { } // Define a window class derived from CWnd class CHelloWindow : public CWnd { public: CHelloWindow() { CreateEx(WS_EX_CLIENTEDGE, AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1)), _T("Hello World!"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, 0); } }; #else // Define a window class derived from CFrameWnd class CHelloWindow : public CFrameWnd { public: CHelloWindow() { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, rectDefault); } }; #endif // Define an application class derived from CWinApp class CHelloApp : public CWinApp { public: virtual BOOL InitInstance() { m_pMainWnd = new CHelloWindow(); m_pMainWnd->ShowWindow(m_nCmdShow); m_pMainWnd->UpdateWindow(); return TRUE; } }; CHelloApp HelloApp; // HelloApp's constructor initializes and runs the app "Jan Knepper" <jan smartsoft.us> wrote in message news:3DAC660E.68565CF9 smartsoft.us...I guess you might be using a wrong .def file, indicating that the programyoucompile is a console program or you link command might be wrong, but thatwouldrequire a 'main' function somewhere in your code. James Kirkham wrote:blankJust one little thing..... When I run my app it opens a window (as expected) but it also opens asomethingconsole screen first. Why does it do this? Is it in the code ortheI need to workaround (i.e a compiler issue) etc? I got the code frommymsdn site to test the compiler, so if its just something in there when I learn mfc it wont matter. "James Kirkham" <JamesKirkham1 hotmail.com> wrote in message news:aoham6$2i4$1 digitaldaemon.com...Thank you bw, Jan and user domian.invalid!!! I finally managed to getwithbasic app to compile and it works!!!! Expect me to be coming backtutorialmorecoding problems later ;o) now I've just got to wait for my mfcbookto come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
Do not know what your problem is. Works fine for me. You might want to check the shell-link properties. Jan James Kirkham wrote:Here is some info: Command Line Compile: c:\dm\bin\sc code.cpp -L/ENTRY:WinMainCRTStartup My Code: #include <afxwin.h> #ifdef MINIMAL // Stub out non-critical CRT initialization functions extern "C" void _setenvp() { } extern "C" void _setargv() { } // Define a window class derived from CWnd class CHelloWindow : public CWnd { public: CHelloWindow() { CreateEx(WS_EX_CLIENTEDGE, AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1)), _T("Hello World!"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, 0); } }; #else // Define a window class derived from CFrameWnd class CHelloWindow : public CFrameWnd { public: CHelloWindow() { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, rectDefault); } }; #endif // Define an application class derived from CWinApp class CHelloApp : public CWinApp { public: virtual BOOL InitInstance() { m_pMainWnd = new CHelloWindow(); m_pMainWnd->ShowWindow(m_nCmdShow); m_pMainWnd->UpdateWindow(); return TRUE; } }; CHelloApp HelloApp; // HelloApp's constructor initializes and runs the app "Jan Knepper" <jan smartsoft.us> wrote in message news:3DAC660E.68565CF9 smartsoft.us...I guess you might be using a wrong .def file, indicating that the programyoucompile is a console program or you link command might be wrong, but thatwouldrequire a 'main' function somewhere in your code. James Kirkham wrote:blankJust one little thing..... When I run my app it opens a window (as expected) but it also opens asomethingconsole screen first. Why does it do this? Is it in the code ortheI need to workaround (i.e a compiler issue) etc? I got the code frommymsdn site to test the compiler, so if its just something in there when I learn mfc it wont matter. "James Kirkham" <JamesKirkham1 hotmail.com> wrote in message news:aoham6$2i4$1 digitaldaemon.com...Thank you bw, Jan and user domian.invalid!!! I finally managed to getwithbasic app to compile and it works!!!! Expect me to be coming backtutorialmorecoding problems later ;o) now I've just got to wait for my mfcbookto come from the library. Thanks for all your time and patience!!!! James
Oct 15 2002
In article <3DAC8C67.B7E31F88 smartsoft.us>, Jan Knepper says...to kill the console window opening use a def file (EXETYPE NT) there's probably a linker switch for this too?Command Line Compile: c:\dm\bin\sc code.cpp -L/ENTRY:WinMainCRTStartup
Oct 15 2002
In article <aoiehl$17pe$1 digitaldaemon.com>, bw says...to kill the console window opening use a def file (EXETYPE NT) there's probably a linker switch for this too?well actually i made an assumption, cuz using /EXETYPE:NT switch to the linker does not stop the console window opening first... but SOMETHING in this .def file does. must be a combination of things? NAME BUILD32 DESCRIPTION 'MFC Win32 Application' EXETYPE NT SUBSYSTEM WINDOWS,4.0 VERSION 4.0
Oct 15 2002
So I can just use this .def file to kill the console? "bw" <bw_member pathlink.com> wrote in message news:aoiesi$17t1$1 digitaldaemon.com...In article <aoiehl$17pe$1 digitaldaemon.com>, bw says...probablyto kill the console window opening use a def file (EXETYPE NT) there'slinkera linker switch for this too?well actually i made an assumption, cuz using /EXETYPE:NT switch to thedoes not stop the console window opening first... but SOMETHING in this.deffile does. must be a combination of things? NAME BUILD32 DESCRIPTION 'MFC Win32 Application' EXETYPE NT SUBSYSTEM WINDOWS,4.0 VERSION 4.0
Oct 16 2002
Yes it worked thanks bw! Whats even more amazing is I rembered how to use the .def file ;o) Thanks James "bw" <bw_member pathlink.com> wrote in message news:aoiesi$17t1$1 digitaldaemon.com...In article <aoiehl$17pe$1 digitaldaemon.com>, bw says...probablyto kill the console window opening use a def file (EXETYPE NT) there'slinkera linker switch for this too?well actually i made an assumption, cuz using /EXETYPE:NT switch to thedoes not stop the console window opening first... but SOMETHING in this.deffile does. must be a combination of things? NAME BUILD32 DESCRIPTION 'MFC Win32 Application' EXETYPE NT SUBSYSTEM WINDOWS,4.0 VERSION 4.0
Oct 16 2002
The subsytem call. dmc main.cpp -L/EXET:NT -L/SU:windows "bw" <bw_member pathlink.com> wrote in message news:aoiesi$17t1$1 digitaldaemon.com...In article <aoiehl$17pe$1 digitaldaemon.com>, bw says...probablyto kill the console window opening use a def file (EXETYPE NT) there'slinkera linker switch for this too?well actually i made an assumption, cuz using /EXETYPE:NT switch to thedoes not stop the console window opening first... but SOMETHING in this.deffile does. must be a combination of things? NAME BUILD32 DESCRIPTION 'MFC Win32 Application' EXETYPE NT SUBSYSTEM WINDOWS,4.0 VERSION 4.0
Nov 01 2003