1. How can I make a field ready to receive typing?

My windows are working fine.  However, when the input window opens, the=
 cursor is nowhere to be seen.  I must either click on the input field or=
 hit TAB to produce a cursor so that I can type in the field.

As someone suggested, I tried SetFocus() to that field in a procedure that=
 is triggered by w32HActivate of that window.  When I do that, I still have=
 no cursor and cannot type.  However, pressing TAB causes the highlight to=
 appear at the next thing AFTER the input field, so I know that the cursor=
 was on the input field, it just wasn't enabled for some reason.  One=
 example (childwin.exw) does achieve a field open for input, but they used=
 onXXX, which is not compatible with the setHandler style I am using.

I have found the Win32 SDK documentation in msdn.microsoft.com, but am=
 having trouble relating it to Euphoria.  I know how to write programs, but=
 I am a beginner at Windows Programming.

Is there a Euphoria routine that invokes "SendInput"?  If so, I could use=
 it to send a TAB right after the window opened (instead of using SetFocus)=
 which would open the desired field for input, though I don't particularly=
 like this approach because it could interact with the keyboard and cause=
 unexpected results.

I learned an incredible thing while examining examples.  If I create a=
 window with flags set to {WS_CAPTION,WS_SYSMENU}, the window becomes=
 unresizable.  This is a property I wanted, but I have no idea why it=
 works.  Can you imagine how frustrated I would be if I tried to learn how=
 to do this by manually searching the the Windows SDK?  (No computer search=
 is possible, as it is in a number of separate pages, and Microsoft's=
 search engine doesn't help.)

HELP!

Thanks,
Louis.

new topic     » topic index » view message » categorize

2. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: <Louis at cwshop.com>
To: "EUforum" <EUforum at topica.com>
Subject: How can I make a field ready to receive typing?


> 
> 
> My windows are working fine.  However, when the input window opens, the cursor
> is nowhere to be seen.  I must either click on the input field or hit TAB to
> produce a cursor so that I can type in the field.

Try this ...

  WinMain( {firstwindow, focuscontrol}, Normal) 

to start the app. If the first parameter is a sequence of 2 elements, the first
is the main window and the second is the control that has initial focus.


> As someone suggested, I tried SetFocus() to that field in a procedure that is
> triggered by w32HActivate of that window.  When I do that, I still have no cursor
> and cannot type.  However, pressing TAB causes the highlight to appear at the
> next thing AFTER the input field, so I know that the cursor was on the input
> field, it just wasn't enabled for some reason.  One example (childwin.exw) does
> achieve a field open for input, but they used onXXX, which is not compatible with
> the setHandler style I am using.

Hmmmm.... Should have worked.
 
> I have found the Win32 SDK documentation in msdn.microsoft.com, but am having
> trouble relating it to Euphoria.  I know how to write programs, but I am a
> beginner at Windows Programming.

Aren't we all blink
 
> Is there a Euphoria routine that invokes "SendInput"?  If so, I could use it
> to send a TAB right after the window opened (instead of using SetFocus) which
> would open the desired field for input, though I don't particularly like this
> approach because it could interact with the keyboard and cause unexpected
> results.

There is a Windows API hat does this, but I don't think you will find it needed
to do what you want.
 
> I learned an incredible thing while examining examples.  If I create a window
> with flags set to {WS_CAPTION,WS_SYSMENU}, the window becomes unresizable.  This
> is a property I wanted, but I have no idea why it works.  Can you imagine how
> frustrated I would be if I tried to learn how to do this by manually searching
> the the Windows SDK?  (No computer search is possible, as it is in a number of
> separate pages, and Microsoft's search engine doesn't help.)

The other well known technique for learning about the Windows API is call "trial
and (lots of) error".

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

3. Re: How can I make a field ready to receive typing?

On Wed, 08 Oct 2003 14:14:49 +1000, Derek Parnell
<ddparnell at bigpond.com> wrote:

>> As someone suggested, I tried SetFocus() to that field in a procedure =
that is triggered by w32HActivate of that window.  When I do that, I =
still have no cursor and cannot type.  However, pressing TAB causes the =
highlight to appear at the next thing AFTER the input field, so I know =
that the cursor was on the input field, it just wasn't enabled for some =
reason.  One example (childwin.exw) does achieve a field open for input, =
but they used onXXX, which is not compatible with the setHandler style I =
am using.
>
>Hmmmm.... Should have worked.

I've had similar problems with combo boxes.

Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: How can I make a field ready to receive typing?

I've also had this (and still do) problem on edit text boxes, but haven't
figured out a simple program to expose it. Will keep trying.

So we must have a boogen somewhere.

george
----- Original Message -----
From: <Louis at cwshop.com>
To: "EUforum" <EUforum at topica.com>
Subject: How can I make a field ready to receive typing?


>
>
> My windows are working fine.  However, when the input window opens, the
cursor is nowhere to be seen.  I must either click on the input field or hit
TAB to produce a cursor so that I can type in the field.
>
> As someone suggested, I tried SetFocus() to that field in a procedure that
is triggered by w32HActivate of that window.  When I do that, I still have
no cursor and cannot type.  However, pressing TAB causes the highlight to
appear at the next thing AFTER the input field, so I know that the cursor
was on the input field, it just wasn't enabled for some reason.  One example
(childwin.exw) does achieve a field open for input, but they used onXXX,
which is not compatible with the setHandler style I am using.
>
> I have found the Win32 SDK documentation in msdn.microsoft.com, but am
having trouble relating it to Euphoria.  I know how to write programs, but I
am a beginner at Windows Programming.
>
> Is there a Euphoria routine that invokes "SendInput"?  If so, I could use
it to send a TAB right after the window opened (instead of using SetFocus)
which would open the desired field for input, though I don't particularly
like this approach because it could interact with the keyboard and cause
unexpected results.
>
> I learned an incredible thing while examining examples.  If I create a
window with flags set to {WS_CAPTION,WS_SYSMENU}, the window becomes
unresizable.  This is a property I wanted, but I have no idea why it works.
Can you imagine how frustrated I would be if I tried to learn how to do this
by manually searching the the Windows SDK?  (No computer search is possible,
as it is in a number of separate pages, and Microsoft's search engine
doesn't help.)
>
> HELP!
>
> Thanks,
> Louis.
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: How can I make a field ready to receive typing?

OK, Thanks.  I tried it and
WinMain( {firstwindow, focuscontrol}, Normal )
Does exactly the same thing as setFocus(focuscontrol).
Oh well.

Wishlist items:
Add a line to Win32Lib:
global constant 	WS_NO_RESIZE =3D {WS_CAPTION,WS_SYSMENU}

And, as time permits, add a short comment to constants like this in the=
 source that describes what they do, in lieu of documentation.  Then I=
 could browse (and search) Win32Lib source to find the flags that I need,=
 since they are not listed in the main documentation.  Even mentioning in=
 the documentation where constants starting with "WS_" (and other prefixes=
 too) are used would be of some help.  For example, in the documentation=
 for "create()", you could mention that the names for flag constants start=
 with "WS_" and for createEx() you could say what the prefix for exFlags=
 constants are.

Louis.

*********** REPLY SEPARATOR  ***********

On 10/8/2003 at 2:14 PM Derek Parnell wrote:

>
>
>----- Original Message ----- 
>From: <Louis at cwshop.com>
>To: "EUforum" <EUforum at topica.com>
>Sent: Wednesday, October 08, 2003 8:47 AM
>Subject: How can I make a field ready to receive typing?
>
>> My windows are working fine.  However, when the input window opens, the
>cursor is nowhere to be seen.  I must either click on the input field or
>hit TAB to produce a cursor so that I can type in the field.
>
>Try this ...
>
>  WinMain( {firstwindow, focuscontrol}, Normal) 
<snip>

new topic     » goto parent     » topic index » view message » categorize

6. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: <Louis at cwshop.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: How can I make a field ready to receive typing?


> 
> 
> OK, Thanks.  I tried it and
> WinMain( {firstwindow, focuscontrol}, Normal )
> Does exactly the same thing as setFocus(focuscontrol).
> Oh well.


What does this code do on your system?

------------
without warning
include win32lib.ew

integer MainWin
integer Text1
integer Text2
integer Text3

MainWin = create(Window,   "Initial Focus",0,     0,  0, 300, 300, 0)
Text1   = create(EditText, "Not here", MainWin,   5,  5, 200,  25, 0)
Text2   = create(EditText, "This is it", MainWin, 5, 35, 200,  25, 0)
Text3   = create(EditText, "Nor here", MainWin,   5, 65, 200,  25, 0)

WinMain({MainWin, Text2}, Normal)
------------ 

Can you possibly send me your code so I can find a solution?

> Wishlist items:
> Add a line to Win32Lib:
> global constant WS_NO_RESIZE = {WS_CAPTION,WS_SYSMENU}

Yeah, okay.
 
>And, as time permits, add a short comment to constants 
>like this in the source that describes what they do, in
>lieu of documentation.  Then I could browse (and search)
>Win32Lib source to find the flags that I need, since they
>are not listed in the main documentation.  Even mentioning
>in the documentation where constants starting with "WS_" 
>(and other prefixes too) are used would be of some help.
> For example, in the documentation for "create()", you
>could mention that the names for flag constants start
>with "WS_" and for createEx() you could say what the
>prefix for exFlags constants are.

There are thousands of Windows constants and I will never have the time to "add
a short note" for each of them. I'm afraid that you might just have to buy a book
on the subject, as I can't write one for you.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

7. Re: How can I make a field ready to receive typing?

On Thu, 09 Oct 2003 06:55:51 +1000, Derek Parnell
<ddparnell at bigpond.com> wrote:

>What does this code do on your system?
>
>------------
>without warning
>include win32lib.ew
>
>integer MainWin
>integer Text1
>integer Text2
>integer Text3
>
>MainWin =3D create(Window,   "Initial Focus",0,     0,  0, 300, 300, 0)
>Text1   =3D create(EditText, "Not here", MainWin,   5,  5, 200,  25, 0)
>Text2   =3D create(EditText, "This is it", MainWin, 5, 35, 200,  25, 0)
>Text3   =3D create(EditText, "Nor here", MainWin,   5, 65, 200,  25, 0)
>
>WinMain({MainWin, Text2}, Normal)
>------------=20
Sorry to jump in with a different and less important "feature":

The above code works just fine for me, with focus initially on Text2
and pressing tab moves the focus to Text3.

However, if I change Text2 to a ComboBox, or better:
Text2 =3D create(ComboBox, "", MainWin, 5, 35, 200,  25, 0)
addItem(Text2,"This is it")
setIndex(Text2,1)

the initial focus is OK, but pressing tab jumps back to Text1, which
is kinda odd. Subsequent tabs operate "in the right order".

Pete

new topic     » goto parent     » topic index » view message » categorize

8. Re: How can I make a field ready to receive typing?

OK Derek, thanks for your help.  Your example does work, BUT...

What I am trying to do is open a window at the beginning of the program to=
 check for a password, and if entered correctly, then close the password=
 window and open the main window.  I find the initial window is considered=
 the "main" window and I cannot close it without killing off the entire=
 windowing system.  Therefore, I open a secondary window to prompt for the=
 password, but when I do this I must click on the field or tab to it before=
 typing is possible.

Here is my version of your program:

Louis.

without warning
include win32lib.ew

integer MainWin, Win2
integer Text1
integer Text2
integer Text3
integer Text21
integer Text22
integer Text23

MainWin =3D create(Window,   "Initial Focus",0,     0,  0, 300, 300, 0)
Text1   =3D create(EditText, "Not here", MainWin,   5,  5, 200,  25, 0)
Text2   =3D create(EditText, "This is it", MainWin, 5, 35, 200,  25, 0)
Text3   =3D create(EditText, "Nor here", MainWin,   5, 65, 200,  25, 0)

Win2    =3D create(Window,   "Window 2",  MainWin, 50, 50, 300, 300, 0)
Text21  =3D create(EditText, "Password",     Win2,  5,  5, 200,  25, 0)
Text22  =3D create(EditText, "Text22",       Win2,  5, 35, 200,  25, 0)
Text23  =3D create(EditText, "Text23",       Win2,  5, 65, 200,  25, 0)

procedure Open_Win2(integer self, integer event, sequence parms)
    openDialog(Win2)
    setFocus(Text21)   -- This doesn't do anything   sad
end procedure

setHandler(MainWin, w32HActivate, routine_id("Open_Win2"))

WinMain(MainWin, Normal)

new topic     » goto parent     » topic index » view message » categorize

9. Re: How can I make a field ready to receive typing?

> procedure Open_Win2(integer self, integer event, sequence parms)
>     openDialog(Win2)
>     setFocus(Text21)   -- This doesn't do anything   sad
> end procedure

Louis,

use

    openWindow(Win2, Normal)

instead of openDialog().

new topic     » goto parent     » topic index » view message » categorize

10. Re: How can I make a field ready to receive typing?

> > procedure Open_Win2(integer self, integer event, sequence parms)
> >     openDialog(Win2)
> >     setFocus(Text21)   -- This doesn't do anything   sad
> > end procedure
> > setHandler(MainWin, w32HActivate, routine_id("Open_Win2"))
>
> You need an onActivate handler for Win2:
>
> procedure Activate_Win2(integer self, integer event, sequence parms)
>     setFocus(Text21)
> end procedure
> setHandler(Win2, w32HActivate, routine_id("Activate_Win2"))
>
> The reason for this is that when you use openDialog(), you start a nested
> message loop, so the call to setFocus() doesn't happen until the dialog is
> closed.

Yeah, that's right.

And do something like this in an authenticate function:

required_password = get_password_from_database()
user_entered_password = ""
while not equal( user_entered_password , required_password ) do
    openDialog( Win2 ) -- during which user_entered_password is set...
end while

Of course, you'll want to limit this to X number of attempts...

new topic     » goto parent     » topic index » view message » categorize

11. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: "C. K. Lester" <euphoric at cklester.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: How can I make a field ready to receive typing?


> 
> 
> > procedure Open_Win2(integer self, integer event, sequence parms)
> >     openDialog(Win2)
> >     setFocus(Text21)   -- This doesn't do anything   sad
> > end procedure
> 
> Louis,
> 
> use
> 
>     openWindow(Win2, Normal)
> 
> instead of openDialog().
> 

Why?

new topic     » goto parent     » topic index » view message » categorize

12. Re: How can I make a field ready to receive typing?

Here is a working example...
------------
without warning
include win32lib.ew

integer MainWin, Win2
integer Text1
integer Text2
integer Text3
integer Text21
integer Text22
integer Text23
                 
-- Set initial position to outside the visible area.
MainWin = create(Window,   "Initial Focus",0,     -10000,  -10000, 300, 300, 0)
Text1   = create(EditText, "Not here", MainWin,   5,  5, 200,  25, 0)
Text2   = create(EditText, "This is it", MainWin, 5, 35, 200,  25, 0)
Text3   = create(EditText, "Nor here", MainWin,   5, 65, 200,  25, 0)

Win2    = create(Window,   "Window 2",  MainWin, 50, 50, 300, 300, 0)
Text21  = create(EditText, "Password",     Win2,  5,  5, 200,  25, 0)
Text22  = create(EditText, "Text22",       Win2,  5, 35, 200,  25, 0)
Text23  = create(EditText, "Text23",       Win2,  5, 65, 200,  25, 0)

procedure Activate_MainWin(integer self, integer event, sequence parms)
    openDialog(Win2)                                
    -- Bring the main window back into view.
    setCtlPosition(MainWin, 0,0)
end procedure

procedure Activate_Win2(integer self, integer event, sequence parms)
    setFocus(Text21)
end procedure

setHandler(MainWin, w32HActivate, routine_id("Activate_MainWin"))
setHandler(Win2, w32HActivate, routine_id("Activate_Win2"))

WinMain(MainWin, Normal)

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

13. Re: How can I make a field ready to receive typing?

> > > procedure Open_Win2(integer self, integer event, sequence parms)
> > >     openDialog(Win2)
> > >     setFocus(Text21)   -- This doesn't do anything   sad
> > > end procedure
> >
> > Louis,
> >
> > use
> >
> >     openWindow(Win2, Normal)
> >
> > instead of openDialog().
> >
>
> Why?

Well, Derek, when I originally wrote the Win32Lib way back in the 1800s
<bonk>

Actually, I'm releasing Win32Lib v2.0 real soon now and I've made changes to
<screeeeech>

Well, because when I tried it using openWindow() with his code, it worked
for me. However, I see that Matt's suggestion is probably the correct one in
this case. :) So sue me!!!!

-always willing to help if not being really helpful :(

new topic     » goto parent     » topic index » view message » categorize

14. Re: How can I make a field ready to receive typing?

Derek wrote:

> Here is a working example...

Here's how it "works" for me:

1. Password text field not highlighted upon start.
2. When password dialog is dismissed, main screen comes in with size 0,0
(not 300,300 as defined).

I'm using Win2K, EU2.4, and Win32Lib latest 'n' greatest.

new topic     » goto parent     » topic index » view message » categorize

15. Re: How can I make a field ready to receive typing?

On Thu, 9 Oct 2003 14:31:59 -0400, Matt Lewis
<matthewwalkerlewis at yahoo.com> wrote:

>> procedure Open_Win2(integer self, integer event, sequence parms)
>>     openDialog(Win2)
>>     setFocus(Text21)   -- This doesn't do anything   sad
>> end procedure
>> setHandler(MainWin, w32HActivate, routine_id("Open_Win2"))
>
>You need an onActivate handler for Win2:
>
>procedure Activate_Win2(integer self, integer event, sequence parms)
>    setFocus(Text21)
>end procedure
>setHandler(Win2, w32HActivate, routine_id("Activate_Win2"))
>
>The reason for this is that when you use openDialog(), you start a =
nested
>message loop, so the call to setFocus() doesn't happen until the dialog =
is
>closed.
True. Being picky, if you use openWindow(Win2,Modal), then it does
return control, is still modal, and sets the focus correctly.

Pete

new topic     » goto parent     » topic index » view message » categorize

16. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: "C. K. Lester" <euphoric at cklester.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: How can I make a field ready to receive typing?


> 
> 
> Derek wrote:
> 
> > Here is a working example...
> 
> Here's how it "works" for me:
> 
> 1. Password text field not highlighted upon start.
> 2. When password dialog is dismissed, main screen comes in with size 0,0
> (not 300,300 as defined).
> 
> I'm using Win2K, EU2.4, and Win32Lib latest 'n' greatest.
> 
> --^----------------------------------------------------------------
> This email was sent to: ddparnell at bigpond.com
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
> 

Here's how it works for me:

1. Password text field is highlighted upon start.
2. When password dialog is dismissed, main screen comes in at position 0,0
 and size 300,300 as defined.

I'm using WinME, EU2.4, and Win32Lib latest.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

17. Re: How can I make a field ready to receive typing?

> > Derek wrote:
> > > Here is a working example...
> > Here's how it "works" for me:
> > 1. Password text field not highlighted upon start.
> > 2. When password dialog is dismissed, main screen comes in with size 0,0
> > (not 300,300 as defined).
> > I'm using Win2K, EU2.4, and Win32Lib latest 'n' greatest.

Derek writes:
> Here's how it works for me:
>
> 1. Password text field is highlighted upon start.
> 2. When password dialog is dismissed, main screen comes in at position 0,0
>  and size 300,300 as defined.
>
> I'm using WinME, EU2.4, and Win32Lib latest.

Weird! Obviously it's an issue with Win2K then. I'm going to try it on Win98
tomorrow and see how that goes.

new topic     » goto parent     » topic index » view message » categorize

18. Re: How can I make a field ready to receive typing?

I have been putting in Windows on opening in IDE  open files. What is the
Activate procedure.Should I be using which?
Jim
==========================
procedure MyWin_onActivate (integer self, integer event, sequence
params)--params is ()
======================================
procedure MyWin_onOpen
----- Original Message ----- 
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: How can I make a field ready to receive typing?


>
>
> Here is a working example...
> ------------
> without warning
> include win32lib.ew
>
> integer MainWin, Win2
> integer Text1
> integer Text2
> integer Text3
> integer Text21
> integer Text22
> integer Text23
>
> -- Set initial position to outside the visible area.
> MainWin = create(Window,   "Initial Focus",0,     -10000,  -10000, 300,
300, 0)
> Text1   = create(EditText, "Not here", MainWin,   5,  5, 200,  25, 0)
> Text2   = create(EditText, "This is it", MainWin, 5, 35, 200,  25, 0)
> Text3   = create(EditText, "Nor here", MainWin,   5, 65, 200,  25, 0)
>
> Win2    = create(Window,   "Window 2",  MainWin, 50, 50, 300, 300, 0)
> Text21  = create(EditText, "Password",     Win2,  5,  5, 200,  25, 0)
> Text22  = create(EditText, "Text22",       Win2,  5, 35, 200,  25, 0)
> Text23  = create(EditText, "Text23",       Win2,  5, 65, 200,  25, 0)
>
> procedure Activate_MainWin(integer self, integer event, sequence parms)
>     openDialog(Win2)
>     -- Bring the main window back into view.
>     setCtlPosition(MainWin, 0,0)
> end procedure
>
> procedure Activate_Win2(integer self, integer event, sequence parms)
>     setFocus(Text21)
> end procedure
>
> setHandler(MainWin, w32HActivate, routine_id("Activate_MainWin"))
> setHandler(Win2, w32HActivate, routine_id("Activate_Win2"))
>
> WinMain(MainWin, Normal)
>
> -- 
> Derek
>
> --^----------------------------------------------------------------
> This email was sent to: sixs at ida.net
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

19. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: <sixs at ida.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: How can I make a field ready to receive typing?


> 
> 
> I have been putting in Windows on opening in IDE  open files. What is the
> Activate procedure.Should I be using which?
> Jim

w32HOpen is triggered BEFORE the window is opened.

w32Activate is triggered AFTER the window is opened.

The high-level logic for win32lib's openWindow is ...
 ----------
    If WinMain() has already finished then do nothing.
                
    If 'id' is not valid then do nothing.

    If 'id' is not a Window then do nothing.

    Invoke any w32HOpen handler for this window.
    
    If this opening as 'Modal' or 'Dialog' then
        make sure it has not got the WS_MINIMIZEBOX style flag.
        
If the window is being opened as 'Normal' and it is currently minimized,
    then change the request to 'Restore'.
    
    Set the default text and background colors.

    If this window has a menu bar then draw it too.    
    
    Draw any tab controls that are owned by this window.

Display the window according to the requested style (Normal, Minimized,
    Maximized, ...)

    Flag the window as 'open'.
    
    Force a repaint of the whole window.    

    Set focus on the window.    

    If a specific control was requested for focus then focus on that now.

   If this is a 'Modal' or 'Dialog' open, and the window is not already
        on the modal stack, save previous modal windows and set this one
        as the current modal window.

   If this window has a Rebar and AutoRebarSizing is activated then
        save initial positions of all the window's controls.
        
   Invoke any w32HActivate handler for this window.
 ----------

Hope this helps.
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

20. Re: How can I make a field ready to receive typing?

----- Original Message ----- 
From: <Louis at cwshop.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: How can I make a field ready to receive typing?


> 
[snip]
> Comment by Derek:
>     Here's how it works for me:
>     1. Password text field is highlighted upon start.
>     2. When password dialog is dismissed, main screen comes in at position 0,0
>      and size 300,300 as defined.
> 
> Do you mean that the main window is not visible until the password window is
> closed?  On my system they both appear at the outset with the password window in
> front of the main window.
> 

The setCtlPosition() call is to move it from the initial -1000,-1000 coordinates
to 0,0 so it can be seen.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

21. Re: How can I make a field ready to receive typing?

OK.  I thought your comment referred to my original version, not your=
 tricky off screen enhancement.  I understood what setCtlPosition() was=
 for.  Thanks for your help.

Though I do have a nagging thought that if someone had a multi-screen=
 setup, -10000 could possibly be on another screen?  That won't happen in=
 this case, but I might use this technique again in the future.  Perhaps a=
 more elegant solution is for W32Lib to define the constant "WS_HIDE" which=
 would guarantee that it would be off screen on any system (because it=
 knows the actual screen size).

Louis.

*********** REPLY SEPARATOR  ***********

On 10/10/2003 at 9:32 PM Derek Parnell wrote:

>
>
>----- Original Message ----- 
>From: <Louis at cwshop.com>
>To: "EUforum" <EUforum at topica.com>
>Sent: Friday, October 10, 2003 2:42 PM
>Subject: RE: How can I make a field ready to receive typing?
>
>
>[snip]
>> Comment by Derek:
>>     Here's how it works for me:
>>     1. Password text field is highlighted upon start.
>>     2. When password dialog is dismissed, main screen comes in at
>position 0,0
>>      and size 300,300 as defined.
>> 
>> Do you mean that the main window is not visible until the password
>window is closed?  On my system they both appear at the outset with the
>password window in front of the main window.
> 
>
>The setCtlPosition() call is to move it from the initial -10000,-10000
>coordinates to 0,0 so it can be seen.
>
>-- 
>Derek

new topic     » goto parent     » topic index » view message » categorize

22. Re: How can I make a field ready to receive typing?

> > Here's how it "works" for me:
> >
> > 1. Password text field not highlighted upon start.
> > 2. When password dialog is dismissed, main screen comes in with size 0,0
> > (not 300,300 as defined).
> >
> > I'm using Win2K, EU2.4, and Win32Lib latest 'n' greatest.
>
> Here's how it works for me:
> 1. Password text field is highlighted upon start.
> 2. When password dialog is dismissed, main screen comes in at position 0,0
>  and size 300,300 as defined.
> I'm using WinME, EU2.4, and Win32Lib latest.

Derek, FYI...

I just tried the code on my Win98, Win32Lib 0.59, and EU2.4 and got the
exact same results as I got on my Win2K box, namely:

1. Password text field not highlighted upon start. (Pressing TAB gets me
into "Text22" box.)
2. When password dialog is dismissed, main screen comes in with size 0,0
(not 300,300 as defined).

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu