PC Review


Reply
Thread Tools Rate Thread

Creating inputless Button

 
 
keith.halligan@gmail.com
Guest
Posts: n/a
 
      26th Jun 2006
I'm trying to create a button that will take no focus (it's for a
dialog designer app).

I've tried sub-classing the button control and overriding the WndProc()
function to trap button messages. This method doesn't seem to be
working, and it's doing my head in. The only other suggestion I can
come across is to draw the control using GDI+ code, which I'd prefer
not be able to do.

Is there anyone out there who has any ideas.

Thanks,
Keith

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      26th Jun 2006
Keith,

If it doesn't take focus, then what is the point?

Also, have you looked at the WM_SETFOCUS message? It is sent to your
window when you get focus. You can just shift the focus to another control
at that point.

Although, it sounds like you might be better off just painting a button
on the screen, since it's not going to do anything.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to create a button that will take no focus (it's for a
> dialog designer app).
>
> I've tried sub-classing the button control and overriding the WndProc()
> function to trap button messages. This method doesn't seem to be
> working, and it's doing my head in. The only other suggestion I can
> come across is to draw the control using GDI+ code, which I'd prefer
> not be able to do.
>
> Is there anyone out there who has any ideas.
>
> Thanks,
> Keith
>



 
Reply With Quote
 
rossum
Guest
Posts: n/a
 
      26th Jun 2006
On 26 Jun 2006 04:12:10 -0700, (E-Mail Removed) wrote:

>I'm trying to create a button that will take no focus (it's for a
>dialog designer app).
>
>I've tried sub-classing the button control and overriding the WndProc()
>function to trap button messages. This method doesn't seem to be
>working, and it's doing my head in. The only other suggestion I can
>come across is to draw the control using GDI+ code, which I'd prefer
>not be able to do.
>
>Is there anyone out there who has any ideas.
>
>Thanks,
>Keith


Set up a button looking like the one you want in Designer. Use
Ctrl-PrintScreen to copy everything to the clipboard. Paste into your
favourite picture editor and extract just the bitmap of the button
that you want. Display the bitmap on your final form and it should
look just like the original button.

rossum

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Button that is type="button" and does not call __doPostBack Nathan Sokalski Microsoft ASP .NET 1 11th Jan 2010 03:57 PM
Creating Button =?Utf-8?B?SG93YXJkIFI=?= Microsoft Access 1 2nd Apr 2007 09:08 AM
creating a button =?Utf-8?B?Sm9uYXRoYW5X?= Microsoft Excel Misc 2 20th Mar 2007 11:12 PM
Creating Command Bar Button/Poppu like the 'Send' button =?Utf-8?B?Qkc=?= Microsoft Outlook VBA Programming 0 21st Sep 2004 11:41 PM
Creating Command Bar Button/Poppu like the 'Send' button =?Utf-8?B?Qkc=?= Microsoft Outlook Program Addins 0 21st Sep 2004 11:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:55 PM.