> -----Original Message----- > From: Dimitris Sideris > To: Faine, Valeri > Sent: 3/5/02 9:34 AM > Subject: Re: [ROOT] Canvas question > > Hi Valeri, > > I did what you said and now everything works. The problem was that I had > created a wrap class in the past to avoid the conflicts TCanvas was > causing > in conjunction to MFC. It turns out that using TWin32Canvas.h straight > forwardly in conjunction with stdafx.h works fine. To put this in > context in > my previous version of the code, to avoid conflicts I had created a wrap > class without stdafx.h, but using afx.h instead. There is no need for > this > manipulation anymore. I don't have any insite of why this is, but it > seems > true. > > Thanks for the help > > Dimitris > > ----- Original Message ----- > From: "Faine, Valeri" <fine@bnl.gov> > To: "'Dimitris Sideris '" <d.sideris@ic.ac.uk> > Sent: Monday, March 04, 2002 7:34 PM > Subject: RE: [ROOT] Canvas question > > > > Yes this is true you should not use "windows.h" for MFC-based > > application. > > > > But ... does your application really use MFC ? > > > > Are you sure it was very the linker message? > > You may escape the clush by compiling the function I had posted > > separately providing its prototype in your MFC code. > > > > Cheers, Valeri > > > > -----Original Message----- > > From: Dimitris Sideris > > To: Faine, Valeri > > Sent: 3/4/02 7:15 AM > > Subject: Re: [ROOT] Canvas question > > > > Hi Valeri, > > > > actually I've tried to do something simmilar but the problem was that > > when I > > tried to include the TGWin32 classes, I got a linker message that mfc > > applications must not include windows.h. Can I come over this by using > > another version of root? At the moment I use root version 3.02/03. > > > > Thanks > > > > Dimitris > > ----- Original Message ----- > > From: "Faine, Valeri" <fine@bnl.gov> > > To: "'Dimitris Sideris '" <d.sideris@ic.ac.uk>; > > <roottalk@pcroot.cern.ch> > > Sent: Saturday, March 02, 2002 11:47 PM > > Subject: RE: [ROOT] Canvas question > > > > > > > Hello Dimitris > > > > > > Since TCanvasImp has no generic method to do what you want you > should > > apply > > > either WIN32 > > > or Qt API (for Qt version). > > > > > > To change the Window appearance under Windows one may apply > > > > > > LONG SetWindowLong( > > > HWND hWnd, // handle to window > > > int nIndex, // offset of value to set > > > LONG dwNewLong // new value > > > ); > > > > > > > > > or (if you want to change things for all windows at once) > > > > > > DWORD SetClassLong( > > > HWND hWnd, // handle to window > > > int nIndex, // index of value to change > > > LONG dwNewLong // new value > > > ); > > > > > > WIN32 API. You should consult your "Developer Studio help" to choose > > the > > > proper > > > values for "nIndex" and "dwNewLong" > > > > > > With > > > http://www.usatlas.bnl.gov/~fine/QtRoot/QtRoot.html > > > under Windows you can access "Window handle" of the TCanvas > > > http://www.usatlas.bnl.gov/~fine/QtRoot/QtRoot.html#win32 > > > > > > or may use "cross-platform" Qt API: > > > http://www.usatlas.bnl.gov/~fine/QtRoot/QtRoot.html#qt > > > (see: http://doc.trolltech.com/3.0/qt.html#WidgetFlags-enum > > > look for Qt::WStyle_Title, Qt::WStyle_MinMax flags there ) > > > > > > > > > For the current WIN32 API the following function should make the > job: > > > file://______________________________________ > > > HWND GetWindowHandle(TCanvas *c) > > > { > > > HWND hwnd = NULL: > > > if (c) { > > > TCanvasImp *imp = c->GetCanvasImp(); > > > if (imp) { > > > TGWin32Object *win32Obj = ((TWin32Canvas > *)imp)->GetWin32Obj(); > > > if (win32Obj) { > > > hwnd = ((TGWin32WindowsObject *)win32Obj)->GetWindow(); > > > } > > > } > > > } > > > return hwnd; > > > } > > > > > > You may want to protect the casting above with "dynamic_cast" > > > (and provide the include files of course) > > > > > > My best regards, Valeri > > > > > > > > > -----Original Message----- > > > From: Dimitris Sideris > > > To: roottalk@pcroot.cern.ch > > > Sent: 2/28/02 9:43 AM > > > Subject: [ROOT] Canvas question > > > > > > Dear Rooters, > > > > > > I want to remove the titlebar including the close/minimize buttons > > from > > > a canvas window in win 2000. > > > What is the simplest way to do this? > > > > > > Thanks > > > > > > Dimitris Sideris > > > > > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:44 MET