Updating the user interface in a dialog box

I have a main window which has a menu command which creates a dialog
box.The dialog box has another menu of its own and a toolbar with
corresponding command IDs. The problem is that the program doesnt
enter the OnUpdateCmd() fn only, though the OnCmd() fns work fine.

    And can anyone tell me how to check the menu item when the
corresponding toolbar button is clicked, and to push the toolbar
button when the menu item is selected. I have tried using
pCmdUI->SetCheck() fn as well.PLZ help.
0
vivomagic (2)
6/4/2004 5:16:30 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
388 Views

Similar Articles

[PageSpeed] 4

"Vivek" <vivomagic@yahoo.com> wrote in message
news:b790e5d4.0406032116.7caa1ea0@posting.google.com...
> I have a main window which has a menu command which creates a dialog
> box.The dialog box has another menu of its own and a toolbar with
> corresponding command IDs. The problem is that the program doesnt
> enter the OnUpdateCmd() fn only, though the OnCmd() fns work fine.

I am not sure if I follow this completely. OnUpdateCommandUI will not be
called for a dialog. This works only for CFrameWnd derived objects. Take a
look at Codeguru for alternate suggestions on how to do this in a dialog.

>
>     And can anyone tell me how to check the menu item when the
> corresponding toolbar button is clicked, and to push the toolbar
> button when the menu item is selected. I have tried using
> pCmdUI->SetCheck() fn as well.PLZ help.

If your menu item and toolbar button have the same ID, SetCheck will work
automatically for both. This requires that toolbar and menu item be on a
CFrameWnd derived object(it can work on a dialog as well, but you need to do
the work).

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


0
ajaykalra (6842)
6/5/2004 1:14:20 PM
Reply:

Similar Artilces:

minimising a dialog
Hi, I want to minimise my dialog, but i've removed the minimize / maximise buttons. I'm going to use one of my own buttons, but I don't know how to call the minimisation. I've removed the exit button, but have created my own one instead. However, one draw back of removing the title bar etc is that in the system tray thing (not sure what it's called) at the bottom middle of my screen, with most applications it shows the name, and then a right click will give the optinos of closing, maximising etc. Anyway, these are now not there. How do I fix this? Any help much appreciat...

Too many problems while updating information online
Several of my accounts are unable to update information online using MS Money 2007 Deluxe - ING Direct - Bestbuy Card (HSBC) - MBNA - Bank of America This is frustrating!! Anyone else with the same problems? Just keep trying, eventually it will work. If you're in a bind, download the QIF or OFX files from the institutions web sites -- B of A works better that way anyway :) Paul McKenna <Paul McKenna@discussions.microsoft.com> wrote: >Several of my accounts are unable to update information online using MS Money >2007 Deluxe > >- ING Direct >- Bestbuy Card (HSBC...

I have a red pencil box
It's red and holds pencils. ...

Windows update site problems
So whats happening with the windows update site ?I keep getting a message telling me there is a problem with the web page (am trying to update new installation of XP Home),is it me or the site,and when will it be sorted out? -- Be happy,Strat4axe "stat4axe" <strat4axe@hotmail.com(donotspam)> wrote in message news:36618CFD-EF82-4F82-A7C3-90CF2DDCCEA5@microsoft.com... > So whats happening with the windows update site ?I keep getting a message > telling me there is a problem with the web page (am trying to update new > installation of XP Home),is it me o...

Updating Boolean Field with onChange
I am having difficulty with setting a value of a new boolean field using the OnChange scripting against a picklist. If anyone has some sample code / formatting information that I can use it would be greatly appreciated. Also, I also need to know if it is possible to stop the default value for the Revenue (isrevenuesystemcalculated) field on the opportunity form being set to "Yes" when the "Convert Lead" function is used. We can set the default value to "No" for user created Opportunities but when Convert Lead is used it seems to ignore the default value. Again, a...

RE: Use that security update
--dedtgpho Content-Type: multipart/related; boundary="yzkfzsfqtv"; type="multipart/alternative" --yzkfzsfqtv Content-Type: multipart/alternative; boundary="qeviqcxczwaquy" --qeviqcxczwaquy Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Consumer this is the latest version of security update, the "October 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three newly discovered vulnerabilities. Install now to hel...

Non-modal dialog pParent initialization (and warning C4355)
I have read several posts about "warning C4355: 'this' : used in base member initializer list", and I understand about the object of 'this' not being fully initialized, but that it is common 'safe' practice to use this method to only save a pointer for future use.. OK, my question is; What is the proper or best way to initialize a non-modal dialog? I have used two methods: 1.) CFooDlg::CFooDlg(CWnd* pParent /*=NULL*/) : CDialog(IDD, pParent) { // pParent is not set here, See Create pCV=NULL; } BOOL CFooDlg::Create(CWnd * pParent) { pCV=(CMyBar ...

Outlook 2003 Folder & Favorite-folder synch/update problems
I've been using Outlook since 1998 and I make my living at software support, so I'm usually hard to stump, but I'm sucking wind on this one. The problems below all started on the remote Outlook copy, so I have to imagine they're connected to the remote setup and OST files. But I've been through the settings and tried to re-synch, cleared the folder store and recreated it, etc., and nothing seems to correct the problems. Can anyone suggest a systematic way to diagnose and fix what's happening? Here's the story: I'm running Outlook 2003 (all current patches: ...

Alert user to check the filed when it is final
Hi, I want to create an alert to check the Final( checkbox ) field, if date_issued is enter. if date_issued is null then do nothing, In what even I have to code this and how? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1 mls via AccessMonster.com wrote: >Hi, I want to create an alert to check the Final( checkbox ) field, if >date_issued is enter. >if date_issued is null then do nothing, In what even I have to code this and >how? Based on just that one requirement, you can use the date text b...

Inbox and unread box
What's the purpose of having an inbox and an unread box in my outlook 2003. They both read the same number of messages. Is it a duplicate? With Outlook xp, it would simply show a number in black, to let me know the number of unopened messages. Now, there seems to be a separate folder entitled "unread" and it has the exact same number of email messages as my inbox ... all of time, and has always displayed the exact same number since I installed it. Is anyone able to explain this? I dont' understand it. Thanks in advance. Diana Definitely not a duplicate; it's a S...

Dialog displayed
Hi I'm creating a dialog and calling it with domodal(). Is there a message handler or something insode my dialogclass that is called after the dialog is displayed? Thanks Urban Yes & No. Take a look at the OnInitDialog() message handler. OnInitDialog() gets called before the dialog is displayed. However you can post a user-defined message to yourself from the OnInitDialog() handler, and handle things that you want to do after the dialog is displayed. -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "Urban Stadler" <mail@ustadler....

How to handle abnormal user disconnection condition from server?
I use MFC Visual C++ 4.2. I developed a simple network application to send message inter-clients and the number of clients also only a few persons ( about less than 10 persons ). I have succeeded in establishing server-client and client-server connection, sending and receiving messages from client. Now my problem are: 1. I need to send a message from a client to other client. How to know that the message I sent will be received by the correct user intended, not missed to other user? 2. How to handle the condition of unexpected user disconnection from server? E.g. : the user worksta...

Multiple user names at one bank or brokerage
I have 3 accounts at one bank. I have 3 corresponding accounts set up in MS Money 2007. One of them is setup for online banking while the other two are not. I now want to set the other two up for online banking but I can't find a way to specify the unique login info for each of the other two accounts. ...

viewing a user's email account
I have been charged with reviewing a user's email activity / mailbox for a possible impropriety. Is there a way to do this from exchange, or better yet what is the best way to accomplish this steathfuly? On Mon, 23 Oct 2006 18:20:02 -0700, Rossel1 <Rossel1@discussions.microsoft.com> wrote: >I have been charged with reviewing a user's email activity / mailbox for a >possible impropriety. Is there a way to do this from exchange, or better yet >what is the best way to accomplish this steathfuly? I really hope that the users' employment contract provides for this ...

getting the error when updating file xls file.
Hi. We are using exchange 2003 server and office XP but know we start to Upgrade our office to office 2003 Know we are face problem. When our user try to make changes to file in public folder there can not make the changes it say “file is read only” but that user can make the changes or edit that same file from the P.C were office XP is installed. Do I have to install some patch if yes can you please send that patch because in trying from last two day and I can not find it. Note: If possible can you reply on parag.lopes@madinatjumeirah.com Just a guess... Are you s...

Comments entered on Task Updates to Manager: Where does it get sto
There is a checkbox option on the My Tasks page for team members to select and send comments about task updates to their managers. Anyone know where these task comments can be reviewed other than when the PM opens it up to approve? It does not seem to be retained anywhere like the Notes get retained. Hi Kahuna, PM can see the comments with Approvals -> Task Updates -> Go To -> Applied Requests and Errors, clicking on the task name. The approval history is listed there including comments. A team member can see them with clicking in the task name in 'My Tasks&#...

switch users without closing program
Hi, Is there a way to switch profiles without closing Outlook 2002? Thanks, Duane ...

Text box jumps to left of page
Word 2004 (I am relatively new to Word and am delighted to find a forum specifically for the Mac version. There are a number of unresolved, niggling issues I can live however they slow the workflow. I am eager to learn.) In the recent past, I manually converted 12,000+ recipes from WordPerfect 7 to Word. Since Word 2004 does not have a filter for the old files, the conversion was done on the Windows side of my Mac in Word2003. Those files _usually_ open without protest also in 2004. One annoyance regards text boxes. When text was highlighted and a text box was requested for it in...

instructions disppear when users begin type (text field)
Hi all, I need to customize the outlook contact form and I want to add one text field to allow users to add details info and instruct users how to add. Instructions shows in the field and the instructions disappear when users click and begin to type. How should I do this? exchange 2003/outlook2003 Thank you. It's hard for me to visualize exactly what you're expecting to happen. If you want the instructions to stay on the screen, you could display them in a label control. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumps...

How did you add text into publisher, without using boxes?
how do you add text to publisher without using text boxes I suppose you could create your text as an image and insert the image into your publisher file. -- Don Vancouver, USA "Calvin Scott" <Calvin Scott@discussions.microsoft.com> wrote in message news:64D23D52-138D-47B4-B265-4A41BF14BF55@microsoft.com... > how do you add text to publisher without using text boxes Calvin Scott <Calvin Scott@discussions.microsoft.com> was very recently heard to utter: > how do you add text to publisher without using text boxes You don't. Text in Publisher has to e...

reconnect to mailbox after Disabling user?
Hello, I was wondering if there is a easier way then to recycle the Exchange Services to renable a mailbox after a users mailbox has been disabled for x amount of time. I want to give access to this mailbox to another user so right now.. I simply go to Mailbox Rights -> (add the user I want to add) -> give allow rights to Read / Full but this requires a recycle of the services. Is there another way without recycling the services? G. On Mon, 23 Aug 2004 11:08:36 -0400, "Just Another Admin" <just@dmin.net> wrote: >Hello, > >I was wondering if there ...

How to let OWA users to change their password ?
How to let OWA users to change their password ? On Wed, 9 Nov 2005 01:58:03 -0800, "Enid" <Enid@discussions.microsoft.com> wrote: >How to let OWA users to change their password ? There are quite a few steps but if you follow this: http://support.microsoft.com/default.aspx?scid=kb;en-us;297121 carefuly, you'll be ok. Thanks for your information. Follow the document to enable the change password funcation, but got error when using IE6 w/ SP2 to do change password "error number : 5". It is so tricky if using FireFox, the password change is work. Any suggesti...

List box
I am trying to use the list box function from the control toolbar. I am not sure how to get the listings I want in the list box. Is there certain VB coding that is needed? Any help will be appreciated. Thanks. Todd No VBA code needed. In Design mode, click on your list box and select Properties from the Control toolbox (or right-click your list box and select Properties), then scroll down to the ListFillRange Property and indicate the cell range address that has the items you want to appear in the box (i.e., A1:A10). Then exit out of design mode and test your list box. MRO "Tod...

Update from Money 2007 Premium
I currently use Money 2007 Premium. I plan on installing Money Plus Deluxe. They look to be pretty much the same. Will anything be lost going from 2007 Premium to Plus Deluxe? Thanks, Bob K The services provided by Premium. (Gainskeeper, et al.) "Bob K" <BobK@discussions.microsoft.com> wrote in message news:8C0C34A6-F03E-49AC-8B54-BAFF63BC538A@microsoft.com... > Will anything be lost going from 2007 > Premium to Plus Deluxe? "Dick Watson" wrote: > The services provided by Premium. (Gainskeeper, et al.) > > "Bob K" <BobK@discus...

Cannot add user to CRM
I have trouble adding user to the CRM. I have 50 users in AD, however, when it comes to adding user in CRM, I can only choose from 15 of them. I wonder why!? I suppose I should be able to pick from all 50 users whoever is in the AD, right? If anyone have any clue on this problem and give me some feedback, I would surely appreciate that!!! CRM deployment manager will not display certain categories of users - eg if they have been migrated from NT domains or Novel NDS without passwords. Search the group archives for UserAccountControl "Martijn van Halen" <MartijnvanHalen@d...