Owner draw buttons : 2D look...Can it be 3D?

hi,
Priyanka here...
i created owner draw buttons in my application. but the feel and look
of these buttons is not the same as the CButtons. i mean when i click
on the CButton, it gives a 3D feel as the text shows some offset and
the button gives a pressed look. but in the owner draw buttons, there
is no such 3D effect i can see. can we make it possible?

Thanks 
Priyanka

0
11/21/2005 11:58:54 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
695 Views

Similar Articles

[PageSpeed] 43

priya wrote:
> hi,
> Priyanka here...
> i created owner draw buttons in my application. but the feel and look
> of these buttons is not the same as the CButtons. i mean when i click
> on the CButton, it gives a 3D feel as the text shows some offset and
> the button gives a pressed look. but in the owner draw buttons, there
> is no such 3D effect i can see. can we make it possible?
> 
> Thanks 
> Priyanka
> 

In an owner-draw button your code is responsible for all of the 
painting.  Change your painting code to offset the text when the button 
is down.

-- 
Scott McPhillips [VC++ MVP]

0
Scott
11/21/2005 1:20:36 PM
As already point out, you will need to do all this yourself in an owner
draw button. There are very good examples of owner drawing a CButton at
both codeguru and codeproject. Take a look at those.

------------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
11/21/2005 2:00:32 PM
Take a look at this one:

http://www.codeproject.com/buttonctrl/cbuttonst.asp

Tom

"priya" <priyanka.khedekar@gmail.com> wrote in message 
news:1132574334.930546.71670@z14g2000cwz.googlegroups.com...
> hi,
> Priyanka here...
> i created owner draw buttons in my application. but the feel and look
> of these buttons is not the same as the CButtons. i mean when i click
> on the CButton, it gives a 3D feel as the text shows some offset and
> the button gives a pressed look. but in the owner draw buttons, there
> is no such 3D effect i can see. can we make it possible?
>
> Thanks
> Priyanka
> 


0
tserface (3861)
11/21/2005 4:57:09 PM
Take a look at my Better Bitmap Button, on my MVP Tips site, and feel free to steal ideas
from it.  For example, using DrawEdge to draw the button edges and changing the edge type
depending on the button state, and a cute little trick: whatever you display as the
contents gets shifted a couple pixels to the right and down, to get the proper "3-D" push
effect..
				joe

On 21 Nov 2005 03:58:54 -0800, "priya" <priyanka.khedekar@gmail.com> wrote:

>hi,
>Priyanka here...
>i created owner draw buttons in my application. but the feel and look
>of these buttons is not the same as the CButtons. i mean when i click
>on the CButton, it gives a 3D feel as the text shows some offset and
>the button gives a pressed look. but in the owner draw buttons, there
>is no such 3D effect i can see. can we make it possible?
>
>Thanks 
>Priyanka
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
11/22/2005 2:14:24 AM
Reply:

Similar Artilces:

How can I change the column order using VBA
I have written code that appends data to a table. Occasionally, I need to add more columns. To do this I am using a bubble sort to compare with my existing table weather i already have the column or not. Because of this, I make my new table in alphabetical order, but I would like to be able to reorder the columns into something other than alphabetical. Is there a column order property for tables? Any suggestions? Thank you. Balbina wrote: > I have written code that appends data to a table. Occasionally, I need to > add more columns. To do this I am using a bubble sort...

custom size too large to print, can't remove extra blank space
Scanned framed text was added to Word which forced page to custom size. After I formatted text there is a considerable amount of blank space I can't remove. There is NOTHING in the space as I have selected view all formatting marks and nothing is there, yet I can't remove. The spacing "resizer" at the top of page does not affect it either. Any suggestions?? Perhaps the text was scanned as a picture? If so, you will need OCR to render it editable. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org &qu...

Drawing a Background Highlight Polgon
I want to draw a polygon on an MFC dialog to highlight groups of buttons with different bacground colors. The buttons are in columns and may span columns so an "upsidedown L" may be required -- hence a polygon. A group box was considered, but the border seems to be a problem (two group boxes seem to still leave a line even with "no border") and filling with a background color involves some message handling and extra painting that I haven't yet found a good example for. Is there a way to subclass the group box to allow polygons specified by points and fill with ...

CRM 3 Outlook Client New Record Button
Hi, I have deployed a CRM 3 server and installed the Outlook Client on all of the users machines. In the client there is a button with a drop down to create new records, currently the drop down allows creation of Contacts and Accounts. We would like that button to allow creation of Leads as well, does anyone know how I can edit this button to allow leads to be created from the drop down? I look forward to any responses. Regards David In Outlook, click Options on the CRM menu. On the Workplace tab, check the sales box. That should add leads to the drop down of records to be crea...

Can't open file
Hi all. We are having a problem with a site using Outlook 2003 SP2 and Windows XP SP2 when they drop an email onto the desktop the subsequent .msg can only be opened once. If you open the .msg file again you get the error message "Can't open file: c:\Desktop....\xxxx.msg. The file may not exist, you may not have permissions to open it, or it may be open in another program" Well, it's not a permissions issue and the file does exists so it only leaves something holding it open. It's like Outlook is not releasing the file when you close the email display screen. ...

how can I multiply 7feet and 6ft 8in?
How can I multiply 7feet and 6ft 8in using Excel? I have 7' in A1 column, 6' 8" in B1 column. When I did =a1 * b1, I get #VALUE! I stretched the column wide hoping the #VALUE! will disappear and figure comes out. NOPE. Why? Please help the beginner -- epou ----------------------------------------------------------------------- epout's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2703 View this thread: http://www.excelforum.com/showthread.php?threadid=44481 epout Wrote: > How can I multiply 7feet and 6ft 8in using Excel? > >...

Why can't I see anything in my inbox?
I am relatively new to microsoft outlook, but it was working alright for me until about 2 weeks ago when everything in my inbox was gone. I also am not recieving messages that people have said they have sent me. Is there a reason why? So it's completely empty? Tried resetting your view already? View-> Arrange By-> Current View-> button at the bottom of the window -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "cass" <cass@discussions...

Can't read attachments
When attempting to read attachments named ATT000xx.dat I receive the following message: Access to C\WINDOWS\Temporary was denied. I was able to read them two days ago, and the problem started after forwarding some of them. Now I don't seem to be able to read any of them. These attachments are headers from SPAM being returned to me (phony return address). Any suggestions? ...

command buttons #2
can anyone help me get command buttons working in excel2007 without macros.thanks On Jul 31, 6:58=A0am, giant <carcraz...@ymail.com> wrote: > can anyone help me get command buttons working in excel2007 without > macros.thanks Depending on what you want to do that may not be possible. Some more information would be useful Regards David And clicking the button would do what? "giant" <carcrazy00@ymail.com> wrote in message news:3ec1b306-0321-4738-952f-9e09a40a6246@t13g2000yqt.googlegroups.com... > can anyone help me get command buttons working in excel2007...

Can I flip a symbol?
-- Thank you. To flip a symbol you could copy it as a picture and rotate it. Then press shift go to the edit menu and copy picture and paste it where you want and then you can rotate any direction you want. "tjsmags" wrote: > > -- > Thank you. > ...

how ,programatically we can open a file dialog box
hi How,programmatically,we can open a file dialog box. My probs is 1. On click of some menu ,I want to open dialog box ,which contains all files. 2. I want to open file dialog box ,which contains file without any extenstion. Arbind hi, Arbind wrote: > hi > > How,programmatically,we can open a file dialog box. > > My probs is > > 1. On click of some menu ,I want to open dialog box ,which contains all > files. > > 2. I want to open file dialog box ,which contains file without any > extenstion. > > Arbind > > You c...

Buttons #2
I want to place a button in or near a cell which allows the selection from a menu of text items or computed answers. Must be simple but don't know where to start looking. Can someone help me out on this please? STEVEN Hi Steven, And what would you want to do. Make an entry, call a macro. Take a look at validation where you can get a list of valid entries. http://www.contextures.com/tiptech.html --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcri...

How can I eliminate old addresses in the drop down on To:line
When I begin to fill out the To: line after I type the first letter, every email address I've ever sent with that letter appears in a drop down box. How do I get rid of some of them but not all of them? Any advice is appreciated. use the arrow key to select it then press Del. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-ti...

Can I edit email after running spellcheck (before sending it)?
Does Outlook have the option to return to writing or editing an email after running spellcheck and before sending the email? It seems to send the email automatically after running spellcheck. Is there an option or override to prevent this? How are you invoking spell-check? Neither the spell-check button (abc), nor F7 sends the message after spell-checking it. Pressing "send" of course, will, as will alt+s. "mom1227" wrote: > Does Outlook have the option to return to writing or editing an email after > running spellcheck and before sending the email? It seems...

can you help me with an invoice
I am trying to get a sample invoice Hi Try http://office.microsoft.com/en-us/templates/CT011377071033.aspx -- j.kasselman@atlantic.net.remove_2nd_at. Randburg, Gauteng, South Africa "Steve B" wrote: > I am trying to get a sample invoice ...

Can't type or click anything
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I recently tried to open a .docx file that was sent to me by email. I noticed I could not make any changes to the file, but could read it fine. Now I can't type or click anything in Word, even on a new document. The problem is not my keyboard, and textedit seems to work fine. I have the same problem when I try OpenOffice. ul49@officeformac.com wrote: > Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: > Intel I recently tried to open a .docx file that was sent to me by >...

Combox
I have written a nice little function that returns a list of values that i would like to use in a combo box. So far, It seems I can only pull from a named range for the values. The background: The contents of the combo need to vary depending on the value in the box next to it. Basically, we have a big lookup table and we use the value to the left of the combo box to filter that data through a custom function. The function comes in because we need to remove dupes, blanks, and clean it up somewhat. Is there any way, even a round-about way, to get it to use the function? Some kind of tempor...

I'm looking for a template for a prepaid asset schedule
Is there a template for a prepaid Asset Schedule? "Downtown" <Downtown@discussions.microsoft.com> wrote in message news:1D0ACCDB-5669-49BC-B863-7FE18A41DFFF@microsoft.com... > Is there a template for a prepaid Asset Schedule? Hi Downtown, Look at the templates offered free by Microsoft, e,g: http://office.microsoft.com/en-us/results.aspx?Scope=TC&Query=prepaid+asset --- Regards, Norman ...

Can you find duplicate records in excel
I want to sort out duplicate SS#'s in a database I am working on. Can excel do that? Check Chip Pearson's site for help http://www.cpearson.com/excel/duplicat.htm "Janet" <Janet@discussions.microsoft.com> wrote in message news:B58DB837-4280-4D37-9302-2093DCF8ECFF@microsoft.com... >I want to sort out duplicate SS#'s in a database I am working on. Can >excel > do that? ...

cell +1 with one button?
HI! I need to know how to add '1' to a cell using only one button. Meaning value WAS 3 and becomes 4. Is there a way to do this? It is for live stats in a sports game, s� speed is of the essense. That is why it has to be a "1-button operation." Thanks in advance! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Attach this macro to the button: Public Sub Add1() With ActiveCell If IsEmpty(.Value) Or IsNumeric(.Value) Then _...

I can see, but not send, synced mail from my MobileMe account.
Hi! I receive the following error message when I try to send an email: The connection to the server has failed. The connection to the server has failed. Subject 'Re: test' Server: 'smtp.mac.com' Windows Live Mail Error ID: 0x800CCC0E Protocol: SMTP Port: 25 Secure(SSL): Yes Socket Error: 10060 MobileMe is my email provider. My email address actually ends with a ".mac" and not ".me". I am syncing from my home desktop computer. I will appreciate any help or guidance you can give. Thanks! IMAP Incoming 993, SSL = Yes Outgoing 587, ...

can someone tell me how to deselect "select all" in Excel?
i am trying to deselect "select all" for some rows in Excel. Anyone know where i find this? I'm not at all certain I know what you're asking about, but try this, perhaps I'll turn out to be lucky in my guess: Press [F8] and see if the action changes. That's a toggle, so if it changed things in a way you're unhappy with, just press it again. "scott" wrote: > i am trying to deselect "select all" for some rows in Excel. Anyone know > where i find this? Hi, I think your saying you have pressed the select all butto...

Can't remove Public Folders from Front-End server
Hello, We are running Exchange 2003 SP2 using a front-end/back-end topology. There are two FE servers (FE1 & FE2). My goal is to remove both public folder stores from FE1 & FE2, and leave the a store on the backend cluster. The public folder store has already been removed from FE1, but I can not remove all of the public folder instances from FE2. When I look under FE2 -> Public Folder Store -> Public Folders, that container is empty. However, under FE2 -> Public Folder Store -> Public Folder Instances, there are two replicas that I can not get rid of: Offline Addres...

can't delete messages #4
When I try to delete a message in the inbox I get a message 'The meswsaging interface returned an unknown message. If problem persists restart outlook'. Restarting dooes not solve the problem. I also reinstalled outlook over the existing program without success. Any advise? Peter Z <anonymous@discussions.microsoft.com> wrote: > When I try to delete a message in the inbox I get a > message 'The meswsaging interface returned an unknown > message. If problem persists restart outlook'. Restarting > dooes not solve the problem. I also reinstalled outlook >...

Redo button does not work
When using the Undo button, the Redo button periodically is not available. It is sporadic, sometimes allowing me to redo, and other times not (on the same worksheet). Why does this happen? Is there an Add-in or other property setting that I need to adjust? Hi Dlemma2, The UNDO is disabled by running a macro. Take note if a macro has just been run when the UNDO is not working. I'm not sure if there are other things that disable the UNDO feature. HTH Regards, Howard "Dlemma2" <Dlemma2@discussions.microsoft.com> wrote in message news:983899C2-6D74-44E8-AC0C-4B3E0...