Article View: borland.public.cppbuilder.nativeapi
Article #12102Re: DPtoLP
From: M. Finch
Date: Sat, 27 Dec 2003 07:31
Date: Sat, 27 Dec 2003 07:31
50 lines
2819 bytes
2819 bytes
Thanks for the replys....
Ed....
I had tried copying the SetMapMode, SetWindowExtEx, and SetViewportExtEx
into my WM_Mousemove case to see if I had to do that, so it was a stupid
attempt to correct a "simple" problem!!!
It took me all night staring at my code and thinking of what you guys were
saying until I realized my stupidity!!! I had forgotten to "re-open" the
device context (I guess I don't know what the term to use here might be...)
I just enclosed my mousemove code with
hDC = BeginPaint(hWnd, &ps);
.
. (mousemove code here)
.
EndPaint(hWnd, &ps);
I guess I don't know if this is "exactly" correct, but it sure
works.......PERFECTLY!!!
Thanks, as usual, for getting my head back on track!!!!
The code I'm working on draws the world map, allows zooming and
repositioning the center by mouse click. A status bar displays the current
position (in "World Lon/Lat coordinates). I'm pretty close to nailing it
except for centering the map, which isn't quite perfect yet.
Its written in C/C++ using no MFC or OWL. I've been using both C++Builder 5
and Borland C++ 5.02 (easier access to help files!!)
I don't have any particular goal in mind, just learning how to master the
graphics in Windows.
I'll be posting the code somewhere soon if anyone is interested. I just
don't know where to post it.
Thank YOU!!!!
>
> Just guessing since you don't show what x/ywin and widht/height are,
> but I suspect that
> > SetViewportExtEx(hDC,width,-height,NULL);
> is wrong.
>
>
> - - -
> p.s. Sorry to have emailed this again, finally know what I did to do
> that.
>
Technical Details
Message-ID:
<3fed3564@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet-quince!easynet.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3fec8cda$1@newsgroups.borland.com> <vo4quvguurahqq592e42bl43189uo1ig8i@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,51ae0f0f4731a002 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-26 23:37:10 PST Reply-To: "M. Finch" <mlfsup@nospam.comcast.net> From: "M. Finch" <mlfsup@nospam.comcast.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fec8cda$1@newsgroups.borland.com> <vo4quvguurahqq592e42bl43189uo1ig8i@4ax.com> Subject: Re: DPtoLP Date: Sat, 27 Dec 2003 02:31:55 -0500 Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 68.51.77.211 Message-ID: <3fed3564@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1072510308 68.51.77.211 (26 Dec 2003 23:31:48 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet-quince!easynet.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail