Solved

pointer to CEdit

Posted on 2000-05-09
4
260 Views
Last Modified: 2012-06-22
Is it possible to get a CEdit pointer from the handle (hwnd) of the Edit control.? I only have the hwnd of the edit control and i need the pointer to set the ReadOnly state.
0
Comment
Question by:bradsoblesky
[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 5

Accepted Solution

by:
Wyn earned 100 total points
ID: 2795546
Check the

Attach()...
FromHandle()...
FromHandlePermanert()...

Free to ask...
Regards
Eirnava...
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2795551
Like:
CEdit myedit;
myedit.Attch(hwnd);
....
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2795554
CWnd::Attach  
BOOL Attach( HWND hWndNew );

Return Value

Nonzero if successful; otherwise 0.

Parameters

hWndNew

Specifies a handle to a Windows window.

Remarks

Attaches a Windows window to a CWnd object.
0
 

Author Comment

by:bradsoblesky
ID: 2798453
Yep that's it, thanks!
0

Featured Post

Industry Leaders: 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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

623 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