|
Thank you for your reply.
However, I want to scroll the contents of the RichEditCtrl through the scrollbars in the FrameWindow and not the scrollbars in the RichEditCtrl
(when for example it is created with the WM_HSCROLL style).
I tried handling the EN_HSCROLL notification but they are issued when a user
tries to scroll using the scrollbar in the RIchEditCtrl and not the Frame window.
Is this what you had in mind????
(I like the six pack moto but right now I could use a bottle of whiskey...)
|
|
|
|
|
Why on Earth do you want to have scrollbars in edit control --and-- in frame window doing the same thing?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I don't have scrollbars in the edit control, only in the frame window.
When handling the EN_HSCROLL message nothing happens when a user tries to scroll through the scrollbars in the frame window.
(After that I added scrollbars in the edit control and the EN_HSCROLL handler
worked, but that is not what I want.)
|
|
|
|
|
jabbaj wrote:
(After that I added scrollbars in the edit control and the EN_HSCROLL handler
worked, but that is not what I want.)
It's classic chicken and egg problem. LineScroll will not work, unless you have scrollbars in edit control. And you don't want scrollbars in edit control.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
In my view class I have a OnVScroll handler.A part of this function is the following...
<br />
<br />
case SB_LINEUP: <br />
{<br />
if (CurPos <= 2*(total_height[pgnm] / lines_edit) - 1 )<br />
{ <br />
re->LineScroll(-1,0);<br />
CurPos =0 ;<br />
EnableScrollBar(SB_VERT, ESB_DISABLE_LTUP);<br />
}<br />
else<br />
{ <br />
re->LineScroll(-1,0);<br />
CurPos -= total_height[pgnm] / lines_edit ;<br />
}<br />
SetScrollPos(SB_VERT, CurPos);<br />
PrevPos = CurPos;<br />
}<br />
break;
This works fine when scrolling vertically!
All the LineScroll function does is scroll the contents of the edit control
1 line up when the user clicks the top arrow of the vertical scrollbar in the Frame window.
When I try to do the same in the OnHScroll handler (respectively e.g. (SB_LINERIGHT)) and try to use the LineScroll function (e.g. re->LineScroll(0,-1)) then nothing happens.
This is my problem.
I do not scrollbars in the edit control because the buttons of the Tab are
on the bottom of the page and the horizontal edit scrollbar appear on top of them (as it should in the first place).
Hope this clears things a bit.
|
|
|
|
|
I am saving a file.On click the save button ,the file starts saving.So i have to show the busy cursor.How can i find out that the file is saved,so that again i change my busy cursorto normal cursor
|
|
|
|
|
Use BeginWaitCursor() and EndWaitCursor()
Best regards,
Eugene Pustovoyt
|
|
|
|
|
The saving routine returns when the file is saved.
Or are you multithreaded, with saving in a different thread?
|
|
|
|
|
If you're using MFC, just declare CWaitCursor local variable. If you're on bare Win32 API, then use LoadCursor/SetCursor.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Hi All,
I have an exe file which I need to use in my program.Since the exe is not made by me I need to store the output created by the exe into some text file.Thus to execute this file from my program I'm using this statement into my program:
system("filename.exe parameter>output.txt");
Using a redirection symbol I'm getting the output into the output.txt file as required.What I need is if the executable is unable to produce an output in 5 sec the executable should get terminated.How can I do it in the current scenario.Is there any other way to solve this problems keeping in view the requirements.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
TerminateProcess()..
try to initiate your exe with CreateProcess..
WUSIWUG
|
|
|
|
|
Hi,
Does anybody know how to change the content of a html-doc before loading in a CHtmlView ? Or is it possible to view a doc from ram (in a CHtmlView) ? Or is there a possibility to prevent access to a temporarily created (and closed) file to other apps ?
tia
widi
|
|
|
|
|
I don't believe it's possible sorry.
However an alternative is to omit the Paint Cycle, then after the Document Complete event has been fired enable the paint validation Alter the DOM via the IHTMLDocument Interfaces.
You could use another method to download the content to a local dir, then use the CHTMLView to navigate to that resource, that will mean you must parse all the HTML yourself and retrieve the resources as well.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Now I know why I haven't found something in the docs. Thanks.
-widi
|
|
|
|
|
It IS possible to load HTML document into htmlview from ram - see great article in Internet section ... it's name is something like loading and parsing html document 3rd way or something like that.
It writes HTML from string into IHTMLDocument , you'll get pointer to that by calling CHtmlView::GetHtmlDocument( )
rrrado
|
|
|
|
|
Thanks for your help and sorry for my late replay.
-widi
|
|
|
|
|
Is it impossible to use the CDatabase class without creating a DSN first?
CDatabase db;
db.Open(NULL,FALSE,FALSE,
"DRIVER=MySQL;DATABASE=Nish;"
"SERVER=192.168.1.1;UID=nish;"
"PWD=nish123;PORT=;OPTION=16;STMT=;");
It keeps popping up a dialog box to choose a DSN
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
See Q165866 article "How to Use File DSNs and DSN-less Connections" in MSDN library.
Pavel
Sonork 100.15206
|
|
|
|
|
|
You can create the DSN at runtime and then destroy it. See my reply[^] to another question.
Pavel
Sonork 100.15206
|
|
|
|
|
See Connecting to SQL Server Technical article in MSDN. It has a paragraph DSN-less Connections.
Pavel
Sonork 100.15206
|
|
|
|
|
|
Outch, yes, I know this. Should have read the question more thoroughly
Pavel
Sonork 100.15206
|
|
|
|
|
After executing a query we obtain results in the recordset object. Can any one tell me that how can we know the total number of records in RecordSet object, and how do we retrieve this value ???
|
|
|
|
|
Hi,"what i call to you"
r u tried like this?
int nCount=0;
nCount=RecordsetPointer->GetRecordCount();
anju
|
|
|
|