Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Handle Function / Get PICTURE handle (to set it as a print device)

10 posts in Powerscript Last posting was on 2009-10-20 07:19:34.0Z
OSteine Posted on 2009-10-16 10:15:51.0Z
From: OSteine <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Fri, 16 Oct 2009 03:15:51 -0700 (PDT)
Organization: http://groups.google.com
Lines: 10
Message-ID: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com>
NNTP-Posting-Host: 213.161.247.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1255688151 13391 127.0.0.1 (16 Oct 2009 10:15:51 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 10:15:51 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j19g2000yqk.googlegroups.com; posting-host=213.161.247.15; posting-account=htlxdwoAAACpJ9n2ay4GKRiManbkb3rZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!j19g2000yqk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27109
Article PK: 793569

I try to get the handle of a picture to use it as a printing device.

PICTURE p_Print
LONG ll_handle

p_Print = CREATE PICTURE
ll_handle = Handle(p_Print)

.. Now why does Handle() always return 0 here?


Scott Morris Posted on 2009-10-16 12:04:16.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com>
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ad86140$1@forums-1-dub>
Date: 16 Oct 2009 05:04:16 -0700
X-Trace: forums-1-dub 1255694656 10.22.241.152 (16 Oct 2009 05:04:16 -0700)
X-Original-Trace: 16 Oct 2009 05:04:16 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27110
Article PK: 761722


"OSteine" <osteine@gmail.com> wrote in message
news:c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com...
>I try to get the handle of a picture to use it as a printing device.
>
> PICTURE p_Print
> LONG ll_handle
>
> p_Print = CREATE PICTURE
> ll_handle = Handle(p_Print)
>
> .. Now why does Handle() always return 0 here?

Hint: What does isvalid(p_Print) return?


Jeremy Lakeman Posted on 2009-10-16 13:07:36.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Fri, 16 Oct 2009 06:07:36 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <503faebd-cf1a-4c23-8921-b0c00de8ad32@u16g2000pru.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub>
NNTP-Posting-Host: 219.90.186.150
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255698456 17551 127.0.0.1 (16 Oct 2009 13:07:36 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 13:07:36 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: u16g2000pru.googlegroups.com; posting-host=219.90.186.150; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!u16g2000pru.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27112
Article PK: 793564


On Oct 16, 10:04 pm, "Scott Morris" <bo...@bogus.com> wrote:
> "OSteine" <oste...@gmail.com> wrote in message
>
> news:c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com...
>
> >I try to get the handle of a picture to use it as a printing device.
>
> > PICTURE p_Print
> > LONG ll_handle
>
> > p_Print = CREATE PICTURE
> > ll_handle = Handle(p_Print)
>
> > .. Now why does Handle() always return 0 here?
>
> Hint:  What does isvalid(p_Print) return?

That's not a very good hint.
Because only GUI controls (and application objects) have handles.


OSteine Posted on 2009-10-16 13:06:47.0Z
From: OSteine <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Fri, 16 Oct 2009 06:06:47 -0700 (PDT)
Organization: http://groups.google.com
Lines: 28
Message-ID: <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub>
NNTP-Posting-Host: 213.161.247.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255698408 29655 127.0.0.1 (16 Oct 2009 13:06:48 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 13:06:48 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e8g2000yqo.googlegroups.com; posting-host=213.161.247.15; posting-account=htlxdwoAAACpJ9n2ay4GKRiManbkb3rZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!transit3.readnews.com!postnews.google.com!e8g2000yqo.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27111
Article PK: 793572


On 16 Okt, 14:04, "Scott Morris" <bo...@bogus.com> wrote:
> "OSteine" <oste...@gmail.com> wrote in message
>
> news:c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com...
>
> >I try to get the handle of a picture to use it as a printing device.
>
> > PICTURE p_Print
> > LONG ll_handle
>
> > p_Print = CREATE PICTURE
> > ll_handle = Handle(p_Print)
>
> > .. Now why does Handle() always return 0 here?
>
> Hint:  What does isvalid(p_Print) return?

It returns TRUE.
I thought of perhaps the issue could be missing initalising so, I also
tested with a picture control which was added in design. Same result.
Though I'm not sure if I could use the handle as a hDC print device?

I'm currently looking into using 'SendMessage' API call to get a print
device, but I'm having trouble finding any documentation on how this
is done.

Can I use a IMAGE control as a printing device in PowerBuilder?


Scott Morris Posted on 2009-10-16 13:51:42.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com>
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ad87a6e$1@forums-1-dub>
Date: 16 Oct 2009 06:51:42 -0700
X-Trace: forums-1-dub 1255701102 10.22.241.152 (16 Oct 2009 06:51:42 -0700)
X-Original-Trace: 16 Oct 2009 06:51:42 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27114
Article PK: 761724

> It returns TRUE.

My mistake - and Powerbuilder's mistake as well. You cannot create GUI
objects - and IMO create should fail for them but doesn't.

> Can I use a IMAGE control as a printing device in PowerBuilder?

I don't understand what exactly you are trying to accomplish, nor what you
mean by "printing device". It would help if you could describe the goal.
Seems you want to print something, but it is not clear what you want to
print. Are you certain that you need a HDC, and not a window handle?


OSteine Posted on 2009-10-19 06:55:03.0Z
From: OSteine <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Sun, 18 Oct 2009 23:55:03 -0700 (PDT)
Organization: http://groups.google.com
Lines: 20
Message-ID: <2ebde094-cb20-4f80-a5cd-bf6b411e151b@m38g2000yqd.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com> <4ad87a6e$1@forums-1-dub>
NNTP-Posting-Host: 213.161.247.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255935303 26789 127.0.0.1 (19 Oct 2009 06:55:03 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 Oct 2009 06:55:03 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m38g2000yqd.googlegroups.com; posting-host=213.161.247.15; posting-account=htlxdwoAAACpJ9n2ay4GKRiManbkb3rZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!m38g2000yqd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27116
Article PK: 793568


On 16 Okt, 15:51, "Scott Morris" <bo...@bogus.com> wrote:
> > It returns TRUE.
>
> My mistake - and Powerbuilder's mistake as well.  You cannot create GUI
> objects - and IMO create should fail for them but doesn't.
>
> > Can I use a IMAGE control as a printing device in PowerBuilder?
>
> I don't understand what exactly you are trying to accomplish, nor what you
> mean by "printing device".  It would help if you could describe the goal.
> Seems you want to print something, but it is not clear what you want to
> print.  Are you certain that you need a HDC, and not a window handle?

What I am trying to do is to 'print' to an image, to add this in a
print preview function.
So I thought if I could get the handle to the picture control I could
'print' to the image. I've come across this method in .Net but not in
PowerBuilder.


Scott Morris Posted on 2009-10-19 20:07:41.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com> <4ad87a6e$1@forums-1-dub> <2ebde094-cb20-4f80-a5cd-bf6b411e151b@m38g2000yqd.googlegroups.com>
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4adcc70d$1@forums-1-dub>
Date: 19 Oct 2009 13:07:41 -0700
X-Trace: forums-1-dub 1255982861 10.22.241.152 (19 Oct 2009 13:07:41 -0700)
X-Original-Trace: 19 Oct 2009 13:07:41 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27120
Article PK: 793574


>What I am trying to do is to 'print' to an image, to add this in a
>print preview function.
>So I thought if I could get the handle to the picture control I could
>'print' to the image. I've come across this method in .Net but not in
>PowerBuilder.

Sorry but I still do not understand what it is that you are trying to
accomplish. Sounds like it is probably not directly supported in PB. Maybe
someone else can offer suggestions.


OSteine Posted on 2009-10-20 07:19:34.0Z
From: OSteine <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Tue, 20 Oct 2009 00:19:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 18
Message-ID: <7fff7b3b-bcfb-4667-91ed-606f9283025e@g1g2000vbr.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com> <4ad87a6e$1@forums-1-dub> <2ebde094-cb20-4f80-a5cd-bf6b411e151b@m38g2000yqd.googlegroups.com> <4adcc70d$1@forums-1-dub>
NNTP-Posting-Host: 213.161.247.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256023175 9736 127.0.0.1 (20 Oct 2009 07:19:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 20 Oct 2009 07:19:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g1g2000vbr.googlegroups.com; posting-host=213.161.247.15; posting-account=htlxdwoAAACpJ9n2ay4GKRiManbkb3rZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!news-out.readnews.com!transit4.readnews.com!postnews.google.com!g1g2000vbr.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27121
Article PK: 793571


On 19 Okt, 22:07, "Scott Morris" <bo...@bogus.com> wrote:
> >What I am trying to do is to 'print' to an image, to add this in a
> >print preview function.
> >So I thought if I could get the handle to the picture control I could
> >'print' to the image. I've come across this method in .Net but not in
> >PowerBuilder.
>
> Sorry but I still do not understand what it is that you are trying to
> accomplish.  Sounds like it is probably not directly supported in PB.  Maybe
> someone else can offer suggestions.

Instead of sending the PRINT to the printer, I'd like for it to show
on a picture.
Or put in other words: How to create a print preview of the content
being printed (where the preview is a picture control in a window) in
PB.


Jeremy Lakeman Posted on 2009-10-16 13:09:04.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Fri, 16 Oct 2009 06:09:04 -0700 (PDT)
Organization: http://groups.google.com
Lines: 33
Message-ID: <d597825c-bb90-452b-839c-2b5dd663b230@v15g2000prn.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com>
NNTP-Posting-Host: 219.90.186.150
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255698544 30077 127.0.0.1 (16 Oct 2009 13:09:04 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 13:09:04 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v15g2000prn.googlegroups.com; posting-host=219.90.186.150; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!v15g2000prn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27113
Article PK: 793565


On Oct 16, 11:06 pm, OSteine <oste...@gmail.com> wrote:
> On 16 Okt, 14:04, "Scott Morris" <bo...@bogus.com> wrote:
>
> > "OSteine" <oste...@gmail.com> wrote in message
>
> >news:c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com...
>
> > >I try to get the handle of a picture to use it as a printing device.
>
> > > PICTURE p_Print
> > > LONG ll_handle
>
> > > p_Print = CREATE PICTURE
> > > ll_handle = Handle(p_Print)
>
> > > .. Now why does Handle() always return 0 here?
>
> > Hint:  What does isvalid(p_Print) return?
>
> It returns TRUE.
> I thought of perhaps the issue could be missing initalising so, I also
> tested with a picture control which was added in design. Same result.
> Though I'm not sure if I could use the handle as a hDC print device?
>
> I'm currently looking into using 'SendMessage' API call to get a print
> device, but I'm having trouble finding any documentation on how this
> is done.
>
> Can I use a IMAGE control as a printing device in PowerBuilder?

I should have said, a better hint is that GUI controls are opened,
nvo's are created...


OSteine Posted on 2009-10-19 06:56:19.0Z
From: OSteine <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Handle Function / Get PICTURE handle (to set it as a print device)
Date: Sun, 18 Oct 2009 23:56:19 -0700 (PDT)
Organization: http://groups.google.com
Lines: 41
Message-ID: <800c603f-6c20-4254-bac3-ab96d7b2504d@s31g2000yqs.googlegroups.com>
References: <c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com> <4ad86140$1@forums-1-dub> <496fedb0-6c6a-418d-92c6-335798b95793@e8g2000yqo.googlegroups.com> <d597825c-bb90-452b-839c-2b5dd663b230@v15g2000prn.googlegroups.com>
NNTP-Posting-Host: 213.161.247.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255935379 27015 127.0.0.1 (19 Oct 2009 06:56:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 Oct 2009 06:56:19 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s31g2000yqs.googlegroups.com; posting-host=213.161.247.15; posting-account=htlxdwoAAACpJ9n2ay4GKRiManbkb3rZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!s31g2000yqs.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27117
Article PK: 793566


On 16 Okt, 15:09, Jeremy Lakeman <jeremy.lake...@gmail.com> wrote:
> On Oct 16, 11:06 pm, OSteine <oste...@gmail.com> wrote:
>
>
>
> > On 16 Okt, 14:04, "Scott Morris" <bo...@bogus.com> wrote:
>
> > > "OSteine" <oste...@gmail.com> wrote in message
>
> > >news:c992ee61-c3ec-4bde-ac56-9584b0250c55@j19g2000yqk.googlegroups.com...
>
> > > >I try to get the handle of a picture to use it as a printing device.
>
> > > > PICTURE p_Print
> > > > LONG ll_handle
>
> > > > p_Print = CREATE PICTURE
> > > > ll_handle = Handle(p_Print)
>
> > > > .. Now why does Handle() always return 0 here?
>
> > > Hint:  What does isvalid(p_Print) return?
>
> > It returns TRUE.
> > I thought of perhaps the issue could be missing initalising so, I also
> > tested with a picture control which was added in design. Same result.
> > Though I'm not sure if I could use the handle as a hDC print device?
>
> > I'm currently looking into using 'SendMessage' API call to get a print
> > device, but I'm having trouble finding any documentation on how this
> > is done.
>
> > Can I use a IMAGE control as a printing device in PowerBuilder?
>
> I should have said, a better hint is that GUI controls are opened,
> nvo's are created...

A picture control added to a window in design mode, should be an GUI
control, right?
Cause it still returns 0