Cursor help: [modified]
-
How can i do that when my dialog active text-cursor already active in the editbox?:cool: Can anyone get the answer my question? My question seems to be quite open, i think. -- modified at 6:47 Wednesday 31st October, 2007
What is this¿ "This is a FIRTBOY"
-
How can i do that when my dialog active text-cursor already active in the editbox?:cool: Can anyone get the answer my question? My question seems to be quite open, i think. -- modified at 6:47 Wednesday 31st October, 2007
What is this¿ "This is a FIRTBOY"
As far as i get from ur description you want to set the focus on the editbox whenever ur dialog is initialised. in this case you have to code in the OnInitDialog() function where u can use the control variable of the editbox lets suppose m_ctrlBox u have to write m_ctrlBox.SetFocus()
Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job
-
As far as i get from ur description you want to set the focus on the editbox whenever ur dialog is initialised. in this case you have to code in the OnInitDialog() function where u can use the control variable of the editbox lets suppose m_ctrlBox u have to write m_ctrlBox.SetFocus()
Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job
thanks
What is this¿
-
thanks
What is this¿
Dont forget to return FALSE if you do this. Wouldnt it be better to let the dialog manager do this for you by ensuring that the desired edit control is first in the tab order. To change the tab order when editting the dialog resource use menu option Layout->TabOrder(Ctrl+D) the taborder will be shown by numberred blue sqaures in the top-left of each control.
-
thanks
What is this¿
For edit controls, you may want to try this instead of SetFocus()... GotoDlgCtrl(&m_EditCtl); Why you may want to use this instead? Here's what the docs say... "This message performs additional dialog box management operations beyond those performed by the SetFocus function WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects the text of an edit control (if the target window is an edit control)." Whatever gives you the result you want :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
For edit controls, you may want to try this instead of SetFocus()... GotoDlgCtrl(&m_EditCtl); Why you may want to use this instead? Here's what the docs say... "This message performs additional dialog box management operations beyond those performed by the SetFocus function WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects the text of an edit control (if the target window is an edit control)." Whatever gives you the result you want :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Thank you Mark... Actually, I need sometime to work on Visual C++/MFC or other languages... and need a computer also. "to be busy with a good job to kill time!".. It is upsetting. Yours sincerely.
What is this¿