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: //______________________________________ 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:43 MET