|
"_$h@nky_" wrote: I m already try this but its not done.
Like... What did you try? Show the code.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: Show the code
Yes, sir.
|
|
|
|
|
Hi all,
In my program, I have the following statement:
ISearchResultPtr spIsr = spWuSearcher->Search(criteria);
Most of time, the program will excute successfully, but when "criteria" is _T("UpdateID='12345678-9abc-def0-1234-56789abcdef0'"), then spIsr->Updates->Count is 0, but not 1 which is the right value.
Is there anyone who knows why or when this happens?
NOTE: I'm sure the "UpdateID" is right.
Any reply is appreciated.
Thanks a lot
|
|
|
|
|
Is there any way to find out which logical drive is in use by windows or is opened in Explorer in C++ ?
Thanks,
Kushagra
I hate coding but I love to develop
|
|
|
|
|
|
Actually ,
I wanted to know if that logical drive is opened in explorer even if no file inside is in use. It can happen that we have just opened C:\ drive in explorer but we are'nt using any folder inside C:\ but still that drive remains open ...can you help me for this specific case too
Thanks,
Kushagra
I hate coding but I love to develop
|
|
|
|
|
Kindly help me out in this...
Regards,
Kushagra
|
|
|
|
|
If my pointer is pointing an invalid object. How to find proactively in run-time.
|
|
|
|
|
there are some memory check functions as _CrtIsValidPointer()
It is strongly recommanded to avoid this situation. use pointers to data, only for copying the data, if you need it later. -> make your own object
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
To check the validity of the pointer in Windows there are API functions called IsBadReadPtr and IsBadWritePtr to do that.
P.S. While using pointer developer should be careful that pointer is set to NULL once it is deleted. And not to use the deleted pointer before allocating memory.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
There is no reasonable and fool proof way to make this check.
You as a programmer must ensure that this never happens.
Smart pointers can help you to an extent.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have ported my activex plugin to 64bit by compiling with x64. it has created .ocx file as well as .dll file.
Created cab and inf file to install my activex plugin.
When i install it crashes.
I ran dependency walker on .ocx file it says
two dlls not found...
devmgr.dll dwmapi.dll
please let me know how to resolve....
|
|
|
|
|
for(i=0;i=printf("Hello");i++);
printf("Hello");
how many times hello will be printed?????????n why?
|
|
|
|
|
it is an endless loop, the condition is always true.
In
i=printf("Hello");
it will always be 5.
|
|
|
|
|
syntax of printf is
int printf ( const char * format, ... );
so it returns the size of the characters displayed, here "Hello" number of characters is 5.
since
for ( i = 0; i = 5; i++ ) is condition on execution.
now u can see that i=5 is condition which will never ends, so its a infinite loop
|
|
|
|
|
Hello everybody
iam creating a dlu plugin, in that, iam storing values in a structure. i need to access the same values from another plugin (exporter plugin, dle). how to access that?
|
|
|
|
|
Hi,
I want to create a simple client server application by using CAsyncSocket class of MFC to send and receive messages(data) through internet connection. I found a lot of stuff for this at .net plateform but I want to do it in VC++ ( with out .net support).
I found article at this site helpful but could not make the application working.
http://www.codersource.net/mfc_window_socket_programming_server.html[^]
I could not figure out the sequence of operations properly even after having some time with msdn as well. I remember in old days there was a book named "VC++ in 21 days" and it has a chapter related with client server application.
Any link where I can find an MFC based code for the stuff or any tutorial for this work.
|
|
|
|
|
|
Thanks. This link helped me a lot and I sucdeed in extracting the required knowledge and code form it.
|
|
|
|
|
I have a dialog box on which some Edit boxes are there.
For validation of values in edit boxes, i have handled EN_KILLFOCUS.
When EN_KILLFOCUS is called, value in edit box is validated.
If validation fails, then AfxMessageBox is displayed "Input value is in correct".
The problem is when i press ALT+TAB and switch to another application, the Afxmessagebox is re-displayed because EN_KILLFOCUS is called again.
Please let me know any solution to be handled in EN_KILLFOCUS so that Afxmessagbox is not displayed.
Thanking you in advance.
Regards,
Sharda.
modified on Friday, July 24, 2009 12:41 AM
|
|
|
|
|
Generally it is not a good idea to validate user input on focus loss, for example see here[^]. In the old times when i tried to do the same i ran into all kinds or troubles myself. If you can i recommend rethinking your validation system.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Yes your right...I also know it that validation in kill focus is not a good idea....but still i have to do it because its an requirement...
Please suggest be some idea to handle this situation....
|
|
|
|
|
I guess if it was easy to solve it wouldn't be a problem to validate on focus loss. You could try to check if the window who gets the focus belongs to your application or not, or maybe check if your aplication is the active application on the syatem or not and not display the message if it is not. Do these make any sense?
How about a different aproach? Don't display a message box but change the errorous edit field's background color to red for example, and maybe have a static field or such placed somewhere on your dialog that explains to the user what is wrong with the edit field, maybe show the error message in a tooltip when the user points his mouse at the edit field. Or is the message box itself also a requirement?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
validating data is done in the OnOk(). If the data is invalid, dieplay a message and DONT close the dialog. (I am setting the focus to the invalid data to help)
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|