Click here to Skip to main content
15,891,033 members
Home / Discussions / Mobile
   

Mobile

 
GeneralNew Language for creating Mobile Applications Pin
smitakiran15-Jun-04 22:33
smitakiran15-Jun-04 22:33 
Generalmain menu & toolbar Pin
khchan15-Jun-04 22:30
khchan15-Jun-04 22:30 
GeneralWriting new language for PPC ! Pin
Hadi Rezaee15-Jun-04 11:40
Hadi Rezaee15-Jun-04 11:40 
GeneralRe: Writing new language for PPC ! Pin
João Paulo Figueira15-Jun-04 22:00
professionalJoão Paulo Figueira15-Jun-04 22:00 
GeneralRe: Writing new language for PPC ! Pin
Hadi Rezaee17-Jun-04 6:38
Hadi Rezaee17-Jun-04 6:38 
GeneralMobile Application Pin
Masood Lodhi15-Jun-04 10:21
Masood Lodhi15-Jun-04 10:21 
GeneralappDoman and dynamic loading in .net CF Pin
ppp00115-Jun-04 8:17
ppp00115-Jun-04 8:17 
GeneralZone Colour Filling - Drawing Pin
coding-nastypcs15-Jun-04 2:01
coding-nastypcs15-Jun-04 2:01 
Hi all,

I've run into a little problem, I'm drawing a zone on a CDC and would like to fill the zone in with a colour, most likely black.

I collect the points and store them in a CArray of CPoints and draw the zone like...

<br />
typedef CArray<CPoint, CPoint&> CPointList;<br />
CPointList Points;<br />
<br />
// --- stuff<br />
<br />
int numPoints = Points.GetSize();<br />
<br />
if(numPoints>1)<br />
{			<br />
    for(int i=0;i<numPoints-1;i++)<br />
    {<br />
        pDC->MoveTo(Points.GetAt(i).x,   Points.GetAt(i).y);<br />
        pDC->LineTo(Points.GetAt(i+1).x, Points.GetAt(i+1).y); <br />
    }<br />
}<br />


This just draws the zone, I did try using Polyline() and PolylineTo() but the starting point is always coming from the side of the display instead of the first point in the array, the code I used with the Poly methods was something like...

<br />
int numPoints = Points.GetSize();<br />
<br />
if(numPoints>1)<br />
{			<br />
    CPoint* pts = new CPoint[numPoints];<br />
<br />
    for(int i=0;i<numPoints-1;i++)<br />
    {<br />
        pts[i].x = Points.GetAt(i).x;<br />
        pts[i].y = Points.GetAt(i).y;<br />
    }<br />
<br />
    pDC->MoveTo(pts[0].x, pts[0].y);<br />
    pDC->PolylineTo(pts, numPoints);<br />
    //pDC->Polyline(pts, numPoints);<br />
<br />
    delete [] pts;<br />
}<br />



and even with PolyPolygon() i got very strange drawings using the following code

<br />
int numPoints = Points.GetSize();<br />
<br />
if(numPoints>1)<br />
{			<br />
    CPoint* pts = new CPoint[numPoints];<br />
    int tmp[2];<br />
<br />
    tmp[0] = numPoints;<br />
    tmp[1] = numPoints;<br />
<br />
    for(int i=0;i<numPoints-1;i++)<br />
    {<br />
        pts[i].x = Points.GetAt(i).x;<br />
        pts[i].y = Points.GetAt(i).y;<br />
    }<br />
    <br />
    //pDC->MoveTo(pts[0].x, pts[0].y); //  even tried wit this<br />
    pDC->PolyPolygon(pts, tmp, 2);<br />
<br />
    delete [] pts;<br />
}<br />



If anyone has some input which could help I'd be very intrested to hear it. Also I'm working with the PocketPC SDK so things like FloodFill() cant be used ;(

Regards
ar
GeneralRe: Zone Colour Filling - Drawing Pin
João Paulo Figueira15-Jun-04 11:30
professionalJoão Paulo Figueira15-Jun-04 11:30 
GeneralRe: Zone Colour Filling - Drawing Pin
coding-nastypcs16-Jun-04 2:20
coding-nastypcs16-Jun-04 2:20 
Generalserios help needed! Pin
imzy15-Jun-04 0:59
imzy15-Jun-04 0:59 
GeneralVirtual Com Port (C++) Pin
_Tom_14-Jun-04 23:25
_Tom_14-Jun-04 23:25 
Generaldumb question Pin
Anonymous14-Jun-04 15:13
Anonymous14-Jun-04 15:13 
GeneralRe: dumb question Pin
axid3j1al14-Jun-04 17:04
axid3j1al14-Jun-04 17:04 
QuestionHw do I setup a direct pc2pc connection on COM port ?? Pin
glweid14-Jun-04 5:08
glweid14-Jun-04 5:08 
GeneralProblem when using Cursor type and locktype in OLEDB/SQL Server CE Pin
AKSIVAKUMAR14-Jun-04 2:40
AKSIVAKUMAR14-Jun-04 2:40 
GeneralRe: Problem when using Cursor type and locktype in OLEDB/SQL Server CE Pin
João Paulo Figueira14-Jun-04 23:01
professionalJoão Paulo Figueira14-Jun-04 23:01 
GeneralPPC 2003 Emulator &amp; ActiveSync Pin
Hadi Rezaee14-Jun-04 0:40
Hadi Rezaee14-Jun-04 0:40 
GeneralRe: PPC 2003 Emulator &amp; ActiveSync Pin
João Paulo Figueira14-Jun-04 22:59
professionalJoão Paulo Figueira14-Jun-04 22:59 
GeneralRe: PPC 2003 Emulator &amp; ActiveSync Pin
Hadi Rezaee15-Jun-04 2:45
Hadi Rezaee15-Jun-04 2:45 
GeneralRe: PPC 2003 Emulator &amp; ActiveSync Pin
ting66816-Jun-04 0:35
ting66816-Jun-04 0:35 
Generalis it easy to migrate from 8bit controllers to 16bit and 16 to 32 bit and so on Pin
NewtonOfComputers13-Jun-04 21:23
NewtonOfComputers13-Jun-04 21:23 
GeneralCross platform GUI Pin
NewtonOfComputers13-Jun-04 21:19
NewtonOfComputers13-Jun-04 21:19 
GeneralRe: Cross platform GUI Pin
Henry miller15-Jun-04 8:41
Henry miller15-Jun-04 8:41 
GeneralOnoard C# programming Pin
Vitaliy Pronkin12-Jun-04 9:01
Vitaliy Pronkin12-Jun-04 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.