GTKmm beginner



Hello,
I want to make a custom widget containing several standard widgets to use it
as a tab for notebook.
I figured out i need to subclass Gtk::Container or Gtk::Bin and put my
controls inside.

My code is:
QueryTab.h
#ifndef DB2CLIENT_QUERY_TAB_H__
#define DB2CLIENT_QUERY_TAB_H__

#include "stdafx.h"

class QueryTab :
	public Gtk::Container
{
public:
	QueryTab(void);
	virtual ~QueryTab(void);
};

#endif

QueryTab.cpp
#include "StdAfx.h"
#include "QueryTab.h"

QueryTab::QueryTab(void)
{
	set_flags(Gtk::NO_WINDOW);
	set_redraw_on_allocate(false);
}

QueryTab::~QueryTab(void)
{
}

stdafx.h
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#ifndef DB2CLIENT_STDAFX__
#define DB2CLIENT_STDAFX__

#include "targetver.h"

#include <iostream>

#include <gtkmm.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/button.h>
#include <gtkmm/widget.h>
#include <gtkmm/label.h>
#include <gtkmm/container.h>

#include <sqlcli1.h>

#endif

// TODO: reference additional headers your program requires here

I use MSVC2008 compiler and i get following errors:
Error	1	error C2248: 'Glib::ObjectBase::ObjectBase' : cannot access private
member declared in class 'Glib::ObjectBase'	d:\documents\visual studio
2008\projects\db2client\db2client\querytab.h	12	db2client
Error	2	error C2248: 'Gtk::Container::Container' : cannot access private
member declared in class 'Gtk::Container'	d:\documents\visual studio
2008\projects\db2client\db2client\querytab.h	12	db2client

What is wrong?

Thanks in advance
Adam Kovari
-- 
View this message in context: http://www.nabble.com/GTKmm-beginner-tp22120395p22120395.html
Sent from the Gtkmm mailing list archive at Nabble.com.



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