How to set the cursor in an EditBox.... 
Author Message
 How to set the cursor in an EditBox....

when I open a dialogbox which contains an editbox, I'd like to set the
cursor in this editbox... How can i do ?

Thanks



Sat, 03 Aug 2002 03:00:00 GMT  
 How to set the cursor in an EditBox....
As someone was kind enough to answer that same question for me recently,
I'll pass it on to you:

In your OnInitDialog function:

// set focus to dialog text box
GetDlgItem(IDC_EDIT_WHATEVER)->SetFocus();
return FALSE;  // return TRUE  unless you set the focus to a control

drc

Quote:

> when I open a dialogbox which contains an editbox, I'd like to set the
> cursor in this editbox... How can i do ?

> Thanks



Sat, 03 Aug 2002 03:00:00 GMT  
 How to set the cursor in an EditBox....
The previous suggestion is a good one.  But if the actual first
question is how to change the control order ( as displayed from within
the dialog editor with Ctrl-D ) you may consider:
  a) edit the project-name.rc file outside of the VC IDE
  b) search for the particular dialog section, ex: IDD_STATEMENT_DLG
  c) move the lines ( controls ) around as required
  d) save the .rc file
  e) re-open with the VC IDE

Question is there a better way to change the tab order?

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 04 Aug 2002 03:00:00 GMT  
 How to set the cursor in an EditBox....
Greets,

    Yes, there is a much better way to change the tab order.  In the dialog
editor, choose "Layout... Tab Order" from the menu.  Then you click on each
control in order as you see fit.  They are numbered as you click through
them.  Clicking on the dialog itself will end the tab order changes.

Regards,

Joe


Quote:
> The previous suggestion is a good one.  But if the actual first
> question is how to change the control order ( as displayed from within
> the dialog editor with Ctrl-D ) you may consider:
>   a) edit the project-name.rc file outside of the VC IDE
>   b) search for the particular dialog section, ex: IDD_STATEMENT_DLG
>   c) move the lines ( controls ) around as required
>   d) save the .rc file
>   e) re-open with the VC IDE

> Question is there a better way to change the tab order?

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sun, 04 Aug 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to set the cursor in an EditBox....

2. Setting ReadOnly Status of Editbox.

3. Setting precision of a floating point number in an editbox

4. Set values in Editbox control

5. how to set cursor position in an editbox control ?

6. how to set the position of the text-cursor ?!°

7. Set the cursor in a TextBox of an EditItemTemplate

8. Setting Cursor Postion

9. how could I set the position of the cursor

10. Newbie: Setting the mouse cursor on win32 app not MFC

11. Setting window size and cursor size

12. Set Cursor

 

 
Powered by phpBB® Forum Software