Right click mouse in CButton

Hi,
I need to implement Right click mouse for simple CButton in CDialog.
I Worte subclass to CButton and I implemented OnRButtonDown() ,
OnRButtonUp() functions .
In the OnRButtonUp() I notify the parent dialog about this event and it
works fine.
The problem is how to change the button view (like usuall  left mouse click)
when the mouse right button pressed (down) and return it back when realeased
(up) ?.

VC++ 6.0

Thanks



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.717 / Virus Database: 473 - Release Date: 09/07/2004


0
inesher (1)
8/12/2004 10:31:52 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
1316 Views

Similar Articles

[PageSpeed] 11

"Itzik" <inesher@yahoo.com> wrote in message
news:411be2b2$1@news.barak.net.il...
> Hi,
> I need to implement Right click mouse for simple CButton in CDialog.
> I Worte subclass to CButton and I implemented OnRButtonDown() ,
> OnRButtonUp() functions .
> In the OnRButtonUp() I notify the parent dialog about this event and it
> works fine.
> The problem is how to change the button view (like usuall  left mouse
click)
> when the mouse right button pressed (down) and return it back when
realeased
> (up) ?.
>
> VC++ 6.0

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cbutton.3a3a.setstate.asp


0
jeffp (1711)
8/12/2004 10:05:21 PM
Reply:

Similar Artilces:

Printing right-to-left booklet
Occasionally I need to make a small booklet in a right to left language. I upgraded to Office 2007. I'm able to create a right to left booklet without any problem. When I try to print the booklet it will only print the pages in a left-to-right order. What can I do? I've taken a Pub 2007 document/booklet and openned it in a Pub 2003 program. It prints right to left in the 2003 program just fine! Help! Tigger Your best solution is to open Help; type *right to left* in the search. There is an extensive article available. I don't see a printing solution in the article ho...

Clicking on the printer icon in Excel gives a "Save As" screen.
I click on the printer icon in Excel and get a "Save As" screen. The "Save As" screen leads nowhere. What's wrong? What can I do? Don J ------------------------------------------------------------------------ Sat, 7 Jul 2007 00:00:16 -0400 from Don J <dej8801@comcast.net>: > I click on the printer icon in Excel and get a "Save As" screen. The "Save > As" screen leads nowhere. What's wrong? What can I do? Sounds like some macro has redefined it. Try View | Toolbars | Customi...

how do I prevent the mouse pointer disappearing ?
when using both Excel & Word the pointer just disappears from the screen. how do I stop this happening ? ...

Running Check box code after Command button Click
Private Sub CommandButton1_Click() Call CheckBox2_Click End Sub I have code like the following and it works almost like I want it to, but when I check the checkbox it will activate the Form worksheet I have. I do not want anything to happen until after the command button is pressed. What can I add or remove to this code to allow this to happen? Thanks! Option Explicit Private Sub CommandButton1_Click() Call CheckBox2_Click End Sub Private Sub CheckBox2_Click() Sheets("Form").Activate ActiveSheet.Range("Address").Select If Selection.Interior.Pattern = xlNone ...

WS_EX_LAYERED but catching mouse messages
I have a color-keyed WS_EX_LAYERED window, and everything works fine - but how can I catch mouse messages over it's transparent areas ? Is any special window style for it ? Th anks in advance, Adam Since the whole point is to NOT catch mouse messages over the transparent area, you would need another approach. One might be to make the area "transparent" not by using the color key but by using a very, very light color. joe On Thu, 21 Feb 2008 03:21:34 -0800 (PST), adam_mich@gazeta.pl wrote: >I have a color-keyed WS_EX_LAYERED window, and everything works fine - >but...

Rights required to access Exchange 'Mailbox Rights' in ADUC
Is it possible to provide IT staff access to manipulate Mailbox Rights under the Exchange Advanced tab in ADUC without giving them Exchange Administrator rights? We'd like our staff to be able to manipulate all aspects of users using ADUC, but not the back-end Exchange stuff in System Manager. However it appears to be an all-or-nothing situation, at least where access to the mailbox rights are concerned. The message I'm currently getting is 'there is no such object on the server' - which I have interpreted as 'you don't have rights to modify the exchange speci...

Recieving emails in Inbox only when I click on a old message
I am having a strange problem with a few of the users in my domain. The do not see new emails, but when they click on a old message then the ne messages appear. This problem seems to be growing slowly to more an more users. We use Outlook 2000, and Exchange 5.5, has anyone else ru into this? I hope so, any help would be greatly appreciate -- HeatmiserPosted from http://www.pcreview.co.uk/ newsgroup acces Typically this is the UDP packets being blocked, have you been upgrading your infrastructure as Firewalls, Gateways etc can block these packets. Check out http://support.microsoft.com/?k...

Outlook express goes offline when click on different folder
My Outlook Express has developed a recent fault in that it goes offline when I switch between folder causing a great deal of frustration. I have checked with my ISP provider who say that it isnt them and also with BT who say that there is nothing wrong with the ISDN line which leaves the software. Has anyone else had a similar problem or is there a virus going around that can cause this.Look forward to any response. Thanks. Ask in an Outlook Express forum. This is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here...

Object could not be found after clicking on MS Office New Message icon
The error message I got when sending a email message from MSOffice or from Explorer for a new email message gives: The object could not be found. after clicking the icon from MSOffice or other links to create a new mail message. Outlook has been set to default mail browser and I've also tried to reinstall the software from the Add/Remove Programs but the problem persists. Appreciate very much if someone could help me fix this. Thanks in Advance, Edwin ...

Inserting text before right command
I am using the command: =RIGHT($C2,1) This gives me a number output. How do I insert a word before it, i.e. instead of giving me say "3" it gives me "Position 3"? Thanks -- Turnipboy ------------------------------------------------------------------------ Turnipboy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24527 View this thread: http://www.excelforum.com/showthread.php?threadid=486783 ="Position "&RIGHT($C2,1) "Turnipboy" <Turnipboy.1yudzm_1132568701.0857@excelforum-nospam.com> wrote in message new...

Re: The Annoyance Of Having To Click Twice
OK. I tried it again with just /news -- as you recommended -- and it WORKS this time! EUREKA! Actually YOU found it. THANKS, Steve. Are you any relation to the famous writer? Nancy "Nancy Jackman" <nanwjackman@beaufort.com> wrote in message news:... > Catch 22! > > If you follow the steps below, with /newsonly -- WLM won't open in the > EMAIL view and you can't move to that screen in the program once you have > opened in newsgroups view! > > <G> > > So, yes, there are bugs in 64 bit WLM -- and "you ...

Outlook - 2003
Have an odd problem - my mouse right-click functions in the mail item lists has suddenly stoipped working. This is the one that gives a drop down menu for individual mail items. Odd thing is that other right-mouse functionality (e.g. with side panel menu) still works. Any ideas how to restore? Mick ...

Mouse Cursor disabled
I am trying to bring up Windoes XP home on my old Compaq 100, which came with Win 98. It loads, but the mouse cursor is not usable--it jumps erracticly and does not allow me to click on anything. Also, when I try to bring up the programs screen, it comes up, but then quickly reverts to a basically blank screen. Help would be appreciated. open your mouse and check the rollers for lint balls. and other dirt. "Bonnell-frost" wrote: > I am trying to bring up Windoes XP home on my old Compaq 100, which came with > Win 98. It loads, but the mouse cursor is not us...

Excel Mouse Selection Problem
Hello everyone, I'm having a strange problem with Excel 2000. After i click for the first time my left mouse button, the mouse enters selection mode, as if i was pressing the shift key. I've browsed the net for a solution, even the MS support site with no success. Has anyone ever had this problem? Or has a clue of what could be appening? Thanks in advance, Paulo Silva Maybe you accidentily pressed F8 (Extend Selection)? -- Kind Regards, Niek Otten Microsoft MVP - Excel "Paulo Silva" <pgoncalves@hotmail.com> wrote in message news:%233O1St70DHA.2572@TK2MSFTNG...

Excel 2007 Crashes When Clicking "Page Layout" Tab
Hello, I'm having a problem where if you start Excel, even in a blank workbook, and then click on the Page Layout tab Excel locks up. I've ran Diagnostics and it said one item was fixed but the problem remains. This is Office64 on Vista64. Hoping someone might have some ideas here as I've been perplexed. Running all latest updates and everything. In fact the machine is very new too. Thanks, Derek Here are the two Event Log entries: Log Name: Application Source: Application Hang Date: 7/6/2009 8:11:53 AM Event ID: 1002 Task Category: (101) Level:...

One-click Automatic Charting
Hello guys, I have different kind of data for forecast. What I want is to be able to create a chart with just one click on the worksheet. I know the F11 function but for that you have to select the data and doesnt give you a concised chart. I want to get a chart for example for different quarters of the year, monthly basis, customer basis, with just one click. Maybe there are different buttons (or drop-down buttons) for each kind of chart to be created. How can I go about it? Any kind of help would be very appreciated! -Garry You could program your own custom buttons to generate charts fo...

Looking for a U.S. map you can click on state for sales figure?
I am looking for a tool or product where I can convert sales figures from an excel spreadsheet to a map of the United States you can click on each state for figures/statistics for each state. Any suggestions out there? RicP I found several USA state images that you could use with Google. I added a hyperlink to the Ste name and linked it to range name for state - associated with data. http://en.wikipedia.org/wiki/Image:Map_of_USA_with_state_names.svg This one is just one of many. Look till you find the one that fits your need. I used SnagIt to copy image and paste to a blank Excel wo...

Exchange Rights Issue
Somehow my brand new installation of Exchange 2003 has misstated AD rights, when I launch Exchange System Manager I get a window "Exchange System Manager; Facility win32; ID NO: c0070005 ; Exchange System Manager". It will not open. I get a similar error when opening AD Users and Computers MMC snapin. I am logged in as "administrator" on the domain and it appears to have proper rights. Is there some way to fix this??? Brian Hatchell bhatchell@netsolutionsinc.com Does this apply? 323915 XADM: "c0070005" Error Message If You Try to Access a Tab in Exch...

Changing cell colour when cell selected/de-selected by mouse/arrow keys
Newbie. Is it possible to get excel to change the colour of a cell when it is selected by mouse pointer, or arrow keys, from default white to yellow then revert to white again when the next cell is selected? Here's one way Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.FormatConditions.Delete With Target .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" With .FormatConditions(1) With .Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 ...

ADModify
Hello, I have to remove from 1000 Exchange 2003 Mailboxes additional users of an old NT4 Domain from the mailbox rights. I knew the ADModify tool to export and import the rights in XML files, but the modification of the XML files for the 1000 User with that domainuser included from a list of 18000 mailboxes is not so simple. A second problem is that after the import of the mailbox rights the ACE_MB_FULL_ACCESS property was not set correctly in the user object. The User only has read permissions after a import with FULL Access set. Is it possible to remove a user directly for the Mai...

Clicking on the "X" in the top-right corner. How to catch it
Hi, clicking on the "X" in the top right corner (sorry, don't know the technical name of it) closes my application. But if a certain thread is running, i want to intercept this click, and allow the program to keep running. How do I do this? BOOL CMainFrame::DestroyWindow() { if(ThreadRunning) return FALSE; else return CFrameWnd::DestroyWindow(); } Doesn't seem to work..... Tried handling ON_WM_CLOSE? hamishd wrote: > Hi, clicking on the "X" in the top right corner (sorry, don't know the > technical name of it) closes my application....

Some items can't be send in outlook 2003. Even after repeatly clicking the send button.
Hello, Does anybody know why some messages can't be send? and stay in the outbox. Even aftyer opening them and trying to send them again and again. I did scan the Outlook.pst file with SCANPST.EXE but no problems were detected. When I copy all contents to a new empty message the message will be so I can't figure out what the problem is. It happens sometimes and all I can do now i placing the contents it a new empty email. There is no logical explanation for this. baarts <pietje@hotmail.com> wrote: > Does anybody know why some messages can't be send? and stay in ...

Double clicking on a cell scrolls worksheet to the end
I am having a frustrating issue. I have Excel 2003 sp2. Often, when I double click on a cell the spreadsheet scroll down to the last row of the worksheet rather than just putting the cell that I double clicked in edit mode. Why does it scroll? I want to stop it from scrolling when a cell is double clicked. This behavior doesn't happen every time I double click a cell. I haven't been able to isolate the specific action that make it do this. But it happens often causing constant disruptions in my work. Dave This is the behaviour when you don't quite find the cell when...

Does AutoHotKey record mouse in correct Vista compatible way?
Does anyone know if the free open source (I think) program AutoHotKey records keystrokes and mouse movements in a correct Vista compatible way? I know using Journal Hooks isn't the way to go anymore. www.autohotkey.com (it's a popular free program, so I thought perhaps someone here knows of it and might know details of how to record mouse & keyboard for playback.) ...

Moving Mouse Closes OUtlook
I have an IBM laptop running Windows 2k and Office XP. Everything runs fine but I am seeing some odd behavior. Both Windows and Office XP have all associated services packs applied. If I open Outlook, read my mail and leave Outlook open and walk away for a few minutes, when I return if I move the mose it closes Outlook. If you have any suggestions on what might be causing this I'd appreciate your feedback I have looked at the event viewer and it shows nothing odd. ...