Jump to content



Photo
- - - - -

Programming With Classpad


  • Please log in to reply
4 replies to this topic

#1 fiberoptik

fiberoptik

    Casio Addict

  • Members
  • PipPipPip
  • 70 posts

  • Calculators:
    ClassPad 300, FX-850P, FX-7700G, Voyage 200

Posted 29 October 2004 - 04:18 PM

How can i write a program for CP in my PC, and then copy that program to my CP ?


Thanks

#2 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 29 October 2004 - 04:30 PM

use the classpad manager which came with your CP, you can write the program in there then save and transfer it to the CP. ;)

#3 fiberoptik

fiberoptik

    Casio Addict

  • Members
  • PipPipPip
  • 70 posts

  • Calculators:
    ClassPad 300, FX-850P, FX-7700G, Voyage 200

Posted 29 October 2004 - 04:55 PM

Thanks for your help

#4 Guest_GehennanArchmage_*

Guest_GehennanArchmage_*
  • Guests

Posted 22 May 2005 - 09:30 PM

Thanks for your help

<{POST_SNAPBACK}>


Hello I am trying to write a program and get it to display a number. The manual says to cast the CP_CHAR to a PegChar but how is that done? I can find nothing, and am unsure were to look? Heres want I have ....


CP_CHAR buffer[15];
Cal_Random(1,&low,&hi,&number);

CP_Norm_OBC(&number, buffer, IM_MODE_NORM1);
temp = (PEGCHAR)&buffer;

PegPoint pp = { 10, 10 };
PegColor pegColor = BLACK;
DrawText( pp, buffer, pegColor, PegTextThing::GetBasicFont());

Any help?

#5 SoftCalc

SoftCalc

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 406 posts
  • Location:Portland, OR USA

  • Calculators:
    ClassPad 300 , AFX 2.0, HP-48/49/50, TI-89/92/Voyager, HP Expander, etc...

Posted 24 May 2005 - 03:03 PM

Hello I am trying to write a program and get it to display a number.  The manual says to cast the CP_CHAR to a PegChar but how is that done?
...<snip>...
Any help?

<{POST_SNAPBACK}>

You are programming in C++ using the SDK. If you want to be sure to get a reply you should post this type of question on the
SDK Forum. ;)
An easier way to do this is...

       Cal_Random(1,&low,&hi,&number);
        // I use a CPString. It does all the work for me :)
        CPString num_string(number);

        PegPoint pp = { 10, 10 };
        PegColor pegColor = BLACK;
        PegFont *font = PegTextThing::GetBasicFont();

//      NOTE: The rectangle that you are about to draw info also
//      needs to be invalidated first. You might have alreadt done
//      this so you don't have to worry about it here. For example,
//      you can call Invalidate() without and arguments to invalidate
//      the entire screen before drawing. If you haven't invalidated
//      the screen and you want an optimized draw you can invalidate
//      just the area you are about to draw as follows...
//
//      int w = TextWidth(num_string,font);
//      int h = TextHeight(num_string,font);
//      CPRect rect(pp.x, pp.y, pp.x+w, pp.y+h);
//      Invalidate(rect);

        DrawText( pp, num_string, pegColor, font);
Something else you need to be aware of. Your draw operations need to be nested between BeginDraw() and EndDraw() calls.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users