|
Can't you use SetTopIndex() instead?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Don't see a SetTopIndex() for CListCtrl
|
|
|
|
|
Ooops, thought you we're using CListBox. Never mind....
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I think EnsureVisible() could work for you. Save the top index using GetTopIndex, then use EnsureVisible( nTopIndex, FALSE ) to scroll it into view.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Bless you!
It only scrolls until the index is visible on the bottom, so I add the value from GetCountPerPage() minus one:
...
result = listControl->EnsureVisible(
topItemIndex + listControl->GetCountPerPage() - 1,
FALSE);
_ASSERT(result = TRUE);
...
Seems to work, even on 1000+ items.
Hopefully I'll get the time to rewrite to where only modified items will be updated...
-- modified at 10:41 Friday 8th December, 2006
|
|
|
|
|
Hi,
I wanted to ask a very simple question. Okay I am reading this article on video conferencing(http://www.codeproject.com/internet/videonet.asp[^]), I was wondering is there anyway I could integrate this into like a C# container. I am creating a eLearning system in C#, but I am forced to use C++ for video conferencing since the encoder has not been ported from C++ to C#. So is it possible for me to create the eLearning system in C# and just add video conferencing facility via c++. Thanks
|
|
|
|
|
Absolutely. One approach is to use C++/CLI. You can find all sorts of information on MSDN and here at CP. There is even a specific Code Project Forum for C++/CLI[^]
led mike
|
|
|
|
|
Revant Jain wrote:
So is it possible for me to create the eLearning system in C# and just add video conferencing facility via c++. Thanks
COM/ATL would be good start
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi all,
I am operating a Tab to Move the Controls in the Dialog, how can i detected that the Control is got Focused when i am using a Tab Control.
Example:
i am having three controls in a Dialog, i am pressing a Tab in the Key Board then the Cursor moves to all the Controls, here how can i detect that the Control have moved to the Third Control.
Any Ideas with GetFocus(...) Api,
Please help me out.
Uday kiran
|
|
|
|
|
Handle the WM_KEYDOWN event and check if its the tab key.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
uday kiran janaswamy wrote: ...how can i detect that the Control have moved to the Third Control.
Any Ideas with GetFocus(...) Api,
if (GetFocus() == GetDlgItem(hDlg, IDD_THIRD_CONTROL))
...
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David,
I am very Much Thankfull to give a great idea, Thanks a Lot.
Uday kiran
|
|
|
|
|
Hello,
I wanted to start learning WIN32API. Now before that could anyone pls recommend me a good C book. I am familiar with basics of C. If I read a C++ book, would that make a difference?
Thank you
|
|
|
|
|
All new programs should be written using C++, so you should learn it first. You should learn C just to be able to read other people's code.
It is better to learn C++ first without learning Windows programming. Then when you are familiar with C++ learn Windows programming.
|
|
|
|
|
|
I don't need to start.
Perhaps you meant to reply to Revant Jain, the person asking the question.
|
|
|
|
|
Sam Hobbs wrote:
t is better to learn C++ first without learning Windows programming. Then when you are familiar with C++ learn Windows programming.
good!
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
I want to know its my problem or no,did you change your sig ?
|
|
|
|
|
Forget to turn HTML oN ... how are you HAMID.. sorry belated hAPPY EID
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Thanks after two hard weeks today is holiday with a cloudy weather,by the way How are you? tommarow is holiday for you
|
|
|
|
|
|
Hi all,
I am using pure c++ functions in visual studio 2005 to create a window which behaves similar to a dialog.
I have the handle to this window. Does anyone know how to load an image to this window? the image can be either a gif/bmp format???
Sunil
Sunil
|
|
|
|
|
if you're just reading BMP, you can use LoadImage.
for GIF, you'll have to use one of the many imaging toolkits that are available. (or GDI+, if you can use that in your app)
|
|
|
|
|
You can use of CImage class
|
|
|
|
|
Here is the following code part of a COM object (in Visual C++ 6.0)
<br />
CFile filXML;<br />
CFileException e;<br />
if ( !filXML.Open(strFile,CFile::modeCreate | CFile::modeWrite | CFile::typeBinary,&e ) )<br />
{<br />
TCHAR lpError[256];<br />
e.GetErrorMessage(lpError,255);<br />
CString strError;<br />
strError.Format(_T("Cannot create file '%s' Cause:%d OS error:%ld Error:'%s'"),strFile,e.m_cause,e.m_lOsError,lpError);<br />
<br />
if ( pstrError != NULL )<br />
{<br />
if ( (*pstrError) != NULL )<br />
SysFreeString(*pstrError);<br />
*pstrError = strError.AllocSysString();<br />
}<br />
<br />
*pnResult = ERR_CANNOT_CREATE_FILE;<br />
return S_OK;<br />
}<br />
<br />
This has always worked. On one installation (called by an ASP.net application) CFile::Open returns false except I get 0 for the cause and -1 for the OS error. The file name seems fine (asp.net can create a file of that name)
Any idea why?
|
|
|
|