The function is called CreateFont(), not something for the faint at heart!
[php]
HFONT CreateFont(
int nHeight, // logical height of font
int nWidth, // logical average character width
int nEscapement, // angle of escapement
int nOrientation, // base-line orientation angle
int fnWeight, // font weight
DWORD fdwItalic, // italic attribute flag
DWORD fdwUnderline, // underline attribute flag
DWORD fdwStrikeOut, // strikeout attribute flag
DWORD fdwCharSet, // character set identifier
DWORD fdwOutputPrecision, // output precision
DWORD fdwClipPrecision, // clipping precision
DWORD fdwQuality, // output quality
DWORD fdwPitchAndFamily, // pitch and family
LPCTSTR lpszFace // pointer to typeface name string
);
[/php]
vegaseat
DaniWeb's Hypocrite
5,986 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
I dont think this function will work for console apps. The program Im writing runs in DOS window.
There is a code snippet on DaniWeb called "Add WinBGI Graphics to your Console" at: http://www.daniweb.com/code/snippet176.html
check the lines ...
[php]
setcolor(YELLOW);
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2); // 2 = size
outtextxy(20, 320, "Press any key ... ");
getch(); // wait
[/php]
Maybe you can modify these to suit your needs.
vegaseat
DaniWeb's Hypocrite
5,986 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
heres a function that I wrote, but it seems to have no effect.
void consoleResize(unsigned int x, unsigned int y)
{
COORD coord;
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
coord.X = x;
coord.Y = y;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
Check under InvalidateRect() to force an update your your screen.
vegaseat
DaniWeb's Hypocrite
5,986 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Hi,
I wonder if you can go to your user community and just change the DOC in the README to change the environment defined by the icon. Right-click on the icon, change the properties to this x that, and then save. Yes, it is a user step. Or, maybe you alter your installer to do the configuration for you!
Christian
kc0arf
Posting Virtuoso
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57