Solved

Question for Answers2000 again

Posted on 1998-12-10
1
152 Views
Last Modified: 2013-11-20
Dear Answers2000,

Sorry for replying you late!!!

For the previous question, my problem is:

Before resizing the window, for example the size of the window is 400x400....
after resizing the window, the size of the window becomes 450x350.....

My question is how to get these two data in my program....and I want to use these two data at the same time..Can I do like this? Do you understand?

Thanks!!!
kkuu
0
Comment
Question by:kkuu
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1326011
OK first off the CString problem.

When you create a member variable you get a choice of what type

When you go to the member variables dialog, and double clickon your edit's id, say IDC_EDIT, a little dialog pops up.  You can set either a string or window type variable.  Your problem is you picked a CString, and you should have picked a CEdit.

To fix that problem
1. Ctrl-W bring up class wiz for your dialog
2. Go to member variables
3. You should see something like, in the list box
IDC_EDIT........CString.....m_edit
4. Highlight this line
5. Click Delete Variable
6. Now make sure that line is highlighted again
7. Pick Add Variable
8. When the dialog popups up entitled "Add Member Variable", it should have fields for Member Variable Name (an edit control), Category (a combo box) and Variable Type (a combo box)

In Member Variable name, type "m_edit"  - without the quotes
In Category pick "Control"
In Variable Type pick "CEdit"

This fixes the 2 compile errors you're getting


Your code should now compile, if you look at the previous comments in
http://www.experts-exchange.com/topics/comp/os-ms-windows/programming/mfc/Q.10105791
this explains the sizing code.

Remember the window can only one size at a time.  The reason the fix didn't work before, is it wouldn't compile, but if you re-read, I think it should make sense.

If not ask another follow up question.  

By the way, you don't need to keep opening new questions, I'll keep an eye on your progress.

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 94
ORA-01403: no data found 43 82
Process filename extension 3 156
How to determine file rename from EventLog ? 2 36
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now