Solved

How do i send a string to a windows dialog

Posted on 1998-03-28
11
158 Views
Last Modified: 2010-04-06
How do i send a text-string to a windows dialog (like the login dialog).
Can someone send a source?
0
Comment
Question by:tomeknik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 

Expert Comment

by:fant0m
ID: 1360978
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 

Expert Comment

by:fant0m
ID: 1360979
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 

Author Comment

by:tomeknik
ID: 1360980
Edited text of question
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:dr_gonzo
ID: 1360981
If it is a edit-box and you have the hwnd to it, you can use SetWindowText (covered in Win32.hlp)
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360982
You can also send wm_char messages to the window and thus type the text character by character. This is the same as actually typing it since when typing in a window all characters are send to the underlying window as windows messages ...
0
 

Author Comment

by:tomeknik
ID: 1360983
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
pjdb earned 100 total points
ID: 1360984
try this code

function SendKeys(Keys:string):boolean;
var
      hw:hwnd;
      i:byte;
Begin
      hw:=getfocus;
      If hw<>0 Then
      begin
            for i:=1 to length(keys) do
                  postmessage(hw, wm_char, word(keys[i]), 1);
            result:=true;
      end
      else
            result:=false;
End;      {SendKeys}

JDB
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360985
As I said, yes ...
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1360986
Sorry gysbert1, i've take your answer. In fact i've read the question and see no answer so i've made a cut and paste from a library of mine.
Sorry agian

JDB
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360987
No apology needed ! I did not have the time to post the code. You deserve the points ...
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1360988
Tomeknik, Is it working fine?

JDB
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month4 days, 12 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question