🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
7 messages
7 total messages Started by Paulo Buzinello Wed, 13 Sep 2006 08:34
SetWindowText() on Win 9x/Me
#3029
Author: Paulo Buzinello
Date: Wed, 13 Sep 2006 08:34
6 lines
905 bytes
Hi, All

What is the alternative to SetWindowText() on Windows 95/98/Me?
That function works fine on NT kernel only.

Thanks in Advance
Re: SetWindowText() on Win 9x/Me
#3030
Author: Alan Bellingham
Date: Wed, 13 Sep 2006 09:08
31 lines
2189 bytes
Paulo Buzinello <NO_SPAM_paulo@buzinello.com> wrote:

>What is the alternative to SetWindowText() on Windows 95/98/Me?

SetWindowText()

>That function works fine on NT kernel only.

(The whole of Windows relies on it to show text. It's documented as
being usable as far back as Windows NT 3.51 and Windows 95.)

If you're trying to set the text of something in a different process,
then using the WM_SETTEXT message may work better. However, this is
unlikely to sort out any 95/NT differences.

What won't work is a Unicode SetWindowText() under Windows 95. If your
program is Unicode, then there's a whole lot of functions that don't do
anything in the mixed 16/32-bit variants of Windows. If your program IS
Unicode, then use the specifically non-Unicode SetWindowTextA()
function.

(Happily for me, those operating systems are now unsupported by
Microsoft, and I don't need to worry about them. The project I'm on has
always required the 32-bit OS. I remember Microsoft promising that
there'd only be Windows 95 as a transitional OS, and that by 1996,
everyone would be moving over to NT. Oh yes, Vista was supposed to be
here in 2004.)

Alan Bellingham
-- 
ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Re: SetWindowText() on Win 9x/Me
#3033
Author: Remy Lebeau (TeamB)
Date: Wed, 13 Sep 2006 16:52
12 lines
1258 bytes
"Paulo Buzinello" <NO_SPAM_paulo@buzinello.com> wrote in message
news:MPG.1f71b6e9f45c2dfa989681@newsgroups.borland.com...

> What is the alternative to SetWindowText() on Windows
> 95/98/Me? That function works fine on NT kernel only.

It works fine in all Windows versions.  What exactly are you having a
problem with?


Gambit
Re: SetWindowText() on Win 9x/Me
#3043
Author: Paulo Buzinello
Date: Sat, 16 Sep 2006 21:07
23 lines
1714 bytes
Num passado n�o muito distante, "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> disse...
> 
> "Paulo Buzinello" <NO_SPAM_paulo@buzinello.com> wrote in message
> news:MPG.1f71b6e9f45c2dfa989681@newsgroups.borland.com...
> 
> > What is the alternative to SetWindowText() on Windows
> > 95/98/Me? That function works fine on NT kernel only.
> 
> It works fine in all Windows versions.  What exactly are you having a
> problem with?

  My program, a console app, is called by a Clipper program
  When SetWindowText() is called the title blinks and returns
  to its initial text. I can notice the title changing, but
  the original title returns. I can't understand why.

  Thinking about and after some experiments, I notice that
  the instance changes (including in the XP) in XP and 98,
  but in the XP the new title remains.

  Thanks.

  []'s
Re: SetWindowText() on Win 9x/Me
#3042
Author: Paulo Buzinello
Date: Sat, 16 Sep 2006 21:07
34 lines
2258 bytes
Num passado n�o muito distante, Alan Bellingham disse...
> (The whole of Windows relies on it to show text. It's documented as
> being usable as far back as Windows NT 3.51 and Windows 95.)

  Yes. I know.
 
> If you're trying to set the text of something in a different process,
> then using the WM_SETTEXT message may work better. However, this is
> unlikely to sort out any 95/NT differences.

  See my other post.

> What won't work is a Unicode SetWindowText() under Windows 95. If your
> program is Unicode, then there's a whole lot of functions that don't do
> anything in the mixed 16/32-bit variants of Windows. If your program IS
> Unicode, then use the specifically non-Unicode SetWindowTextA()
> function.

  I tried SetWindowTextA(), but unsuccessful.

> (Happily for me, those operating systems are now unsupported by
> Microsoft, and I don't need to worry about them. The project I'm on has
> always required the 32-bit OS. I remember Microsoft promising that
> there'd only be Windows 95 as a transitional OS, and that by 1996,
> everyone would be moving over to NT. Oh yes, Vista was supposed to be
> here in 2004.)

  Unfortunately, in Brazil, we have a lot of machines running windows
  98, 95 and Me. Particularly, I have intention to stop with these
  old OS. But, for while... :)

  Thanks.

  []'s
Re: SetWindowText() on Win 9x/Me
#3044
Author: Bob Gonder
Date: Sat, 16 Sep 2006 23:38
6 lines
1234 bytes
Paulo Buzinello wrote:
>
>  My program, a console app, is called by a Clipper program
>  When SetWindowText() is called the title blinks and returns

You might want to use SetConsoleTitle() instead.
Re: SetWindowText() on Win 9x/Me
#3048
Author: Paulo Buzinello
Date: Sun, 17 Sep 2006 22:00
11 lines
1414 bytes
Num passado n�o muito distante, Bob Gonder disse...
> Paulo Buzinello wrote:
> >
> >  My program, a console app, is called by a Clipper program
> >  When SetWindowText() is called the title blinks and returns
> 
> You might want to use SetConsoleTitle() instead.

  Unfortunately i needed to change my program do GUI (w/o win)
  to solve another problem. Therefore, SetConsoleTitle() does
  not work.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads