Thread: changing font size

  1. #1
    Registered User
    Join Date
    Apr 2006

    changing font size

    How to change font size in dos window by using 'windows.h'?

  2. #2
    Registered User
    Join Date
    Mar 2006
    Don't think you can there, pardner. There's only so many things a console window can do. Write a Windows app instead.
    #include <stdio.h>
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  3. #3
    Registered User
    Join Date
    Aug 2005
    call GetConsoleWindow() to get the HWND then use normal GDI functions to get the font into a FONT structure and change its size. I haven't tried it myself but since the console window is just another GUI window it should work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  2. How to Change Text File Font Size
    By space in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2006, 11:42 PM
  3. Trouble with DMA Segmentation Faults
    By firestorm717 in forum C Programming
    Replies: 2
    Last Post: 05-07-2006, 09:20 PM
  4. An exercise in optimization
    By Prelude in forum Contests Board
    Replies: 10
    Last Post: 04-29-2005, 03:06 PM
  5. Increasing Font Size when printing to the screen
    By array in forum C++ Programming
    Replies: 5
    Last Post: 04-18-2004, 01:30 PM