Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menubar and Toolbar

Status
Not open for further replies.

SteveAlex

Programmer
May 9, 2000
1
0
0
BR
<FONT FACE=monospace>How can I create for my program a <b>Menubar</b> and <b>Toolbar</b>, similar to of the <b>Visual C++ 6.0?</b><br>Thank you...</font>
 
You need to create a project in VC++ .Then : <br><br>INsert -&gt; Resource-&gt; Menu/Toolbar .<br><br>Whatever you want.<br><br>Does this answer your question ?<br>Thanx<br>Siddhartha Singh<br><A HREF="mailto:ssingh@aztecsoft.com">ssingh@aztecsoft.com</A> <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
 
To add a MenuBar to your application you must add a menubar resource to your resource file (example.rc)<br>Something like this:<br>// begin example.rc<br>#include &lt;windows.h&gt;<br>#include &quot;example.h&quot;<br><br>MYMENU MENU<br>{<br> POPUP &quot;&One&quot;<br> {<br> MENUITEM &quot;&Alpha&quot;, IDM_ALPHA<br> }<br> MENUITEM &quot;&Help&quot;, IDM_HELP<br>}<br><br>MYMENU ACCELERATORS<br>{<br> VK_F2, IDM_ALPHA, VIRTKEY<br> VK_F1, IDM_HELP, VIRTKEY<br>}<br>//end example.rc<br><br>Also you must declare your identificators in your .h file, in this case example.h:<br>// begin example.h<br>#define IDM_ALPHA 100<br>#define IDM_HELP 101<br>// end example.h<br><br>After this call your menu from your program using:<br><br>wcl.lpszMenuName = &quot;MYMENU&quot;;<br>hAccel= LoadAccelerators(hThisInst, &quot;MYMENU&quot;);<br><br>where wcl is your main window class.<br>Good luck!<br>
 
Attention in the question!<br>&quot;Similar to of the Visual C++ 6.0&quot;.<br>So, MenuBar dockable, etc...<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top