Great,great,great!!!!! 3 Hours of testing with those cra** scrollbars, its just one function.. Thx alot!!!!!!!!!
shibble
Posts
-
How to get the image from a clistctrl? -
How to get the image from a clistctrl?Yeah it works fine! thx! I got a new problem. I Fill a list control with stuff which is todo, i call it todolist. The size of the ctrl displays 3 items without scrolling (item count varies). I want to scroll to the current proccess item. I´ve tried alot but didnt get any good result. Here´s a code snipped:
m_nTodoItem=nitem; //Scrolling m_pCtlListTodo->GetItemRect(0,rect,LVIR_ICON); size.cy=0; //m_pCtlListTodo->Scroll(-5000); size.cy=nitem * rect.Height(); //scrollpos=m_pCtlListTodo->GetScrollPos(SB_VERT); //size.cy-=scrollpos; m_pCtlListTodo->SetScrollPos(SB_VERT,0); m_pCtlListTodo->Scroll(size); //scrollpos=rect.Height(); m_pCtlListTodo->Scroll(size); //m_pCtlListTodo->SetScrollPos(SB_VERT,scrollpos); m_pCtlListTodo->SetSelectionMark(nitem);
Sometimes just the bars scroll without the content. How to scroll dynamicly with considering user actions. Thx alot for help and sorry for bad english. -
How to get the image from a clistctrl?I do this @ doubleclick event:
LVITEM lvi; int nimage; int nitem; nitem=m_ctlServerList.GetSelectionMark(); m_ctlServerList.GetItem(&lvi); nimage=lvi.iImage;
The Problem is lvi.iImage returns always 0. -
How to get the image from a clistctrl?Hi, i need to get the imagenumber from a clistctrl on which i added a imagelist. At the OnDoubleClick event i need to get the imagenumber from the selected item. Is there any way to retrieve the number? I want to compare like if (imagenumber == CONST_BITMAP_FOLDER) { Send next command } thx!
-
Communicating with Excel (VC++ 6.0 MFC)Hi darkbyte, thx for reply!!! Your code is totaly correct ->SetVisible(true) If i dont use: ->SetVisible(false) Excel is hidden and not visible @ the Taskbar but i can see it in the Taskmanager as an active process. If i use: ->SetVisible(true) Excel appears in the Taskbar and is started as proccess and application in Taskmanager. My Question is: Is it possible to communicate with excel without having an running excel.exe proccess? I thought COM doesnt need an active procces to communicate. Thx darkbyte maybe anybody else can help too.
-
Communicating with Excel (VC++ 6.0 MFC)Hi, i wrote an application which can communicate with excel. I have build an dialog based project with automation. The next step was including the classes from a Type Library (Excel.exe). Now i can start excel via m_pApp.CreateDispatch("Excel.Application"); and select Ranges and Fill Cells. My Question is: How to communicate with excel without starting excel.exe (in Taskmanager as an proccess). Is it possible to do this. I heard a lot of COM i always thought automation means COM. My C++ Skills are not the best. I won´t use ActiveX elements in my Project. Is there any tutorial or can anybody help me to communicate with excel without starting a excel.exe proccess. Thx in advance. Sorry for bad english. Bye
-
Finding CRLF or other Characters in charThx alot!!
-
Finding CRLF or other Characters in charHi, iam a beginner to visual c++ and i think i have a simple question: i want to search a character in a char variable. like
switch (&mychar) { case CHR(13): MessageBox("found"); default: MessageBox("Not Found!"); }
In VB i could compare like if mychar = Chr(13) then ... Can anybody call me the functionname of Chr or Ord or ASC in MFC c++ 6.0? Thx alot!! Bye