Click here to Skip to main content
       

C / C++ / MFC

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Updating Scrollbar in editbox ....memberAnonymous11 Jun '01 - 1:48 
Hi I think if you are using MFC you can simpy use the function LineScroll
with a number greater that the required and you will automatically scroll
to the last line.
 
But if you are not using MFC, you can try
the following
mesg
::SendMessage(m_hWnd, EM_LINESCROLL, nChars, nLines);
use the nChars as zero and the nLines as a great number as possible
 
Kumar
GeneralRe: Updating Scrollbar in editbox ....memberHadi_Rezaie11 Jun '01 - 6:59 
Thank you for your helps ... Wink | ;)
 
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
 
Hadi Rezaie
GeneralRe: Updating Scrollbar in editbox ....memberUlf11 Jun '01 - 2:20 
Here is one method to append text and updating the scrollbar. Suppose you have a CEdit named m_wndText:
int nSel = m_wndText.GetWindowTextLength(); // Get length of text in the textbox
m_wndText.SetSel(nSel, nSel, TRUE);         // Put cursor at the end, without scrolling
m_wndText.ReplaceSel("Add this text");      // Add some text...
nSel = m_wndText.GetWindowTextLength();     // Get new text length
m_wndText.SetSel(nSel, nSel);               // Scroll to the last char
 
This is usually faster than getting the text with GetWindowText(), appending a string and then updating the entire textbox with SetWindowText().
 

--------------
"Criticism is often constructive because it makes you feel superior when you give it"
-- Dogbert
GeneralSlide ShowmemberAdeel Shamsi11 Jun '01 - 0:45 
Hi,
I have to create a application that works almost like a SlideShow that is available in WindowsMe ( in Pictures Folder ), except that I have to kept the pictures in exe so no one can copy it in addition I also want to disable the ( PrintScreen ) & ( Alt+Print Screen ) to disable capturing of the pictures.
So the target picture in full screen with a Next, Previous, First & Last & Exit buttons in a corner of a screen. I can put the Images in the Resource tab & then call them using the Image Control. Am I going the right way.
Any help according to this is appreciated.
 

Adeel Shamsi
adeelj@iname.com
GeneralRe: Slide ShowmemberAnonymous11 Jun '01 - 1:50 
Hi try to look into Global Hooks,
which can trap windows keyinput.
 
Like for ex you might have seen CBT
and CB-Training programs, which do not seen to repond
to the standard windows keyinput also.
 
You can get a Global Hook and trap the keyinput and
not forward the mesgs.
 
kumar
GeneralRe: Slide ShowmemberMukkie11 Jun '01 - 7:40 
And what about the app, which stays in memory, and every 5 secs gets active window and make copy of its dc to bmp and to file on disk? No user interaction - but works. I think that there is no way to totally block such possibility.
Do not put images (in bmp/gif/iff/jpeg/... format into the resource, cause many application (for example MsDev) can easily read resources from executable. Open exe as resource, and then export what just You want.
To workaround above problem, You must compress/encrypt or in other way alter images. Do not use commonly known algos, like zip and rar.
Hope this helps Smile | :)
GeneralRich Edit Control problems in Windows 2000memberAndrew Sage10 Jun '01 - 23:43 
I am currently experiencing problems with the rich edit control and
RTF text in piece of software I've written.
 
I have a Rich Edit View, using version 1 of the Rich Edit Control, for
display various pieces of RTF text. The text is edited via a dialog.
 
Running under Windows 95, Windows 98, Windows Me and Windows NT 4.0 I
have experienced no problems. However under Windows 2000 the RTF text
becomes corrupt when displayed. The text in the edit dialog is OK. It
seems that the font definitions in the display are being switched
round in 2000. For example,
in everything else f0 may be Arial, f1 roman, f2 symbol. But under
2000, it switches the number used for symbol, so I end up with
something like this - f0 Arial, f1 symbol, f2 roman. This causes the
text to be displayed wrong.
 
As far as I can see I have 4 options:
 
1. Use a newer version of the Rich Edit Control, but this might have
unwanted side effects on the other platforms.
 
2. Release a special Windows 2000 version of the software.
 
3. Write some kind of parser that will reset all the fonts every time.
 
4. Abandon RTF and use an HTML view control, but this would require
major rewrites.
 
Any help would be appreciated.
 
Thanks,
 
Andrew Sage

GeneralSP + Processor Pack Releasememberreal name10 Jun '01 - 23:17 
where i can see i have installed (windows and) msdev packs?
-about-box search failed
-add/remove search failed
thanks for reply
t!
GeneralRe: SP + Processor Pack ReleasememberMukkie11 Jun '01 - 7:52 
Try using GetVersionEx to obtain Windows Service Pack number.
GeneralCTabCtrl and Ctrl + TabmemberAnonymous10 Jun '01 - 23:05 
Hello,
 
I would like to know how to assign "Ctrl + tab" to change pages in my Tab Ctrl.
Thanks for help.
 

 
R.G

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid