Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

pointer to CEdit

Posted on 2000-05-09
4
Medium Priority
?
263 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 400 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

963 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