Setting caret in edit control & activating it.

Hello

Does anyone have any example code for setting and enabling the caret in an
edit control ?

Nicholas


0
nickk (5)
10/27/2003 3:56:25 PM
vc.mfc 33608 articles. 0 followers. Follow

8 Replies
1699 Views

Similar Articles

[PageSpeed] 34

    Take a look at the CEdit::SetSel() member function.

-- 
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> Hello
>
> Does anyone have any example code for setting and enabling the caret in an
> edit control ?
>
> Nicholas
>
>


0
CheckAbdoul
10/27/2003 4:37:13 PM
If you are asking how to create & use your own caret in an edit control then
check out KB article Q74514 @ support.microsoft.com
(http://support.microsoft.com/default.aspx?scid=kb;en-us;74514)

"Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> Hello
>
> Does anyone have any example code for setting and enabling the caret in an
> edit control ?
>
> Nicholas
>
>


0
tbalcom1 (29)
10/27/2003 4:54:31 PM
Thats got no effect - doesn't enable the caret in the edit window, nor
display it.  I forgot to mention the edit window will be empty (ready for
typing).

Nicholas

"CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
news:emvRsiKnDHA.2064@TK2MSFTNGP11.phx.gbl...
>     Take a look at the CEdit::SetSel() member function.
>
> -- 
> Cheers
> Check Abdoul [VC++ MVP]
> -----------------------------------
>
> "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > Hello
> >
> > Does anyone have any example code for setting and enabling the caret in
an
> > edit control ?
> >
> > Nicholas
> >
> >
>
>


0
nickk (5)
10/27/2003 4:55:15 PM
Dont really need to create my own - what I'm looking for is to be able to
move the caret to a given edit control, activate the caret system (and the
edit control) to allow typing without the user having to left-click the
mouse button.

Nicholas
"Trevor" <tbalcom@somewhere.com> wrote in message
news:OUDmNtKnDHA.372@TK2MSFTNGP11.phx.gbl...
> If you are asking how to create & use your own caret in an edit control
then
> check out KB article Q74514 @ support.microsoft.com
> (http://support.microsoft.com/default.aspx?scid=kb;en-us;74514)
>
> "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > Hello
> >
> > Does anyone have any example code for setting and enabling the caret in
an
> > edit control ?
> >
> > Nicholas
> >
> >
>
>


0
nickk (5)
10/27/2003 4:57:38 PM
    Try a CEdit::SetFocus() before calling CEdit::SetSel()

-- 
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
news:3f9d4f54$0$103$65c69314@mercury.nildram.net...
> Thats got no effect - doesn't enable the caret in the edit window, nor
> display it.  I forgot to mention the edit window will be empty (ready for
> typing).
>
> Nicholas
>
> "CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
> news:emvRsiKnDHA.2064@TK2MSFTNGP11.phx.gbl...
> >     Take a look at the CEdit::SetSel() member function.
> >
> > -- 
> > Cheers
> > Check Abdoul [VC++ MVP]
> > -----------------------------------
> >
> > "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> > news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > > Hello
> > >
> > > Does anyone have any example code for setting and enabling the caret
in
> an
> > > edit control ?
> > >
> > > Nicholas
> > >
> > >
> >
> >
>
>


0
CheckAbdoul
10/27/2003 5:03:24 PM
I think hes saying thats not possible, you will have to try to create it
yourself

You might also try :

SetCaretPos

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/Carets/CaretReference/CaretFunctions/SetCaretPos.asp


Charles

"Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
news:3f9d4fe3$0$119$65c69314@mercury.nildram.net...
> Dont really need to create my own - what I'm looking for is to be able to
> move the caret to a given edit control, activate the caret system (and the
> edit control) to allow typing without the user having to left-click the
> mouse button.
>
> Nicholas
> "Trevor" <tbalcom@somewhere.com> wrote in message
> news:OUDmNtKnDHA.372@TK2MSFTNGP11.phx.gbl...
> > If you are asking how to create & use your own caret in an edit control
> then
> > check out KB article Q74514 @ support.microsoft.com
> > (http://support.microsoft.com/default.aspx?scid=kb;en-us;74514)
> >
> > "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> > news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > > Hello
> > >
> > > Does anyone have any example code for setting and enabling the caret
in
> an
> > > edit control ?
> > >
> > > Nicholas
> > >
> > >
> >
> >
>
>


0
10/27/2003 7:17:28 PM
Nicholas,

    I misunderstood the original question.  CheckAbdoul has the correct
answer for you (CWnd::SetFocus & CEdit::SetSel).


"Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
news:3f9d4fe3$0$119$65c69314@mercury.nildram.net...
> Dont really need to create my own - what I'm looking for is to be able to
> move the caret to a given edit control, activate the caret system (and the
> edit control) to allow typing without the user having to left-click the
> mouse button.
>
> Nicholas
> "Trevor" <tbalcom@somewhere.com> wrote in message
> news:OUDmNtKnDHA.372@TK2MSFTNGP11.phx.gbl...
> > If you are asking how to create & use your own caret in an edit control
> then
> > check out KB article Q74514 @ support.microsoft.com
> > (http://support.microsoft.com/default.aspx?scid=kb;en-us;74514)
> >
> > "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> > news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > > Hello
> > >
> > > Does anyone have any example code for setting and enabling the caret
in
> an
> > > edit control ?
> > >
> > > Nicholas
> > >
> > >
> >
> >
>
>


0
tbalcom1 (29)
10/27/2003 7:33:40 PM
Yes, that works fine, thanks.

Nicholas
"Trevor" <tbalcom@somewhere.com> wrote in message
news:uTGaJGMnDHA.3320@tk2msftngp13.phx.gbl...
> Nicholas,
>
>     I misunderstood the original question.  CheckAbdoul has the correct
> answer for you (CWnd::SetFocus & CEdit::SetSel).
>
>
> "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> news:3f9d4fe3$0$119$65c69314@mercury.nildram.net...
> > Dont really need to create my own - what I'm looking for is to be able
to
> > move the caret to a given edit control, activate the caret system (and
the
> > edit control) to allow typing without the user having to left-click the
> > mouse button.
> >
> > Nicholas
> > "Trevor" <tbalcom@somewhere.com> wrote in message
> > news:OUDmNtKnDHA.372@TK2MSFTNGP11.phx.gbl...
> > > If you are asking how to create & use your own caret in an edit
control
> > then
> > > check out KB article Q74514 @ support.microsoft.com
> > > (http://support.microsoft.com/default.aspx?scid=kb;en-us;74514)
> > >
> > > "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message
> > > news:3f9d418a$0$106$65c69314@mercury.nildram.net...
> > > > Hello
> > > >
> > > > Does anyone have any example code for setting and enabling the caret
> in
> > an
> > > > edit control ?
> > > >
> > > > Nicholas
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
nickk (5)
10/28/2003 12:54:01 PM
Reply:

Similar Artilces:

Vlookup based on Active cell
Is there a way to have a vlookup formual based on the data in the active cell. I have data on one sheet that I what to pull in to a cell on another worksheet based on the data in the active cell I click on. I looking for the reference of the vlookup to be the active cell. thanks in advance for any help on this Thomp <williamth...@gmail.com> wrote... >Is there a way to have a vlookup formual based on the data in the >active cell. I have data on one sheet that I what to pull in to a cell >on another worksheet based on the data in the active cell I click on. >I looking for the...

Date Control
I have a text box that holds data for a date field. I would like to use the Date Callender Control so the user can pick a date but since I new to Access I don't understand how the object is attached to a control source and thus I can not apply the results to a text box or to a field in the form. How do I change the control source or how to I apply the selection to the record. In a general sense stay away from ActiveX controls when possible. Take a look at either http://allenbrowne.com/ser-51.html or http://www.lebans.com/monthcalendar.htm -- Hope this helps, Daniel Pineault If t...

Trouble Setting Up Accounts for Online Updates
Hello! Has anyone else been having problems getting online updates on their existing accounts and/or setting up new accounts for online updates? I've been getting "Updates are temporarily unavailable" and "Account setup temporarily unavailable" messages for their respective cases for more than 19 hours now. - Clay It would be useful if you would indicate which version of the program you're using and in which country you're in. There IS a problem with downloading stock quotes from the Canadian quote server right now, using the Canadian versions of Quic...

Automatically setting the value of uomid with OnLoad event
I would like to automatically set the value of uomid on the OrderProducts form OnLOad event. I used this technique to auto populate the Pricelist field on the order form. It works great. Using the similar jscript code for uomid, nothing happens: //set uomid with Form Onload event var oField = crmForm.all.uomid; if(!oField.DataValue) { var aoItems = new Array(); aoItems[0] = new LookupControlItem ("{F2B4D4E2-032E-DB11-B4C2-001372F61C5C}”,1055, "Each"); oField.DataValue = aoItems; } It looks like the signature of LookupControlItem for uomid is different. Can anyone help? ...

Active Directory Connector Problem with exchange 5.5.....
Background: Our company is "LA" and we have another sister company "SC" that are tree roots of the "SFB" forest. We share the same bridgehead that is located at "SFB". Yet we each have our own exchange in or domains. When I am running the ADC I am getting stuck on Step three the resorce mailbox wizard. I am geting this message "Pass 1 of 1: Resource Mailbox Scan validation (objects processed: 7799) Warning: The Exchange 5.5 directory still contains objects that need to be marked as resource mailboxes before they can be replicated to Activ...

Virtual list control #2
Needed to use it. Very simple and straighforward, and I am mostly happy with it, with the exception that scrolling is slower than I had hoped. I did expect scrolling to be slower, but not that much slower. Population and scrolling are fantastic compared with standard list of course. Actually, I can live with the vertical scrolling. I was disappointed to run sample apps, and see how bad horizontal scrolling was. Looking at the messages, the LVN_GETDISPINFO message is sent for every single cell in the visible rows, whether they are in visible columns or not. Well, OK, I can live with that, *ex...

Excel and Calendar Control 8.0
Enter an Excel worksheet. Click Insert, select Object and then, Calendar Control 8.0. Now, the Calendar is shown on the worksheet. And then, the worksheet operations is finished with the Calendar. Please say, how to remove the Calendar from the worksheet. Regards. ...

How do I prevent users to delete a worksheet, but allow to edit?
How can I allow other users to update an workbook, but not to delete any tabs or existing information? Take a look at protect worksheet and protect workbook these both can be found in tools>protection. Use help to guide you the rest of the way. James "nb91386@yahoo.com" wrote: > How can I allow other users to update an workbook, but not to delete any tabs > or existing information? Protect the workbook. Tools|protection|Protect workbook Just leave Structure checked. (Users won't be able to rename or change the order of the worksheets, either.) But be aware that...

Combobox | Activex Controls | Tab
Hi, I have created several combo boxes on the same spreadsheet but I am unable to tab between them. I think the reason I can't tab between them is because they are not all part of one larger form. Is there some way that I can tab between multiple combo boxes on the same worksheet? -- gduron ------------------------------------------------------------------------ gduron's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=33239 View this thread: http://www.excelforum.com/showthread.php?threadid=538282 ...

set up a continuing roster?
how do i set up a continuing roster in excel, with names, months, dates? You'll have to be a little more specific as to what you want -- neopolita ----------------------------------------------------------------------- neopolitan's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=61 View this thread: http://www.excelforum.com/showthread.php?threadid=39329 Hi Are you talking a duty roster here? If so, what type of shifts? How many shifts per person per week/month? What hours are to be worked? Is it a class roster? How many periods per day? What dura...

Setting Security in V8
I have just upgrade to Great Plains version 8 and want to redo all the security settings. I intend to use Advanced Security at class level then rolldown to all users in the class. Do the settings I make at Menu level in the tree automatically set the corresponding Forms and Report settings in the Great Plains Dictionery? Ie if I don't give a class access to Cards>Creditors do I also need to remove access from the Creditor Maintenance form in the Dictionary tree to ensure that users do not access this form but other means eg adding a new window as a shortcut adding the form to a c...

WorkFlow Duplicate activity
Dear All, Have you every seen the duplicate activity when workflow tricker? So simply in my workflow. I have only one work flow for check after another user assigned. Work flow will wait for some Picklist and if picklist have changed will come to my condition activity. (Create Phone Call in case activity) , I found duplicate activities in that case. Helpppppp Me :> Please Sincerely, Waiyaritv@blueintelligence.com ...

Assign control source to popup form
I have a main form that contains multiple memo type text boxes. I'd like to be able to double click on one of the text boxes and have a popup form open with a large text box that then gets it's source from the main forms text box, so that users can view all or most of the text without having to use the scroll bar. The data also needs to be updatable. I'm having trouble figuring this out...I'm sure it's simple, but it's eluding me -- Message posted via http://www.accessmonster.com Try pressing Shift+F2 while in your memo field. -- Allen Browne - Mic...

Keyboard shortcut for editing links with updating
Can some one post the keyboard shortcut: When editing a link in a worksheet I don't want it update with new value when I hit Enter because it takes long to update(going over anetwork) and have many links to edit. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Hi there, There isn't a shortcut that I know of per se - what you can do is go to Tools-->Options on the Calculation tab change it from Automatic to Manual. This will apply to all links and calculatio...

I can I set up Excel to print all sheets of a workbook as a defau.
I send a lot of excel workbooks as email attachments in Outlook. The recipient of the attachementss prints all of the attachements at once by selecting the letter and pressing "File", "print" , and checking print all attachemtns radial button on the resulting Outlook dropdown menu. When this is done only the active sheets prints. Excel 2003 and Outlook 2003 One way would be to group the sheets before you save and close the workbook(s). When they are opened and printed all the sheets will be printed. Regards Trevor "Homebody" <Homebody@discussions...

Prevent size of web controls from changing after accessing databas
Hello Community In an ASP.NET using C# and SQL Server on my web pages there are different controls like labels, textboxes and dropdown boxes . The problem is that when information is entered into the controls and the data is sent to the database or retrieved from the database the size of the controls change. Sometimes the controls get smaller and sometimes the controls get bigger. Also the font sizes within the controls changes their size also. I tried setting the height of the controls in the controls properties in the aspx page but the size of the contr...

How do I set up tent cards in Word 2007?
In case no one knows what tent cards are, they are those cards that you place in front of people at a meeting, round table, or anywhere a group of people will be whose names you want to show for other people to know them. It's an oblong, rectangular, tepee-looking card that has a person's name on both sides of the card so that either way you turn the card, the name will show correctly. It was a feature under Word 2003 under the Mail and Label section, where you would pick "tent card," but I can't seem to find it in Word 2007. Please help You have to rot...

If possible edit the data from query ?
Dear all, I use Access 2003, i join 2 tables and impossible to change the data from the table query. Please It is possible Edit the data from the table query ? Thanks so much for your reply. Tran1728 It is possible to edit records in a query consisting of one or more tables. The tables should be joined on the primary and foreign key fields. The query can't be a Totals or Crosstab query. If you have a query that you can't edit records, consider providing the SQL as well as the table relationships and key fields. Duane Hookom MS Access MVP "tran1728&quo...

Activate new workbook with unknown name
Hi, I have a macro that copies a worksheet from an existing workbook and moves it to a new workbook (book 1, book 2, etc). I then go back to the original workbook to hide the copied sheet. When all this is done I want the user to be looking at the new workbook (book 1, book 2, etc). Please provide some code to add to my copy macro. Thank you very much....you guys/gals are great! You don't have to return to the original workbook to hide the sheet. If the macro is in the original workbook then simply: Sheets(1).Copy ThisWorkbook.Sheets(1).Visible = False Hope this helps Rowan &q...

Send/Receive Groups edit
Gentlemen, please kindly advice. After a necessary repair/reinstall of XP Pro SP2 and Office 2003, I am unable to edit (open) the Send /Receive Groups on Outlook 2003. Otherwise works Ok. Your assistance will be appreciated Cheers find and delete the *.srs file. if you don't know where to look, see http://www.outlook-tips.net/beginner/filepath.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook Tips: http://www.o...

How can you set up a form that the cursor only moves to cells tha.
I have set up a form. Now I want my cusor to move through the worksheet only in certain cells. I want to be able to go from one cell that needs to be filled out to the next cell that needs to be filled out automatically. Example , move from cell a3 to c19 automatically. How can I do that? Hi! You can accomplish that by setting sheet protection. Select all the cells that you want to be able to navigate to then goto Format>Cells>Protection tab. Uncheck Locked. Now, goto Tools>Protection>Protect sheet. A list of options will appear. Uncheck Select locked cells and check...

User, Inventory controls set up
We have been controling the receiving and invoicing of our inventory and are now in the process of setting up a warehouse - remote- site. This means there will be a warehouseman receiving and entering the items into inventory and then when we receive the invoice from the vendor, corporate offices will do the invoicing and paying of the invoices. What I am in search of is how, in a remote location, can a person receive items only without having to invoice. We also need to be directed to information how to set up the remote location user's control so they can only access the inven...

setting up e-mail
We used to have an account and email address. When we got our computer back from the shop we are unable to log back in. We cant seem to find out account. How can we can an account again. You need to be more specific. An account with whom? If you mean a free Yahoo account, read on: US-based free Yahoo accounts have webmail access only, no POP=20 access. Windows Mail handles POP mail but not Yahoo webmail.=20 Yahoo's solution is to pay them for premium "Mail Plus" service: http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/overview/index.ht= ml and use the spec...

How do I set the view to default to last modified
I like my files to always be in last modified order with the most recently saved file at the top of the list. In Excel 2000 I set the order in the open window and from then on all files in all folders were in the correct order. Recently I changed to Excel 2003. Since then I have had problems. I change the vies as before but each time i close the application it reverts to sorting by name - in alphabetical order. Any suggections? ...

how to copy or move controls between forms or from form to Tab con
I am trying to set up a more user friendly user interface for my database. I have a main "switchboard" that opens on startup with buttons that open other Sub "switchboards" based on subjects with more buttons to do stuff like open reports, run queries Ect.. Ive ended up with a mess of these "switchboard" forms and all of this me!close and Visible=false stuff to manage them and my users are rightfully confused if menus just dissappear without the classic IE "Back" Button.. so i would like to migrate to a tabbed control on my main "s...