|
Doh!!! my bad..
So.. is there any way you can pass this command to the application so it does it by itself?
|
|
|
|
|
Check SetConsoleWindowInfo
You might need
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if ( hConsole != INVALID_HANDLE_VALUE )
{
// do the dance...
...
}
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Ok.. Thanks to both of you
I'll try to take a look on it
|
|
|
|
|
Would SetConsoleWindowInfo() be of any help?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I am trying to get into view the last bit of text posted to the multiline Edit Box via these lines of code:-
m_strOutput+= m_strGeneral + crlf; // Total display string; adding m_strNewText at the end
SetDlgItemText(IDC_OUTPUT, m_strOutput); // Display the new text appended onto the old text
m_Output.GetScrollInfo(SB_VERT, &scrollInfo, SIF_ALL);
scrollInfo.nPos = scrollInfo.nMax;
m_Output.SetScrollPos (SB_VERT, scrollInfo.nPos, TRUE);
UpdateData(); // Refresh the control
m_Output is the Edit Box and I was trying to set the scrol position to the current maximum, but no luck.
|
|
|
|
|
You need to set your scrollinfo structure size and variable you need to get in your struct.
si.fMask = SIF_POS; //for instance you need the scroll pos
si.cbSize = sizeof(si); //this is pretty weird but required according to MSDN.
same thing goes to SetScrollInfo
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Why are you calling both SetDlgItemText() and UpdateData() ? A simple call to m_Output.SetWindowText(m_strOutput) will suffice.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Ok thanks for that, but still lost in the scrolling problem.
|
|
|
|
|
scrollInfo.fMask = SIF_POS;
scrollInfo.cbSize = sizeof(scrollInfo);
m_Output.GetScrollInfo(SB_VERT, &scrollInfo, SIF_POS);
//just change the mask if you need other info
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
I tried the following code, but it only placed the thumb at the button, I still had to use the mouse to have the lastest posted data displayed.
m_Output.SetWindowText(m_strOutput); // Display the new text appended onto the old text
m_Output.GetScrollInfo(SB_VERT, &scrollInfo, SIF_POS);
scrollInfo.fMask = SIF_POS;
scrollInfo.nPos = scrollInfo.nMax;
scrollInfo.cbSize = sizeof(scrollInfo);
m_Output.SetScrollPos (SB_VERT, scrollInfo.nPos, TRUE);
Do I need to do something else?
grahamfff
|
|
|
|
|
try to get the every API working before throwing everyhing inside.
Does
GetScrollInfo(SB_VERT, &scrollInfo, SIF_POS); API work?
check the return value
if yes, then,
check if
SetScrollPos (SB_VERT, scrollInfo.nPos, TRUE);
work by supplying a simple nPos value like 100.
You might also consider using
m_Output.PostMessage(EM_SETSEL, 0, 0); //the caret position
Remember to start from simple or else you get lost somewhere.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
I’m in need to know what signing a ActiveX realy means and how to make it possible. Have searched MSDN and read some stuff, but am in need for a good article or something to fulfill my understanding.
All notices are welcomed!!
...and justice for all
APe
|
|
|
|
|
is it regsvr32 your.ocx?
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
No.
Not register.
How to sign?
...and justice for all
APe
|
|
|
|
|
I came across this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaxctrl/html/msdn_signmark.asp
in MSDN.
hope this helps
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Ditto!
Ant.
|
|
|
|
|
Just saw that also, man
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
...and now I've seen it, for the first time.
Loocks excactly whar I needed.
Reading it now - Thanks
...and justice for all
APe
|
|
|
|
|
|
|
In C++ when using the array index overload operator, is there any way to tell if the operation is a lhs or rhs based.
for instace, assume
class intArray {...};
intArray intA;
and assume that intArray::operator[] has been defined
can I tell the difference between ...
int a = intArray[1];
... and ...
intArray[1] = a
... in the method. If so, please can you state how.
|
|
|
|
|
it is always the same.
<font style="color:blue;">int </font>Array[1] = a;
is equivalent to :
<font style="color:blue;">int </font>(Array.<font style="color:blue;">operator</font>[](1)).<font style="color:blue;">operator</font>=(a);
only ++ and -- operators have a way to tell if they are pre or post incrementation/decrementation :
<font style="color:blue;">const</font> T& <font style="color:blue;">operator</font>++ (T&); <font style="color:green;">
<font style="color:blue;">const</font> T& <font style="color:blue;">operator</font>++ (T&, int); <font style="color:green;">
TOXCCT >>> GEII power
|
|
|
|
|
when define operator[] The Debug version of the library asserts if the subscript (either on the left or right side of an assignment statement) is out of bounds.
it limits your index of array ,normally between 0 and up bounds,once beyond ,will be asserted error flow
understand?
|
|
|
|
|
It's customary to write two [] overloads, one const and one not:
class X
{
public:
X& operator[](int n);
const X& operator [](int n) const;
}; The non-const version will be called for l-values, or r-values that contain a non-const X. The const version will be called for r-values that contain a const X.
Unfortunately you can't really tell from the non-const version whether it's returning an lvalue or rvalue.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.
-- Michael P. Butler in the Lounge
|
|
|
|
|
I have a MFC Dialog based application which will update a Edit Box when an event is set. A thread is waiting on this event.
But how do I call a procedure from this thread to update this Edit Box.
2 questions;
1. How should this procedure be written (member of dialog or not)
2. I can pass in some data via a structure when I create the thread, but how can I pass in either a pointer to the Dialog or this procedure.
I did try passing in the dialog 'this' pointer but could not see the procedure;
CMyDialog::UpdateData() This is the update data procedure.
I am stuck - help
|
|
|
|