|
-
May 31st, 2000, 03:22 AM
#1
Thread Starter
Lively Member
hi, i want to make a notepad clone, but want to have the line numbers running down the side of it, and i really dont know how to do it..any ideas?
and also how do i get it to scroll if i use a textbox or rich-txt-box and a label down the side? pls help me!
Thanks,
Mag-Net
-
May 31st, 2000, 03:45 AM
#2
transcendental analytic
labels surely don't solve your problem, write directly on the form, using print. To move the position to print use currentx and currenty. What do you mean with the scrolling? You can have a scrollbar scroll the text and then update the form in the event. use autoredraw to make the screenclearing nice. (cls)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 04:12 AM
#3
Thread Starter
Lively Member
Now i dont know how to make the line numbers scroll when u scroll the text box, there is no event or property???
if i used my own scroll bars, how do i get the text to scroll in the text box? there is no event is there?
thanks
-
May 31st, 2000, 07:06 AM
#4
transcendental analytic
I c your problem now, you must subclass in both cases for the scrolling and get an event(I don't know how) but it sure can be done
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 02:40 PM
#5
Thread Starter
Lively Member
well err, does anyone now know how I am going to be able to do this? As I don't have a clue! thanks anyway....
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
May 31st, 2000, 03:09 PM
#6
Conquistador
you could put the line number sin a list box
-
May 31st, 2000, 03:32 PM
#7
Thread Starter
Lively Member
hmm, yeah but doing this, i still have the problem of getting the listbox to scroll along with the text box wouldnt I, how do I get around that?
Thanks for the help
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
May 31st, 2000, 03:51 PM
#8
transcendental analytic
I'm not the person to tell you since i haven't subclassed that much but looked up (there was no WM_SCROLL) but there was WM_MBUTTONDOWN = &H207. You can probably get that one.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 04:14 PM
#9
Thread Starter
Lively Member
ok thanks, i dont know about subclassing...STOP laughing at me! I will read about it now, and then try it. thanks a lot!
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
May 31st, 2000, 09:14 PM
#10
transcendental analytic
Lol, i'm not laughing, seriously, i've made some subclassing, i made a control that does it but I'm not sure, Sam said it wouldn't be that easy, but it works for me
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 10:11 PM
#11
Hyperactive Member
Look up AddressOf and SetWindowLong. Using these, you can intercept the Windows messages that are generated. SBM_GETPOS may be a helpful constant. Because you're interfering with Windows messages, it's a lot easier to crash your program, so you should save before each run.
-
May 31st, 2000, 10:20 PM
#12
Thread Starter
Lively Member
thanks for that, i will try it out
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|