AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Windows API design

Ein Thema von frankly · begonnen am 5. Mai 2003 · letzter Beitrag vom 7. Mai 2003
Antwort Antwort
Seite 2 von 4     12 34      
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#11
  Alt 6. Mai 2003, 09:25
Aaaah. Now I understand. You need to communicate with an console application (You mentioned the function printf.)?

Well if that's what you want to do you should make yourself familiar with Pipes: Pipes - MSDN. But I'm afraid you have to modify some parts of the code of the c-programs.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
frankly

Registriert seit: 5. Mai 2003
22 Beiträge
 
#12
  Alt 6. Mai 2003, 09:38
Oh actually I don't want console hehe, I want an application window...like the one we're using here. "Microsoft look"
Bcoz apart from those input and ouputs I want some buttons there. And yse I mentioned printf bcoz I wrote the console proram. I think I'll simply replace all those printf with TextOut

But I don't know how to deal with the inputs...

And pipes...what are they for? Actually I have those two stevens book on UNIX programming, I have read some little on pipes. But how can I use it here?

I know what I want to do now but I'm not quite sure how should I do it...hope you can give me some guidlines

Thans really!!

[edit] pipes are for two parties to communicate
one writes to a pipe amd the other reads from the pipe
so...which are the two parties concerned here?
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#13
  Alt 6. Mai 2003, 09:51
Did you follow the link I gave you? And did you read what is written there? These Pipes are different from them you know from your bash.

All right. Next try.
You can get the text of an TEdit or a TMemo with the message WM_GETTEXT, you can put text into these controlls with the message WM_SETTEXT. You can click a botton on a windows by sending the message BM_CLICK to it. But in all cases you need the handles of these controlls. With FindWindow you can get the handle of any mainapplication window and with FindWindowEx you can retrieve the handles of childwindows like TEdits, TButtons and so on. Alternitivly you can use GetDlgItem if you know the ID of these childwindows.
You can look up any of these messages and functions here: MSDN

But that's all I can provide to help you. Sorry.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
frankly

Registriert seit: 5. Mai 2003
22 Beiträge
 
#14
  Alt 6. Mai 2003, 09:56
Actually me still reading the MSDN library
sooooooo many things there...but I have to finish all these by tomorrow..
Well...think it's ok hehe

Oh but isn't GetDigItem only for dialog boxes?
I won't be having any dialog boxes in the program
I'll simply make it like a console window, but with one or two little buttons
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#15
  Alt 6. Mai 2003, 10:00
By tomorrow? Good luck, guy.

You can use GetDlgItem with windows as well.
Zitat:
You can use the GetDlgItem function with any parent-child window pair, not just with dialog boxes. As long as the hDlg parameter specifies a parent window and the child window has a unique identifier
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
frankly

Registriert seit: 5. Mai 2003
22 Beiträge
 
#16
  Alt 6. Mai 2003, 10:10
Zitat von Luckie:
By tomorrow? Good luck, guy.

You can use GetDlgItem with windows as well.
Zitat:
You can use the GetDlgItem function with any parent-child window pair, not just with dialog boxes. As long as the hDlg parameter specifies a parent window and the child window has a unique identifier
Oh...sounds like I can't make it....
damn...ahhhh
well....I'll show you!! hehe with your help maybe.......
ok me back to read the named pipes

by the way, I should use named pipes right? Not Anonymous Pipes right?

[edit] Oh and actually it's 5pm here in Hong Kong hehe, it's midnight over you there, haha of coz can't make it...so I stand a higher chance then do I?
tell me yes...
[edit] Oh and yes, actually how should I use the pipes? I read a few pages and I think it is "about" the same as the one I know
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#17
  Alt 6. Mai 2003, 10:22
With my help? Maybe, but I will get some sleep now, even if it's here a quarter past eleven before noon.

Well I never worked with pipes. I just know that it is a way to communicate.

And if you can make ist in time? Hard to tell. Say good-bye to your bed, say good-bye to your wife or girlfriend for the rest of the evening and night, don't eat and just work as hard as you can.

But if you want to deliver a good work, a stable program with the minimum of bugs, you will need at least three days or even a hole week. Because there's a lot to learn and if you don't understand what you are actually doing, you will fail.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#18
  Alt 6. Mai 2003, 10:26
But me and all the others will try to help as best as possible. Maybe we can help you if you provide some code or something we can work with to help you.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
frankly

Registriert seit: 5. Mai 2003
22 Beiträge
 
#19
  Alt 6. Mai 2003, 10:26
11am?!?!?!?!
HOLY SH!T
OH MY GOD.......I'm not gonna make it....is there any simpler methods? Or this is the simplest already?
I am already quitting all the usual things...no girls here...as always
Not eating anything...o...damn.....it sounds very bad...
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#20
  Alt 6. Mai 2003, 10:30
Ok. Here is another idea: You can send data from one application to another by using WM_COPYDATA.

And don't worry we'll make it.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 4     12 34      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz