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
1768 Views

Similar Articles

[PageSpeed] 14

    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:

Modal dialog box with a tree control is hidden
I am facing a strange problem on Windows 98 system,The Modal dialog box with a tree control is hidden behind the property sheet, which invokes that dialog. The application is a MDI application with two views,the view which is derived from the scroll view class invokes the property page for a widget in that view.In the property page on clicking on a button should invoke a modal dialog box with a tree control in it.This works fine on Win Xp, WinNT machines but on Win98,it behaves strangely as i have mentioned above. Is it a know bug ?? Thanks in advance. Pavan K Thirunagari It sounds like i...

Delegates setting resetting
Has anybody else had the problem where a group is DL is added in the delegates and permission set for the DL to be Editor in the calendar. Once this has been done and you look back at the settings it has re-set back to NONE and access cannot be obtained. This is also happening when adding singal users. The domain is 2k3 and using exchange 2k3. Outlook 2000 is the client application. ...

edit control in context menu
Hi, I'm searching for a way to insert a CEdit into a popup menu (context menu) like the one in ms access (set filter in table view). Thanks Olaf There is nothing built-in which will allow you to do it. What you see in office products are not really menus but custom controls not available to outside world. You can make a toolbar look like a menu and insert an edit control in it. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Olaf" <pxc128u@web.de> wrote in message news:2n8tcnFtq34nU1@uni-berlin.de... > Hi, > > I'm searching for a way to insert a CEdit i...

Should not be allowed to close a case with open service activities
You try and close a case with an open service activity, case will allow you to close it anyway. -- Nick Doelman www.readybms.com ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.ms...

can all our servers be a domain controller?
We have 3 servers at our company. One of our servers is a member server which is a windows server 2003. Our other 2 servers are domain controllers running windows 2000 server. We will soon be upgrading to windows server 2003 on these servers soon. Can I make all 3 servers domain controllers? Does it make a big difference if all 3 are DC or should i leave the member server as it is.. What are the pro's and con's of doing this? Thanks the pro's and con's are going to depend on what the server will be doing i would recommend having at least 2 DC's for redundancy, but ...

Closing a group of activities
Hi I have several hundred letter activities which I need to close. Obviously I do not want to open each one individually and close them off. I first thought I would use the bulk edit functionality but that does not seem to apply to activities. I then tried work flow manager and creating a rule. But it seems you can only run this against one activity at a time. I am sure this must be possible but I seem to be missing something, can anyone help. Thanks Brian Hi Bi, Is their a criteria, that you can specify on these phone call activites? You could add in a module which would allow yo...

How to use a set of values from one worksheet to another?
Hello Guys: OK, here we go again :(. Say I have a worksheet & want to export a group of values as I add the on a worksheet to another worksheet, how would I go about it? THANKS for any input -- Message posted from http://www.ExcelForum.com Hi just link the cell with a formula like ='sheet1'!A1 on your second sheet -- Regards Frank Kabel Frankfurt, Germany > Hello Guys: > > OK, here we go again :(. > > Say I have a worksheet & want to export a group of values as I add > them on a worksheet to another worksheet, how would I go about it? > > ...

Control Objects
I have put some option button controls on a worksheet, the worksheet is quite large and I want the user to be able to pick options as they move around the sheet to look at the data. Is there a way to lock the position of the controls so the user can see and use them whilst looking at all parts of the sheet. This solution cannot use freezing panes for various reasons. I would really appreciate some help on this!!!!! Thank you in advance. Stewart MOS Excel Expert (not good enough though!!) Freezing panes is the obvious way to do this. If that's out some other choices that pop imm...

VBA to set AutoFilter to List all rows with same values in column?
XL 2003 If I had data in column B like: Col A Col B Col C R1 xx 1 vt R2 qq 3 er R3 tt 2 lk R4 ll 1 ha R5 cv 2 ne R6 ws 1 xw I would like the live data "filtered" to display like: R1 xx 1 vt R4 ll 1 ha R6 ws 1 xw R3 tt 2 lk R5 cv 2 ne R2 qq 3 er Does not display because listed only once Thus 1) sorted by value in Col B 2) Any "B" value with more than one item in the list What is the smartest way to do this and be able to use it again and again. (Tha...

Activation
I have Office XP and I just bought the new Dell Axim. The Axim came with Outlook 2002 and I installed it on my desktop. After activing the software from my desktop, I tried installing it on my laptop and activating. It won't activate because it has already been activated by my desktop. What should I do. It says that the software will run roughly thirty or more times before it will go down to reduce mode. HELP!! Why are you installing the Axim software when you have Office XP? They are the same versions. --� Milly Staples [MVP - Outlook] Post all replies to the group to ke...

CRM 4.0 customize Activity Created Date
cannot select date and time, format is greyed out and displays date only. How can I get it to take both? I've even tried exporting to XML, and re-importing but to no success. Hi, Can you please elaborate on you questions, are you trying to set value to the Created On Date on the activity? If you, you can't set the created on time, this is a system field set by the CRM system. Darren Liu$B!$(BMicrosoft CRM MVP Crowe Chizek and Company http://www.crowecrm.com On May 22, 10:15 am, Magic23 <carlroyk...@gmail.com> wrote: > cannot select date and time, format is greyed out ...

How to display date of last edit of the database on a report
Is there a way to display the date of the last edit of the database on a report? Thanks in advance for your help. -- Nona What do you mean by "last edit of the database"? Do you mean the last time a value in a field in any table was changed? Do you mean the last time any structural change was made to forms, reports, vba modules,or data structure? In either case there is nothing stored that will tell you, unless you store the information in some manner. It can be done, but the utility of doing so (in most cases) is far less valuable than the effort to do so. ...

Controlling execution of a Sub Procedure
I have a spreadsheet that itself has a recursive (iteration) loop. Once the sheet converges, I have to look at the results and depending on what they are, either call a lengthy Sub procedure or bypass it. I cannot use Function procedures because the lengthy calculation I must perform is itself iterative. Thus I can't break up the calculation into a number of small Function procedures. I am now using the worksheet_calculate() event handler, but evidently the definition of "recalculate the spreadsheet" includes any cell that is manipulated. Thus what I am running...

CRM for non-server settings?
CRM programs such as Maximiser run in a workgroup setting; is there a Microsoft alternative for workgroups? ...

Set up outlook with my email
Hi all, I have an e-mail address I want to set up with Outlook or outlook express. It is a web based email that outlook recognises e.g. hotmail but this is linked to another e-mail that people actually send the messages to i.e. a company e-mail address. How do I get outlook express to recognise the linked e-mail address. Regards & thanks, Sketch Sketch <sketcher@eircom.net> wrote: > It is a web based email that outlook recognises e.g. hotmail but this > is linked to another e-mail that people actually send the messages to > i.e. a company e-mail address. The only w...

Setting Up Auto Reply in OL 2000
Hello; Can anyone explain how to set up Auto Reply in OL 2000? Thanks! Clay See if the information on the following page helps: http://www.slipstick.com/rules/autoreply.htm -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:HC0zb.2297$t87.1578@nwrdny02.gnilink.net, Clay Rembert wrote: > Hello; > > Can anyone explain how to set up Auto Reply in OL 2000? Thanks! > > Clay ...

SM Bus Controller has no driver
In Device Manager I am seeing a yellow alert symbol next to the SM Bus Controller under "Other Devices". If I right click and select Properties I am told the driver is not installed. I have searched online but cannot find anywhere that will tell me exactly what driver I need and how to get it. I do not have a Windows XP disk (I am Home SP3)and I do not have a Recovery Console as this was lost in a reformat. Can anyone tell me a) what is SM Bus controller, and b) under these circumstances,how can I find ,and where, the right one? Many thanks. Richard Chipsets SMBu...

Exchange 5.5 and Active Directory
I have Exchange 5.5 running on a Windows 2000 Server machine. I am going to install Active Directory 2003 on a different machine and the Exchange server will be a member server. Are there any steps I need to take on the Exchange server for it to become part of the Active Directory environment or can I leave the system as is and not have to change anything? Any information would be greatly appreciated. You will need to setup your active directory connector and connection agreements so the 5.5 directory info is visible from AD. I've included a KB article that talks about the different s...

how to get data from Active Directory?
Hi, users log in with their personal number (5 digits) in our intranet. For each number, there is a name associated in the Active Directory of the domain server. Now, there is an asp.net application which read the number (Request.ServerVariables("remote_user")). My question is: is it possible to get the name from the AD in the application? Thanks Luc "Luc" <qcqsc@qscqs.fr> wrote in message news:uUmp7JQmKHA.3476@TK2MSFTNGP06.phx.gbl... > users log in with their personal number (5 digits) in our intranet. For > each number, there is ...

Set the text color of particular cell of list control
Hi, I want to set the background color of particular cell in a multicolumn list control. How can this be achieved. Thanks in Advance, vijay Check out codeguru/codeproject. One way would be to handle NM_CUSTOMDRAW. --------- Ajay Kalra ajaykalra@yahoo.com >I want to set the background color of particular cell in a multicolumn list >control. How can this be achieved. Have a look at using custom draw (NM_CUSTOMDRAW). Dave ...

Activities 01-03-06
Is there an easy way to make the duration and due date required on an activity? Thanks for your help. Tuan Hi Tuan, Are you referring to Microsoft CRM 1.2 of 3.0? Regards Rob Bakkers, Avanade Netherlands "Tuan" wrote: > Is there an easy way to make the duration and due date required on an > activity? Thanks for your help. > > Tuan Hi Rob, I'm refering to Microsoft CRM 1.2. Thank you kindly. Tuan "Rob Bakkers" wrote: > Hi Tuan, > > Are you referring to Microsoft CRM 1.2 of 3.0? > > Regards > Rob Bakkers, > Avanade Ne...

Creating ScrollBar Control in an OCX
Hi all, I have User control (OCX) I created in VC++ 6.0 which basicaly displays a window with some data. I do not want to use the window's scrollbar, so I want to create my own. In the constructor for the control I have... // Create our Scroll Bar. CRect SBRect, ClientRect; GetClientRect(&ClientRect); SBRect = ClientRect; SBRect.left = SBRect.right - ::GetSystemMetrics(SM_CXVSCROLL);; SBRect.bottom -= 50; m_ScrollBar = new CScrollBar(); m_ScrollBar->Create(-WS_CHILD|WS_VISIBLE|WS_BORDER|SBS_VERT, SBRect, this, 2000); 2 problems, #1 GetClientRect() fails wiuth "Debug As...

How to add custom toolbar(with edit box and Spin controlls) in my application
hi frnds i have to add a toolbar in my application and toolbar should have two edit box with spin controls and 4 buttons and i have to add it in my existing application. so plz help me, how to do it plz reply with code n suggestion ur frnd Premanshu sInha See here: http://www.codeguru.com/cpp/controls/toolbar/placingcontrolsintoolbars/article.php/c2547/ --- Ajay ...

How to Edit Hyperlink
I have a table with email address. When I click on it in the form it simply brings up my email client for a new email. I've tried using a right click command 'HyperlinkDisplayText' which is ok but it displays the email address twice in the text box. How do I edit the email address? James After it does fire up your email client if you click back on access that field should now be enabled to make a change. You can always create a button that clears that field. "JamesJ" wrote: > I have a table with email address. > When I click on it in the f...

Changing Security Role Settings
Hi, Currently our security role settings allow users to be able to delete activities. I want to change this so that they cannot delete any activities. However, having made the changes the users that already had activities scheduled can no longer enter the sales module as they get the general error message � an error has occurred contact your system administrator. However, for a new user that does not have any activities scheduled yet the security changes work as required. Does anyone know of a way to successfully change the security settings for existing users? Thanks Lee Hi Lee, Normall...