ok i remouve spaces !... works ! but my same problem remain how to find in the other columns FindItem column 1,2 how when i find this my problems , i thing ... will be solved !
My code find only in first column (0) and give me the text from others all i wanth is to search in others columns 1,2 ... and thank you so mutch for your help ,you have no ideea what is that for me !Thanks again !!!!
CListCtrl::GetItemText has two items or four items index of item(one parameter) and nSubItem(two parameter)
now if you used this function in the loop you can find your item in another colunms and need to check this string with your string
(like InsertColumn or InsertItem that you can see two parameter)
I have insert a active-x control in my dialog based application.
Through which i got the class caapi aapi.cpp and aapi.h
And i am able to call all the function which are in aapi.cpp thruogh wDlg.cpp by declare a object of aapi.
When i right click in active-x button it display all the events of function which are present in aapi.h/.cpp.
I dont know how to make use of that events or how to make connection between these events and my application.
Can u help me or any link .Thanks
Actually I am facing a problem where I am trying to port a VC6 code to VC8. In My VC6 code I was passing an iterator to the SendMessage just by typecasting it to WPARAM. But VC8 compiler is allowing to do this and giving me error saying..
error C2440: 'type cast' : cannot convert from 'std::_Vector_iterator<_Ty,_Alloc>' to 'WPARAM'<br />
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Windows have message driven architecture basically. Messages are nothing but events (in VB). For every action a window will get a message like, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE, WM_MOUSEWHEEL etc., The above said messages are mouse click events that will be sent to a window if user clicks on it. Say, if a user clicks on a window... that window will get WM_LBUTTONDOWN message first and WM_LBUTTONUP when he release it. With this message additional information like X,Y positions where the user clicked also will be sent to that window.
Ok... now come to SendMessage() function. SendMessage function is having as u said four parameters,
LRESULT SendMessage(HWND hWnd,UINT Msg,WPARAM wParam, LPARAM lParam);
here hWnd is the handle to the window where you want to send the message
Msg is the Message as above said WM_LBUTTONDOWN or WM_LBUTTONUP (see msdn for all messages starting with WM_XXXXXXX)
wParam additional information
lParam additional information
for example, let us send a message to a window like user ctrl+clicks on it...
wParam and lParam will vary depends on the message you send. For WM_CLOSE, no need for wParam and lParam, so ::SendMessage(hWnd,WM_CLOSE,0,0); will close the window.
As our Friend Parthi said, difference between SendMessage and PostMessage is, SendMessage will send message and wait till the window process the message. PostMessage will post the message in the message queue and wont wait anymore.
I think the reply is pretty long, but clear enough.
if((insidepoint == true ) && (nFlags & MK_LBUTTON))
old = dc.SelectObject(&one);
dc.Ellipse(OldPoint.x+ array,OldPoint.y+array,(point.x + array),(point.y + array)); // Here the Position is not getting Correctly
dc.Ellipse(OldPoint.x+ array,OldPoint.y+array,(point.x + array),(point.y + array)); //A slight Difference in Position I cant Understand why this happens. please help me out.
OldPoint = point;
DrawPixel(); //Call this Function to Paint the Back Ground
GetClientRect(&rect); //Capture the Image of the Screen what we Want
nRet = dcMem.CreateCompatibleDC(&dc);
nRet = bmpMem.CreateCompatibleBitmap(&dc,rect.Width(),rect.Height());
CBitmap *pOldBmp = (CBitmap *)(dcMem.SelectObject(&bmpMem));
int index = -1,ind=0;
for(int i =0; i< strCollect.GetSize(); i++)
strReadBuffer = strCollect.GetAt(i);
index = strReadBuffer.Find(",");
strTokenizer = strReadBuffer.Left(index);
strReadBuffer = strReadBuffer.Mid(index+1);
index = strReadBuffer.Find(",");
}while(index != -1);
I can run your code one black page with dots and (it doesnt work i change bEllipseFlag/insidepoint/circleDrawn to true)and when i lbutton it draws a circle but i think your code needs a lot of works for move circle(and...) in the OnLButtonDown you have a for that i think its for move you have a cstringarray that i think you get four numbers in this array and convert them for CreateEllipticRgn but how do you move circle,now:
I have a suggestion for you see this[^] i think your program needs to another things (for example when you draw your circle aftre draw you want to change size of previous circle or need to undo/redo and ...) i dont know you want these things in your program or no but if yes see this link
(2)you want to draw a circle and drag and drop well you can draw your circle and set this circle or circles to a control or controls like static and use from drag drop
Last Visit: 5-Aug-20 0:22 Last Update: 5-Aug-20 0:22