Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Password continued

Posted on 1998-12-03
4
Medium Priority
?
225 Views
Last Modified: 2010-04-02
Hi all, specifically Nietod and Alexo...

I placed this in the Init part of my dialog based MFC and I am getting all sorts of errors... how do I get this create function to work?

CEdit* editCtrl = (CEdit*) GetDlgItem(IDC_EDITBOX);
rect passwordbox;
editCtrl->GetRect(&passwordbox);
CWnd* pParentWnd = GetParent();
editCtrl->Create(ES_PASSWORD,passwordbox,
pParentWnd,IDC_EDIT5_PASSWORD);  
0
Comment
Question by:rose3377
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1179160
Why don't you simply set the password style on the edit control at design time in the resource editor ?
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1179161
If you don't want to do that, then use ModifyStyle instead of Create - if the window already exists as part of the dialog
0
 
LVL 32

Accepted Solution

by:
jhance earned 80 total points
ID: 1179162
GetRect doesn't work in the initialize (OnInitDialog) as the window you are trying to get the rect of doesn't exist yet.  Try doing this in the constructor for your dialog instead.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1179163
This is back 2 front jhance

To me the problem seems to be that rose is creating a window which is _already_ created
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

722 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