Solved

Question for Answers2000 again

Posted on 1998-12-10
1
153 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
unable to delete all specified values regedit 38 285
EvenOdd challenge 10 92
Fibonacci challenge 11 112
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

22 Experts available now in Live!

Get 1:1 Help Now