setting background and foreground colors



I got this particular piece of code to compile but it doesn’t change the colors. Any ideas ?

 

Randy Seedle

 

  Glib::RefPtr<Gdk::Window> win = viewer->get_root_window();

  Glib::RefPtr<Gdk::GC> some_gc = Gdk::GC::create(win);

  GdkColor my_blue;

  GdkColor my_gray;

 

  my_gray.red = 0xc900;

  my_gray.green = 0xca00;

  my_gray.blue = 0xc800;

 

  my_blue.red = 0x0000;

  my_blue.green = 0x7200;

  my_blue.blue = 0xc800;

 

  gtk_widget_modify_bg( GTK_WIDGET(&win), GTK_STATE_NORMAL, &my_blue );

  gtk_widget_modify_fg( GTK_WIDGET(&win), GTK_STATE_NORMAL, &my_gray );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]