Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 30th, 2005, 8:04 AM   #1
trent101
Newbie
 
Join Date: Aug 2005
Posts: 4
Rep Power: 0 trent101 is on a distinguished road
Please help me!!

Ok, If any knows anything about MFC please tell me how do I add, buttons, and or bitmaps(graphics), to the device context in my SDI application. I can write to it with text and lines and stuff using the CPen and CBrush methods, but how do I place buttons (CBitmapButton) onto the device context. any help would be really appreciated.



Trent
trent101 is offline   Reply With Quote
Old Aug 30th, 2005, 8:06 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Have you investigated any of the MSDN tutorials? They take you through projects step by step.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 30th, 2005, 8:27 AM   #3
trent101
Newbie
 
Join Date: Aug 2005
Posts: 4
Rep Power: 0 trent101 is on a distinguished road
yeh Iv looked, i swear there is none that are specific to this, do u know which ones you are refering too?
trent101 is offline   Reply With Quote
Old Aug 30th, 2005, 8:51 AM   #4
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
I was going to help... but since you only used two exclamation points in the title I don't feel properly motivated.

Please use titles that give SOME indication of the type of question or comment within.

Have you looked up CButton?
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Aug 30th, 2005, 9:50 AM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Well, I hope you aren't looking for a tutorial that exactly matches your application. CTRLTEST illustrates the use of bitmap buttons, spin controls, and custom controls, as well as the subjects of subclassing and owner drawing of menus and list boxes. These things train you in the ability to whup 'em into your design, you have to adapt.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 30th, 2005, 7:22 PM   #6
trent101
Newbie
 
Join Date: Aug 2005
Posts: 4
Rep Power: 0 trent101 is on a distinguished road
Stevengs,

Yes, I have looked up how to implement the buttons and all that, what i dont know how to do is draw a button to the device context. I have leant that once you create a button object, you then call its create() function.... One of the parramters aks for its parent window, which is a pointer to a CWnd. Im not sure what to put here, and do I do all this in the same place in which I drawed to the screen using CPen ect... I tried using a this pointer for that reference and putting all this code in the same place (OnDraw()), I get no errors but I cant see the button.....
trent101 is offline   Reply With Quote
Old Aug 31st, 2005, 7:07 PM   #7
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
time for a heapin' helpin', try this:

http://www.functionx.com/visualc/controls/button.htm

it was real hard to find. I had to enter TWO words in google.
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:49 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC