I need to get window with focus! Does focus change when hot-key is pressed and that event triggers my app? Anyway, my app. needs to get the pointer of the window who had the focus at time of triggering!
I have written an TDI server program, which is not able to accept any connection although listen succeeds. Given below my sample code. Please help me in figuring out where i am wrong or if possible suggest me for some good source link.
Actually you are trying to save the image name along with each list control item, right? SetItemData is holding only a 4 byte value. We are using this to hold a pointer. Here in your case, it is a pointer to the string. Since the string is local when you exit from the function, the pointer will not be valid. So the stored pointer has no use.
One solution is that you can dynamically allocate the string in heap (using new CString). But need to delete the memory when you close the window, or delete the list control item.
Another method is that you can use a CStringArray object as member variable. Then you can store each string in the array and can keep the index in the list control item data. Here also removal of the string item from the array is needed, if you delete a list control item (just for saving the memory).
If I am developing a native unmanaged COM using Visual Studio 2005 C++, is it a mandatory to register type lib into HKEY_CLASSES_ROOT\TypeLib?
I have already registered related entries into HKEY_CLASSES_ROOT\CLSID\<co clas="" id="">, HKEY_CLASSES_ROOT\Interface\<interface id="" of="" co="" class="" exposed=""> and HKEY_CLASSES_ROOT\<co class="" name="">.
What is the function of the entry under HKEY_CLASSES_ROOT\TypeLib during COM object discovery and creation process?
Unhandled exception:Stack overflow.It is due to the declaration of too large array sizes.
But how can i overcame that problem
The code presented here is given below:
unsigned int blueValue=0,redValue=0,greenValue=0;
unsigned int grayValue=0;
unsigned char *pChar;
unsigned char someChar;
long int iHist;
long int total_pixels=0;
your loop seems to exceed the array boundarys.
debug it and see.
how ever arrays of that size are not suggested.
please tell me your idea behind the algo, such that, i can suggest you something.