![]() |
|
#1
|
|||
|
|||
writting text to the view area in mfci need to know how i can write text to the big view area in the MFC. which classes to use. i tried to use paint with CView as my base class but to no avial
|
|||
|
#2
|
||||
|
||||
|
Hi,
you can write to cView like this: CPP / C++ / C Code:
well, when creating the SDI, there should be 3 class, the app,mainframe and the viewclass, by default, the view class name would be ="yourProjectName"+"View" so thats the class that could be used to write to the view with the codes i gave above. __________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
|
#3
|
||||
|
||||
|
here is an example....
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
|||
|
|||
|
Quote:
i have seen the sample code u send to me but as i am trying to add a similar code to my own i get an error saying that the OnPaint has been declared in my view class. eventually i intend to display the information say after clicking a certain button. will be here all night. this thing has 2 work 2day! help |
|
#7
|
||||
|
||||
|
I don't see whats your problem, did you declared OnPaint correctly?? Use class wizard to add the 'onpaint' hanler to your view class and try to put the code there.
In case you don't know how to add it: "In class wizard, choose MessageMaps tabs and choose your view class from the class name and find 'WM_PAINT' from the Message list and add" Here is how OnPaint would be declared in the headear file: CPP / C++ / C Code:
this is in your view.cpp CPP / C++ / C Code:
I think I had given the code and even a sample program, you should put more effort to find how to use it... __________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| burning problems PLEASE PLEASE HELP | kelticeire | Computer Hardware Forum | 4 | 01-Dec-2006 15:39 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
| text field problm | zuzupus | Web Design Forum | 3 | 04-Sep-2003 05:18 |
| Scrolling Text Ads - Free advertising on other peoples sites | jrobbio | Advertising & Affiliates Forum | 0 | 19-Feb-2003 00:00 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The