Does anyone know a few tricks to make Edit controls behave like "smart labels"? That is; I want them to be read-only, but not have a caret. It's nice being able to copy the text using Ctrl+C, something which a simple static control cannot offer.
I assume there is a simple subclassing trick you can do. If you know it, feel free to tell me.
Do your dialogs have a parent child relationship.
If affirmative you can use
you will need to pass a pointer of your class in another class and after that you can start using the variable/s / data of one class from another.
Thanks but its not fulfil my need..I have a seperate keyboard other than our system keyboard.
I have class for that as keyboard.cpp,if i press 1 in that keyboard it goes to WM_KEYDOWn in that class and it goes to OnKEyDown in that particular CView class which one is active,but the number should typed in Edit control of dialog which is invoked by clicking the view window.
The WM_KEYDOWn function only goes to avtive View CGrpView and not to that particular dialog.So,i thought to get that all values which are entered in seperate keyboard in to CString and then give this CString value to Edit control.. My Objective is : when i pressed 1 in seperate keyboard it should get entered in that edit box in the dialog..
I have problems following you, but maybe what you need is something completly different and is more along the lines of a "focus follows mouse" setting for the whole Windows-Gui?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
Yes, when i clicked 1 it goes to keyboard.cpp,ther i wrote
void CKBoard::OnLButtonUp(UINT nFlags, CPoint point)
case 51 :
It executes the line and then it goes to OnkeyDown() in that particular dialog,their i wrote..
void CFaceDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
sSktNumValue += "1";
This is coding..when i debugged this coding the control after executing WM_KEYDOWN...It should go to Onkeydown() in that dialog..But the control goes to OnKEyDown() in te particular view where the dialog exist...So i wrote the codings of Dialog OnKeyDown() in to THat view class OnKeyDown() function.
Thats im asking is there anyway to get value which i pressed in keyboard go to dialog OnKeyDown or the control goes as it is View class OnKeyDown()but the final value should entered in that particular Dialog edit box...
Pls give any solution..