15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Creating MS-Office type toolbar in Windows 3.1

SUDHIR@wipsys.stph.net
Friday, August 23, 1996

Environment : MS Windows 3.1, VC++ 1.52C

Hi  all,
    I want to create a toolbar like the one Microsoft Office creates. 
This toolbar is positioned on top of the screen with the icons for 
applications. 
    I have tried to create the toolbar by creating an application 
which is always on top and disabling the menu. But I am unable to 
remove the title bar  and the system menu.
    Is there any better way out? Can anybody help in this. 
    
    Thanks in advance
    sudhir



S. Balachandar -- chandar@wings.xko.dec.com
Monday, August 26, 1996

[Mini-digest: 2 responses]

Hi!,

You can easily remove the title bar and system menu. It all lies in the =
style of the main window!!. See to that the style does'nt contain =
WS_CAPTION(which is for the title bar) and WS_SYSMENU(which is for the =
system menu).

And by the way you have'nt specified whether you are using MFC or =
writing an SDK App.

Regards
Bala

-------------------------------------------------------------------------=
----------------------------------------
S. Balachandar                                e-mail : =
chandar@adca01.enet.dec.com
Software Engineer                             Phone  : 3370445 Ext : 479
Digital Equipment (I) Ltd.,                   Fax    : 3371498
Digital House, 45/14 Tumkur Road,  =20
Yeshwanthpur II Stage,                   =20
Bangalore 560 022.                         =20
-------------------------------------------------------------------------=
----------------------------------------

----------
From: 	SUDHIR@wipsys.stph.net[SMTP:SUDHIR@wipsys.stph.net]
Sent: 	Friday, August 23, 1996 1:54 PM
To: 	mfc-l@netcom.com
Subject: 	Creating MS-Office type toolbar in Windows 3.1

Environment : MS Windows 3.1, VC++ 1.52C

Hi  all,
    I want to create a toolbar like the one Microsoft Office creates.=20
This toolbar is positioned on top of the screen with the icons for=20
applications.=20
    I have tried to create the toolbar by creating an application=20
which is always on top and disabling the menu. But I am unable to=20
remove the title bar  and the system menu.
    Is there any better way out? Can anybody help in this.=20
   =20
    Thanks in advance
    sudhir
-----From: WnDBSoft@aol.com

Try just having an application that creates the toolbar in InitInstance( ),
like this:

BOOL CMyApp::InitInstance( )
{
      //  m_wndToolBar below is a variable of the app.
      if (!m_wndToolBar.Create(CWnd::GetDesktopWindow( ), /*other Create( )
parameters*/) || !m_wndToolBar.LoadBitmap(IDB_MYTOOLBARBITMAP) ||
          !m_wndToolBar.SetButtons(buttons /*an array of buttons declared at
start of MYAPP.CPP*/, sizeof(buttons)/sizeof(UINT)))
       {
                return FALSE; // unable to start or show toolbar
       }
       
       //...
       //...
       //...
       // any other processing you mught like to add...
       //...
       //...
       //...
       return TRUE;
}

and that's it!  No more application functions are necessary, except of
course, WM_COMMAND handlers for the buttons.

Good Luck!!

Brian Hart
WnDBSoft@gnn.com
http://members.aol.com/WnDBSoft/wndbsoft.htm

P.S. Download Windows Manager 5.0, an MFC program which helps you run your
computer and organize your applications, from
!
Also, it's WINMAN5.EXE on America Online.





| Вернуться в корень Архива |