Richard Leahy wrote:
> Hi guys. I have been struggling with writing a string into an edit
> control using the windows api calls. What I have noticed is that if i
> write text to a different control like a button control for example it
> works. Is there something in place like a security thing that prevents
> writing to an edit control? code below. thanks. I have put my C code
> at the very bottom for reference.

There should be no difference.  If you can change the label on a button,
you should be able to change the text in an edit control, even if it is
read only.  It's the same window message (WM_SETTEXT).  You should not
need to open the process handle; Windows IPC should handle that.

Do you have the Windows SDK or Visual Studio?  The "spyxx" tool should
let you look at the window tree structure of the application, to make
sure the edit control is really where you think it is.

Is this a simple test application you could send me?


> import os,sys,subprocess,time
> from subprocess import *
> from os import *

You really need to get out of that habit.  What "from os import *" does
is this:
    import os
    abort = os.abort
    access = os.access
    chdir = os.chdir
    chmod = os.chmod
    ...
and so on, until every name from "os" is copied into your module.  You
EITHER do
    import os
OR you do
    from os import *
and the latter is virtually always a bad idea, because it fills your
namespace with all those foreign names, most of which you will never use.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to