Solved

How do i send a string to a windows dialog

Posted on 1998-03-28
11
152 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
  • 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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 this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now