Solved

pointer to CEdit

Posted on 2000-05-09
4
259 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

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

732 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