Posts Tagged ‘code’
Just testing code
ImageFix::ImageFix()
{
GdiplusStartupInput input;
GdiplusStartup(&m_token, &input, NULL);
// Comment
UINT size;
UINT numEncoders;
GetImageEncodersSize(&numEncoders, &size);
ImageCodecInfo *encoders = (ImageCodecInfo *)malloc(size);
GetImageEncoders(numEncoders, size, encoders);
for (UINT i = 0; i < numEncoders; i++)
{
ImageCodecInfo encoder = encoders[i];
m_aEncoders.Add(encoder);
if (encoder.FormatID == ImageFormatPNG)
{
m_defaultEncoder = encoder;
}
}
free(encoders);
}
Wow! This is great!
Memo is an advanced plain text editor for common programming languages. I made this program, because I want to modify some code in Delphi, Cpp or C (can be anything else). Using a program like CppBuilder is OK, but those programs are very heavy and not handy – of course it is working so slow. I do not want to launch a big program for modifying some part of the source code. I wanted a simple – and handy program for viewing, checking and modifying some codes. And now, you can compile your source file with MEMO.
Features
With Memo, the users are able to:
- load and modify common programing code
- syntax highlighting for common programming languages such as Pascal, Cpp, PHP, Perl, Python
- use spell checker
- pick up C++ templates (C++Builder like templates) and Object Pascal templates (Delphi like templates) – Press Ctrl + J to get these stuff
- Cut/Copy/Paste operations
- drag and drop
- unlimitted Undo / Redo (depends on your computer memory)
- convert characters (lowercase to uppercase or uppercase to lowercase)
- save selected block as a file
- insert a plain file into the chosen point
- select block (colum mode)
- read and save PC, Unix and Mac file formats (default is PC format)
- easy access prompt
- compile and see compiler output
and several more..
This is nothing but testing code.
public void paint (Graphics g) {
int p,t,a,k;
long go;
int to=0;
long lk=0;grBuffer.setColor(Color.black);
grBuffer.fillRect (0,0,width,height);
grBuffer.setColor (Color.white);
grBuffer.drawRect (0,0,width,height);
//( | | | | | | )
for (p=0;p<8;p++) grBuffer.drawLine (p*(width/8),0,p*(width/8),30);for (p=7;p>=0;p--) {
if (deci[p]==workn[p]) {
grBuffer.drawString (""+deci[p],4+((7-p)*(width/8)),24);
}
else {
grBuffer.drawString (""+workn[p],4+((7-p)*(width/8)),rott[p]);
grBuffer.drawString (""+(workn[p]+1),4+((7-p)*(width/8)),rott[p]+30);
}
}
Wow! Impressive!