Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An editbox with history. Is there a standard solution available ?

22 views
Skip to first unread message

R.Wieser

unread,
May 8, 2013, 9:34:33 AM5/8/13
to
Hello All,

Is there a standard solution to adding history to a single-line editbox ?

-- Background:
I thought it would be nice to add a history to a single-line editbox, so I
could quickly recover previously entered lines and than apply changes.

After some googleing on the subject (win32 editbox history) and finding
nothing I just subclassed an editbox, added a listbox to it and got what I
wanted (the basics that is, lots of error-checking not (yet) done).

Only after that I realized that I had another possible source of help, this
newsgroup. :-\ :-)

So, does anyone know if there is a standard (API) solution available ? An
editbox setting I did maybe miss ?

Regards,
Rudy Wieser



Mr. Man-wai Chang

unread,
May 8, 2013, 9:38:25 AM5/8/13
to
On 8/05/2013 9:34 PM, R.Wieser wrote:
> Hello All,
> After some googleing on the subject (win32 editbox history) and finding
> nothing I just subclassed an editbox, added a listbox to it and got what I
> wanted (the basics that is, lots of error-checking not (yet) done).

A ComboBox? And EditBox is a large text field, not a TextBox...

--
@~@ Remain silent. Nothing from soldiers and magicians is real!
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (Fedora 18 i686) Linux 3.8.11-200.fc18.i686
^ ^ 21:33:02 up 1:17 0 users load average: 0.00 0.01 0.05
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa

David Lowndes

unread,
May 8, 2013, 9:42:50 AM5/8/13
to
>So, does anyone know if there is a standard (API) solution available ? An
>editbox setting I did maybe miss ?

None that I'm aware of.

Dave

Deanna Earley

unread,
May 8, 2013, 9:46:58 AM5/8/13
to
Look at the SHAutoComplete API that, I believe, can accept a custom
source of information.

--
Deanna Earley (dee.e...@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)

R.Wieser

unread,
May 8, 2013, 1:10:50 PM5/8/13
to
Hello Deanna,

> Look at the SHAutoComplete API that, I believe, can accept
> a custom source of information.

I've just take a look at the MSDN page here:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb759862(v=vs.85).as
px

but alas, could not see anything in regard to a 'custom source'.

Thanks for the attempted help though.

Regards,
Rudy Wieser


-- Origional message:
Deanna Earley <dee.e...@icode.co.uk> schreef in berichtnieuws
kmdl0f$d0q$1...@speranza.aioe.org...

R.Wieser

unread,
May 8, 2013, 1:19:46 PM5/8/13
to
Hello Mr. Man-wai Chang,

> A ComboBox? And EditBox is a large text field, not a TextBox...

Nope, a single-line editbox. At least, that is what its .... grmbl ! Its
actually called an "edittext" control, not an "editbox". Maybe thats why I
got so few hits on Google. :-\ :-)

But yes, I could imagine that the same kind of method would also work for a
multi-line edittext control.

Regards,
Rudy Wieser

P.s.
My first (working!) attempt was indeed to subclass a ComboBox, but there I
had to counter-act too many side effects (like deleting a selected entry in
the listbox control also deleted the text in the edittext control) for me to
be comfortable with the result.


-- Origional message:
Mr. Man-wai Chang <toylet...@gmail.com> schreef in berichtnieuws
kmdk9n$457$1...@dont-email.me...
> On 8/05/2013 9:34 PM, R.Wieser wrote:
> > Hello All,
> > After some googleing on the subject (win32 editbox history) and finding
> > nothing I just subclassed an editbox, added a listbox to it and got what
I
> > wanted (the basics that is, lots of error-checking not (yet) done).
>
> A ComboBox? And EditBox is a large text field, not a TextBox...
>
> --
> @~@ Remain silent. Nothing from soldiers and magicians is real!
> / v \ Simplicity is Beauty! May the Force and farces be with you!
> /( _ )\ (Fedora 18 i686) Linux 3.8.11-200.fc18.i686
> ^ ^ 21:33:02 up 1:17 0 users load average: 0.00 0.01 0.05
> ???! ???! ???! ???! ???! ???! ????? (CSSA):
> http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa


R.Wieser

unread,
May 8, 2013, 1:20:32 PM5/8/13
to
Hello David,

> None that I'm aware of.

Thanks.

Regards,
Rudy Wieser


-- Origional message:
David Lowndes <Dav...@example.invalid> schreef in berichtnieuws
7ilko8lfq6d1q9kpl...@4ax.com...

René König

unread,
May 8, 2013, 2:10:18 PM5/8/13
to
Hi!

Am 08.05.2013 19:10, schrieb R.Wieser:
> http://msdn.microsoft.com/en-us/library/windows/desktop/bb759862(v=vs.85).as
> px
>
> but alas, could not see anything in regard to a 'custom source'.

Scroll to the bottom of that page and look for "See also" ;-)

In short: You need to implement at least IEnumString. Then call
IAutoComplete::Init (implemented by the system) and you're done.

Good luck,
Rene



R.Wieser

unread,
May 8, 2013, 5:16:29 PM5/8/13
to
Hello Ren�,

> Scroll to the bottom of that page and look for "See also" ;-)

Nice of MS, hiding additional information behind a non-informational link
like that. :-\

Although, the link does only say one thing about SHAutoComplete: That page
isn't about it. <huh>

> In short: You need to implement at least IEnumString.

Why now do I get the feeling that that solution will be heavier that the one
I already created ...

So, thank you for the information but no thank you. :-)

Regards,
Rudy Wieser


-- Origional message.
Ren� K�nig <mu...@tbkoenig.de> schreef in berichtnieuws
kme4eo$i8d$1...@online.de...

Mr. Man-wai Chang

unread,
May 9, 2013, 11:56:31 AM5/9/13
to
On 9/05/2013 1:19 AM, R.Wieser wrote:
> P.s.
> My first (working!) attempt was indeed to subclass a ComboBox, but there I
> had to counter-act too many side effects (like deleting a selected entry in
> the listbox control also deleted the text in the edittext control) for me to
> be comfortable with the result.

I think the ComboBox is the closest thing to Intelli-Sense... :)

--
@~@ Remain silent. Nothing from soldiers and magicians is real!
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (Fedora 18 i686) Linux 3.8.11-200.fc18.i686
^ ^ 23:48:01 up 1:02 0 users load average: 0.18 0.07 0.06

R.Wieser

unread,
May 9, 2013, 2:08:44 PM5/9/13
to
Mr. Man-wai Chang,

> I think the ComboBox is the closest thing to Intelli-Sense... :)

Well, I just want to have a history of previously typed lines , not
something thtas going to second-guess what I'm going to type next :-)

Regards,
Rudy Wieser

P.s.
When googeling I did find a ComboBox based Auto-complete example. It just
didn't fit my needs. I saved it anyway, just to be able to look at it if I
would get stuck with my own attempts. I didn't.


-- Origional message:
Mr. Man-wai Chang <toylet...@gmail.com> schreef in berichtnieuws
kmggok$116$1...@dont-email.me...
> On 9/05/2013 1:19 AM, R.Wieser wrote:
> > P.s.
> > My first (working!) attempt was indeed to subclass a ComboBox, but there
I
> > had to counter-act too many side effects (like deleting a selected entry
in
> > the listbox control also deleted the text in the edittext control) for
me to
> > be comfortable with the result.
>
> I think the ComboBox is the closest thing to Intelli-Sense... :)
>
> --
> @~@ Remain silent. Nothing from soldiers and magicians is real!
> / v \ Simplicity is Beauty! May the Force and farces be with you!
> /( _ )\ (Fedora 18 i686) Linux 3.8.11-200.fc18.i686
> ^ ^ 23:48:01 up 1:02 0 users load average: 0.18 0.07 0.06

René König

unread,
May 9, 2013, 7:00:12 PM5/9/13
to
Hi!

Am 08.05.2013 23:16, schrieb R.Wieser:
>> In short: You need to implement at least IEnumString.
>
> Why now do I get the feeling that that solution will be heavier that the one
> I already created ...

IEnumString is a very simple interface, so I'm quite sure that your
feeling is wrong. Just give it a try.

Rene

0 new messages