Connecting Tech Pros Worldwide Help | Site Map

Druck Position eines Textes ?

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 15th, 2006, 11:36 AM
coolsero@gmx.de
Guest
 
Posts: n/a
Default Druck Position eines Textes ?

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


  #2  
Old March 15th, 2006, 12:35 PM
Gernot Frisch
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?


<coolsero@gmx.de> schrieb im Newsbeitrag
news:1142425164.975402.83740@p10g2000cwp.googlegro ups.com...[color=blue]
> 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 ?[/color]

Doh!


  #3  
Old March 15th, 2006, 01:35 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

coolsero@gmx.de wrote:[color=blue]
> Hallo Leute,
>
> ich habe hier ein kleines Problem [...][/color]

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
--
Please remove capital As from my address when replying by mail
  #4  
Old March 15th, 2006, 03:45 PM
Rolf Magnus
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Victor Bazarov wrote:
[color=blue]
> coolsero@gmx.de wrote:[color=green]
>> Hallo Leute,
>>
>> ich habe hier ein kleines Problem [...][/color]
>
> 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.[/color]

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

  #5  
Old March 15th, 2006, 03:55 PM
Julián Albo
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Rolf Magnus wrote:
[color=blue]
> Hmm, just out of curiosity: Where is the rule that says you may only post
> in english here?[/color]

It's called "common sense".

--
Salu2
  #6  
Old March 15th, 2006, 03:55 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Rolf Magnus wrote:[color=blue]
> Victor Bazarov wrote:
>
>[color=green]
>>coolsero@gmx.de wrote:
>>[color=darkred]
>>>Hallo Leute,
>>>
>>>ich habe hier ein kleines Problem [...][/color]
>>
>>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.[/color]
>
>
> Hmm, just out of curiosity: Where is the rule that says you may only post in
> english here?[/color]

Read my post. And others' posts that say the same thing. That's the
rule I am referring to. If you need an international law that says what
I said, there isn't any.

Curiosity kill[fil]ed the cat, Rolf.
  #7  
Old March 15th, 2006, 04:35 PM
Alex Buell
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

On Wed, 15 Mar 2006 17:28:03 +0100 Rolf Magnus <ramagnus@t-online.de>
waved a wand and this message magically appeared:
[color=blue]
> Hmm, just out of curiosity: Where is the rule that says you may only post in
> english here?[/color]

I would have thought that seeing all these English posts would have
given you a free clue.

--
http://www.munted.org.uk

"Honestly, what can I possibly say to get you into my bed?" - Anon.
  #8  
Old March 15th, 2006, 05:05 PM
Chris Hills
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

In article <4418435b_1@x-privat.org>, Julián Albo <JULIANALBO@terra.es>
writes[color=blue]
>Rolf Magnus wrote:
>[color=green]
>> Hmm, just out of curiosity: Where is the rule that says you may only post
>> in english here?[/color]
>
>It's called "common sense".[/color]

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.

I have noticed that very few Americans post in English :-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ chris@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



  #9  
Old March 15th, 2006, 05:25 PM
Chris Hills
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

In article <dv9f9d$uq5$03$2@news.t-online.com>, Rolf Magnus <ramagnus@t-
online.de> writes[color=blue]
>Victor Bazarov wrote:
>[color=green]
>> coolsero@gmx.de wrote:[color=darkred]
>>> Hallo Leute,
>>>
>>> ich habe hier ein kleines Problem [...][/color]
>>
>> 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.[/color]
>
>Hmm, just out of curiosity: Where is the rule that says you may only post in
>english here?[/color]

Probably written in American in the original charter when the Internet
was only on the continental US. Perhaps it is worth re-visiting?

I would not start a war on languages... there are a LOT more Chinese
speakers/writers out there :-)


--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ chris@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



  #10  
Old March 15th, 2006, 05:35 PM
Rolf Magnus
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Victor Bazarov wrote:
[color=blue]
> Rolf Magnus wrote:[color=green]
>> Victor Bazarov wrote:
>>
>>[color=darkred]
>>>coolsero@gmx.de 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.[/color]
>>
>>
>> Hmm, just out of curiosity: Where is the rule that says you may only post
>> in english here?[/color]
>
> Read my post. And others' posts that say the same thing. That's the
> rule I am referring to.[/color]

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. And in clc++, we usually agree that such assumptions are bad
(hmm, x=5; x = x++ * x++; results in x being 42, so that must be how it is
in C++).
[color=blue]
> If you need an international law that says what I said, there isn't any.[/color]

No, but maybe a hint in the FAQ or somesuch would be useful.

  #11  
Old March 15th, 2006, 07:35 PM
Julián Albo
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Chris Hills wrote:
[color=blue]
> 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.[/color]

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

--
Salu2
  #12  
Old March 15th, 2006, 08:05 PM
Schüle Daniel
Guest
 
Posts: n/a
Default [OT] find the error :)

#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;
}


  #13  
Old March 15th, 2006, 08:05 PM
Schüle Daniel
Guest
 
Posts: n/a
Default [OT] find the error :)

#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;
}

  #14  
Old March 15th, 2006, 08:15 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Rolf Magnus wrote:[color=blue]
> Victor Bazarov wrote:
>
>[color=green]
>>Rolf Magnus wrote:
>>[color=darkred]
>>>Victor Bazarov wrote:
>>>
>>>
>>>
>>>>coolsero@gmx.de 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?[/color]
>>
>>Read my post. And others' posts that say the same thing. That's the
>>rule I am referring to.[/color]
>
>
> 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. [...][/color]

Yes, but it's a safe[r] start [than x = x++ * x++].
[color=blue][color=green]
>>If you need an international law that says what I said, there isn't any.[/color]
>
>
> No, but maybe a hint in the FAQ or somesuch would be useful.[/color]

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

V
--
Please remove capital As from my address when replying by mail
  #15  
Old March 15th, 2006, 09:05 PM
REH
Guest
 
Posts: n/a
Default Re: find the error :)


Schüle Daniel wrote:[color=blue]
> #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;
> }[/color]

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

REH

  #16  
Old March 15th, 2006, 09:45 PM
Julián Albo
Guest
 
Posts: n/a
Default Re: Druck Position eines Textes ?

Victor Bazarov wrote:
[color=blue][color=green]
>> No, but maybe a hint in the FAQ or somesuch would be useful.[/color]
> Then contact the maintainer of the FAQ. I hope you don't need help
> with that.[/color]

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

--
Salu2
  #17  
Old March 16th, 2006, 06:05 PM
Maett
Guest
 
Posts: n/a
Default Re: find the error :)

REH <spamjunk@stny.rr.com>:[color=blue]
>
> Schüle Daniel wrote:[color=green]
>> #include <stdio.h>
>>
>> #define void nix[/color][/color]

#define nix void
[color=blue][color=green]
>> #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;
>> }[/color]
>
> rand does not take any arguments.
> there is no prototype for sleep.
>
> REH
>
>[/color]

Maett
  #18  
Old March 17th, 2006, 04:35 PM
Diego Martins
Guest
 
Posts: n/a
Default Re: find the error :)

why are you trolling about this? :(

  #19  
Old March 17th, 2006, 05:55 PM
Puppet_Sock
Guest
 
Posts: n/a
Default Re: find the error :)

Schüle Daniel wrote:[color=blue]
> #include <stdio.h>
>
> #define void nix[/color]

This defines void as nix. But nix is never defined.
[color=blue]
> #define inache default
> #define esli if
> #define nikogo rand(2)[/color]

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.
[color=blue]
> #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)[/color]

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

No prototype for sleep.
[color=blue]
> 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;
> }[/color]

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.