|
ThatsMe. wrote:
in Dialog box i m using a ListCtrl and other controls like EditBox,TextCtrl,ComboBox.
i want if i click on ListCtrl than the relevant information show in other controls.
Handle the LBN_SELCHANGE notification from your ListCtrl.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
How can I get the windows Icon e.g. desktop icon, folder icon, my sharing folder icon etc.
|
|
|
|
|
|
Hi All,
Is there any API by which I could enable/disable the wireless adapter?
Thank you,
AJ
|
|
|
|
|
You can use WMI to do it. You can also make a call to DevCon[^], but DevCon is not redistributable.
|
|
|
|
|
Hi,
I am developing an installation tool with WIX programming.
I got an error Error CNDL0129: Schema validation failed with the following error: The element `Product` in namespace `http//schema.microsoft.com/wix/2003/01/wi` cannot contain text.
I couldn't find any reference for the above error.
Could you please give the solution.
Thanks in advance.
Regards,
Vijay
Help Ever Hurt Never
|
|
|
|
|
Hi all,
in property sheet i m using diffrent property pages so please tell me how can i move on next property page with the help of keyboard.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Press tab until the focus reaches on the title of property sheet, then use arrow keys to move to next page.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Using Ctrl + Tab You can navidate between the property pages.
|
|
|
|
|
Superb!
My 5 vote.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hai,
i am having a doubt.
How to capture and terminate a worker thread..?
Thanks,
Manivannan
Born to win...!
|
|
|
|
|
Google search and CP search will give you best answer.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Since its your worker thread, I hope you've the worker thread handle. Look at the place where the thread is getting created. Then you can terminate it by calling TerminateThread() .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: Since its your worker thread, I hope you've the worker thread handle. Look at the place where the thread is getting created. Then you can terminate it by calling TerminateThread().
This is bad advice which, unfortunately, is given way too often. See here[^] for details.
Steve
|
|
|
|
|
Steve,
I read the article. Didn't realized that its these much dangerous. Thanks a lot.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Try to avoid use of TerminateThread.
You can use some condition to return from the worker thread function.
May be you can introduce some flag and when the fag is set to false you can return from thread function. Whenever you want to terminate the thread just reset the flag variable.
You can use Events also instead of flag.
modified on Monday, May 26, 2008 3:57 AM
|
|
|
|
|
|
I have to read a property file to get the values from it.
I am creating a generic DLL program were I have to put the path for this properties file in such a way that it can be accessed from anywere.
At present I am hardcoding it like..
char path[]="c:\properties\file.properties"
Now if the dll gets created with this path and the properties file is in another folder. how do I access it. Please help me with some suggestions.
I have to make it generic.
THANKS.
|
|
|
|
|
One simple alternative is Environment variables . Configure an Environment variable and set the path in it. Your application will be reading the file path from the env var. So that you can modify the filepath at anytime without modifying your application.
You can also use registry for keeping the filepath.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Now I do it in this way...
char *prop_path;
prop_path = getenv ("file.properties");
and get the following error..
error C2501: 'prop_path' : missing storage-class or type specifiers
error C2040: 'prop_path' : 'int' differs in levels of indirection from 'char *'
error C2440: 'initializing' : cannot convert from 'char *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
How shud i get rid of them .please suggest.
|
|
|
|
|
Which version of VC++ you are using?
VS 2003 and above there are a lots of issues with cast between char* and wchar*. If you have a newer version try using getenv_s or wgetenv_s functions.
I am using Visual studio 2002 and the following code runs sucessfully:
char* envVarVal;
envVarVal = getenv("PATH");
AfxMessageBox(envVarVal);
In any case, be advised that getenv() and _putenv() only affect the environment variables for your own process.
They do not add system wide accessable environment variable.
In case you require that, instead of setting environment variables, try storing the path of the file in the registry.
only dead fish swim with the stream
|
|
|
|
|
Ok fine.. But how do I store the path of the file in the registry.
How does it work.
THANKS
|
|
|
|
|
|
pl_kode wrote: At present I am hardcoding it like..
char path[]="c:\properties\file.properties"
Might be u could put your DLL in to C:\windows and C:\Windows\system32 folder. but that would be not right approach, if your are comfortable in COM, that you could make com dll. it would surly available, when ever you make the call with right interface.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|