Solved

pointer to CEdit

Posted on 2000-05-09
4
254 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
Comment Utility
Check the

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

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

Expert Comment

by:Wyn
Comment Utility
Like:
CEdit myedit;
myedit.Attch(hwnd);
....
0
 
LVL 5

Expert Comment

by:Wyn
Comment Utility
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
Comment Utility
Yep that's it, thanks!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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. …
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…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

772 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