Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips
Tip Bank > C++ > Mfc


10 of 10     Previous     Next
Controlling Checkboxes in MFC
by Larry A. Mills, Sr.
The code in this tip shows how to check, uncheck, enable, and disable a checkbox in MFC.
Use Forward Declarations to Speed Up Compiling
by Rajesh Chathapuram
If class B uses only pointers or references of class A, you don't have to include A.h. You can simply forward declare class A as shown below.
by Rajesh Chathapuram
PostThreadMessage is a Win32 API used to post messages to threads. Usually, the message posted is a standard windows message with the window handle set to NULL.
Threads in C++
by DevX Pro
Is it possible to have threads in C++ like you can in Java?
NT Sharing C++ Objects Through Memory Mapped Files
by DevX Pro
I am writing a Microsoft ISAPI-based application using MFC classes. We need to get access to some of the objects used within the application from an NT service. I tried using Memory mapped files, backed by the System Paging file to achieve this —all looks ok, and we can retrieve a pointer to the object from the second process—however, any ASSERT_VALID() call fails with a report of an invalid vtable. I can understand why this is happening, but is there any way to 'repair' the class from the second process, and create a valid vtable?
Revive Forms That Break When Inserted Into a Table
by Erik Goetze
Many times a form that works perfectly well on a table-less Web page stops working when inserted into a table cell. To make the form work again, move the <FORM> and </FORM> tags so that ...
Setting Layer/DIV Background Colors
by Erik Goetze
Often it is desirable to set a background color for an entire layer or DIV region, much like setting the background color for a whole table. Setting a layer background color should work the same for ...
Text files with MFC
by DevX Pro
I have been reading Visual C++ 5 in 21 Days while trying to learn how to use the Visual C++ user interface, and I have been trying to find an example of how to read and save a text file using the MDI interface. Am I supposed to use the Serialize function or the CArchive class? I have been looking for an example all over the place, with no luck. (I have some prior C experience, but this new interface is taking some getting used to.)
Can I programmatically move a control in a window in Visual C++?
by DevX Pro
I'm beginning the design of an application where it would be advantageous to be able to programmatically move the position of a control on its form. Is it possible to do this using Visual C++?
What does AFX stand for?
by DevX Pro
I see the term "AFX" everywhere in the MFC source code. For example, "AFX_MSG_MAP". What does it mean?
10 of 10     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date