Druck Position eines Textes ?

C

coolsero

Hallo Leute,

ich habe hier ein kleines Problem beim ausrichten meines Textes beim
Drucken.
ich benutze die Funktion:

pDC->TextOut(310,690,"Hier soll der text hin ");

das Problem ist das wenn ich einen Anderen Drucker habe der Tex auch an
einer anderen Stelle ist. So ich kann mir ja mit:

int a = rcClient.Height();
int b = rcClient.Width();

int c = pDC->GetDeviceCaps(PHYSICALWIDTH);
int d = pDC->GetDeviceCaps(PHYSICALHEIGHT);

disen beiden Methoden den Druckbereich holen auf dem ich drucken kann.
Nur wie teile ich diesen Druck bereich nun ein damit bei jedem Drucker
die Position des Textes gleich ist ?


Danke Jens
 
G

Gernot Frisch

Hallo Leute,

ich habe hier ein kleines Problem beim ausrichten meines Textes beim
Drucken.
ich benutze die Funktion:

pDC->TextOut(310,690,"Hier soll der text hin ");

das Problem ist das wenn ich einen Anderen Drucker habe der Tex auch
an
einer anderen Stelle ist. So ich kann mir ja mit:

int a = rcClient.Height();
int b = rcClient.Width();

int c = pDC->GetDeviceCaps(PHYSICALWIDTH);
int d = pDC->GetDeviceCaps(PHYSICALHEIGHT);

disen beiden Methoden den Druckbereich holen auf dem ich drucken
kann.
Nur wie teile ich diesen Druck bereich nun ein damit bei jedem
Drucker
die Position des Textes gleich ist ?

Doh!
 
V

Victor Bazarov

Hallo Leute,

ich habe hier ein kleines Problem [...]

Wrong newsgroup. Try something with 'windows' in its name. And
follow the rules of the newsgroup you post to, especially regarding
the [human] language it's in.

V
 
R

Rolf Magnus

Victor said:
Hallo Leute,

ich habe hier ein kleines Problem [...]

Wrong newsgroup. Try something with 'windows' in its name. And
follow the rules of the newsgroup you post to, especially regarding
the [human] language it's in.

Hmm, just out of curiosity: Where is the rule that says you may only post in
english here?
 
?

=?ISO-8859-15?Q?Juli=E1n?= Albo

Chris said:
People can post in any language the like. The Internet is universal.
What is common sense is to use a language that the majority might
understand.

Right. And that language in this and many other groups is... ?
 
V

Victor Bazarov

Rolf said:
Victor Bazarov wrote:

Rolf said:
Victor Bazarov wrote:



(e-mail address removed) wrote:


Hallo Leute,

ich habe hier ein kleines Problem [...]

Wrong newsgroup. Try something with 'windows' in its name. And
follow the rules of the newsgroup you post to, especially regarding
the [human] language it's in.


Hmm, just out of curiosity: Where is the rule that says you may only post
in english here?

Read my post. And others' posts that say the same thing. That's the
rule I am referring to.


Well, how could someone new to the group know that? If he sees only english
postings, that doesn't automatically mean that english is the only accepted
language. [...]

Yes, but it's a safe[r] start [than x = x++ * x++].
No, but maybe a hint in the FAQ or somesuch would be useful.

Then contact the maintainer of the FAQ. I hope you don't need help
with that.

V
 
?

=?ISO-8859-1?Q?Sch=FCle_Daniel?=

#include <stdio.h>

#define void nix
#define inache default
#define esli if
#define nikogo rand(2)
#define otdixai
#define brich_ab break
#define EARTH 0
#define TO

enum swetofor{rot, gelb, green};

int main(nix)
{
enum swetofor ampel;
while(1.1)
{
switch(ampel)
{
case rot:
esli(nikogo){
ampel = green;
brich_ab;
}
sleep(8);
ampel = gelb;
brich_ab;
case gelb:
ampel = green;
sleep(1);
brich_ab;
case green:
sleep(10);
ampel = rot;
brich_ab;
inache:
otdixai;
}
}
return TO EARTH;
}
 
?

=?ISO-8859-1?Q?Sch=FCle_Daniel?=

#include <stdio.h>

#define void nix
#define inache default
#define esli if
#define nikogo rand(2)
#define otdixai
#define brich_ab break
#define HELL
#define TO 0
#define TRAFFIC HELL
#define LIGHT HELL

enum swetofor{rot, gelb, green};

int main(nix)
{
enum swetofor ampel;
while(1.1)
{
switch(ampel)
{
case rot:
esli(nikogo){
ampel = green;
brich_ab;
}
sleep(8);
ampel = gelb;
brich_ab;
case gelb:
ampel = green;
sleep(1);
brich_ab;
case green:
sleep(10);
ampel = rot;
brich_ab;
inache:
otdixai;
}
}
return TO TRAFFIC LIGHT HELL;
}
 
R

REH

Schüle Daniel said:
#include <stdio.h>

#define void nix
#define inache default
#define esli if
#define nikogo rand(2)
#define otdixai
#define brich_ab break
#define EARTH 0
#define TO

enum swetofor{rot, gelb, green};

int main(nix)
{
enum swetofor ampel;
while(1.1)
{
switch(ampel)
{
case rot:
esli(nikogo){
ampel = green;
brich_ab;
}
sleep(8);
ampel = gelb;
brich_ab;
case gelb:
ampel = green;
sleep(1);
brich_ab;
case green:
sleep(10);
ampel = rot;
brich_ab;
inache:
otdixai;
}
}
return TO EARTH;
}

rand does not take any arguments.
there is no prototype for sleep.

REH
 
?

=?ISO-8859-15?Q?Juli=E1n?= Albo

Victor said:
Then contact the maintainer of the FAQ. I hope you don't need help
with that.

An tell him to put it in almost 5.000 languages, many people than can't read
english may need help.
 
P

Puppet_Sock

Schüle Daniel said:
#include <stdio.h>

#define void nix

This defines void as nix. But nix is never defined.
#define inache default
#define esli if
#define nikogo rand(2)

No prototype for rand is given. If you want stlib then you need to
include it. The rand in there does not take an argument.
#define otdixai
#define brich_ab break
#define HELL
#define TO 0
#define TRAFFIC HELL
#define LIGHT HELL

enum swetofor{rot, gelb, green};

int main(nix)
{
enum swetofor ampel;
while(1.1)
{
switch(ampel)

You are using ampel without ever having given it a value.
{
case rot:
esli(nikogo){
ampel = green;
brich_ab;
}
sleep(8);

No prototype for sleep.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top