|
hi.. i was wondering if anyone in here could help me with my little problem.
I need to create a console application (in MS Visual C++ 6) which will launch in full screen, not maximized, and i cant figure out how to do this.
|
|
|
|
|
you could open it and then send alt+enter
Don't try it, just do it!
|
|
|
|
|
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?
|
|
|
|