I am facing one problem in compiling a VC++6.0 project.
I have to build a EXE project, and it uses only C files. ( Not C++ ).I
require to build the EXE project in VC++ 6.0 version, and I am getting
the following error.
"C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afx.h(15) :
fatal error C1189: #error : MFC requires C++ compilation (use a .cpp
Error executing cl.exe.
Please help me out, if anybody knows its solution.
Appreciate your comments/reply regarding this problem.
You've created the project as an MFC project instead of a generic application.
So the compiler is looking for your "stdafx" files. You probably want to create a non-MFC project...a simple Win32 application.
Try running AppWizard again, selecting the "Projects" tab. Under there, pick "Win32 Application". Set your directories and project names, etc. and finish running through the wizard. Once the project is built, copy all of your original source code into the new diretory, and "Add Files to Project..." to include your original files.
I need to display two "nested" controls side by side. The main control e.g. CCustWnd constains another CMembWnd control as a member variable. It is not problem to display the main CCustWnd control however I don't know how to display the member control CMembWnd which is created dynamicaly when the main control is created . Probably the member control is clipped by the main control. I played for while with styles without any results. Probably it is not problem to display the member control inside the area of the main control however I need to display the member beside the main control (out of its drawing area) .
The parent window can be either CDialog or another complex control like CGrid control. The main control is usually created dynamically. In the main control CCustWnd::OnCreate method I do the following (simplified):
It depends on what properties you're looking for
GetWindowText will give you the name in the titlebar
GetWindowRect and GetClientRect will get size
GetWindowLong can be used the see what styles the window has...
you can enumerate all the child windows with EnumChildWindows
There are lots of things you can do, so maybe you should check the msdn docs