Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » about dynamic menu and toolbar button Collapse All
Subject Author Date
liu yj Mar 3, 2004 - 10:02 PM

hi


I want to dynamically create , add menu and toolbar button,who can help me,


can u give me a sample?


thanks

Technical Support Mar 4, 2004 - 10:15 AM

Dear Liu,


We described how to allocate a dynamic command in the previous message.



To insert it into the toolbar, you may use the following method:



m_wndToolbar.InsertButton(nPosInsertBefore, nDynamicCommandID );



Your dynamic menu modification code should also work. If not, send us your test project and we will help you.

liu yj Mar 4, 2004 - 11:01 PM

hi,


Thanks for your reply, Now, I can add button in toolbar and menuitem in menbar. But i come with new problem,


firstly I found the button on the toolbar is disable , but the menuitem on menubar is enable, also i found every submenu have a menuitem i added, thougth i only add one. (the project name is MyUIS)


secondly i download prof-uis2.24(trail) version and installed. i use appwizard in vc++ 6.0 create a SDI project, compile is ok, but it cant run. my environment is window2000 vc++ 6.0+sp5(I have downloaded the new ProfUIS224md.dll from this site) (the project name is TestSDI)


The third, I found cant run in debug mode when i use prof-uis2.23


I have send a mail to you, which include the project that have problems. thank you for helping me again


best regards


liuyj 

Technical Support Mar 5, 2004 - 2:38 AM

Dear Liuyj,

We just sent you the MyUIS project by e-mail. It seems to work OK now. Please examine the changes we have made to it.

liu yj Mar 4, 2004 - 11:18 PM

hi, Sorry for the second question. i have got it, the reason is that the language i used is chinese , when i use english that is ok.by the way i want to know the limit about trail version 2.24.


best regards


liuyj 

liu yj Mar 5, 2004 - 2:16 AM

hi, i want to dynamically create menu as follow:


CMenu _menu;


CMenu _menu;
   _menu.CreatePopupMenu();
   _menu.AppendMenu(MF_POPUP,ID_MYADD,"test menu");


 g_CmdManager->UpdateFromMenu(
  pApp->m_pszProfileName,
  _menu
  )


but it cant work , can u help me


best regards


liuyj

Technical Support Mar 5, 2004 - 2:46 AM

Dear Liuyj,

There isn’t enough information in the code snippet you posted. So, we cannot yet help you with it. Please provide us with more details on what you want to do.