Solved

pointer to CEdit

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

813 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