![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 4
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Aug 2005
Posts: 4
Rep Power: 0
![]() |
yeh Iv looked, i swear there is none that are specific to this, do u know which ones you are refering too?
|
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Aug 2005
Posts: 4
Rep Power: 0
![]() |
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..... |
|
|
|
|
|
#7 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|