|
Have you tried to make a atl com dll
i have tried by i am unable to use it successfully
like some of the functions are working and some other are not do you have any idea
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
no sorry, you are in a more advanced position as me at the moment
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
u will have to use "_stdcall" calling convention while exporting the function from DLL.
|
|
|
|
|
Hello,
In our application,there is one spinbuttoncntrl is used to increase or decrease the values. When I open the application, i can able to increase and decrease the value depending upon the default values like if default value is 8, i can able to increase from 3 to 5, 4 to 7 .
But when I close and open the application the spinbuttoncntrl is disabled. Please assist me how to solve this.
Thanks in advance
Ratheesh
|
|
|
|
|
I don't know if I understand everything, but your seems a problem related to a bad initialization of that control.
Enable it in the VS IDE or programmatically using CWnd::EnableWindow() or CWnd::ShowWindow(SW_SHOW)
Russell
|
|
|
|
|
Thanks for your response. In a property sheet contains 5 tabs. First tab is General, this tab has the spinbuttoncntrl. When I open the application at firsttime, it enables and can able to increase and decrease the values.
But if i close the application and open it again, it shown as disabled.
Note: The 2nd tab also contains 5 spinbuttoncontrols, there i made some changes like increase and decrease also it enabled all the times. How?
Please assist me to resolve this issue.
|
|
|
|
|
rajaratk wrote: When I open the application at firsttime, it enables and can able to increase and decrease the values.
But if i close the application and open it again, it shown as disabled.
This makes no sense. Why should one "open" be different than any other "open?" What are you doing when the application is opened? When that tab is activated?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As David says, this makes no sense on its own.
Are you confusing Close / Open with Minimise / Maximise?
If not, then some action in your code is doing different things. Do you save values? Do a search in your code for the control ID of the spinbutton and see what you do with it.
Unless someone (ie, YOU) disables the control, it will be at whatever state it is set to be in the dialog resource. You need to track down where you disable it, and see why that is different in the two scenarios.
Iain.
|
|
|
|
|
Hello guyz,
I want to convert a CString to WCHAR but I don't know how to.
Can anybody help me with this?
Any comment will be much appreciated.
Thank you.
|
|
|
|
|
TooShy2Talk wrote: I want to convert a CString to WCHAR but I don't know how to.
It depends on whether you have defined _UNICODE in your application or not. i.e if _UNICODE is define, the CString internally keeps a wchar* itself. so you can simply copy from cstring to wchar_t[] usinf wcscpy() fucntion. If _UNICODE is not define, CString will be internally keeping a char* pointer and you have to covert this char* to wchar_t[] using MultiByteToWideChar() API.
|
|
|
|
|
CString -> CStringW ?
Russell
|
|
|
|
|
If Unicode is not defined, check out the A2W() macro. If Unicode is defined, you can simply use _tcscpy() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Sindse ATL 7.0 and MFC 7.0
You can use CStringW (or CStringA )
This code is valid for both Unicode and Multibyte:
CString cMyCString("Test");
CStringW cMyCStringW( cMyCString );
(LPCWSTR) cMyCStringW;
|
|
|
|
|
I am making a toolbar for a website. initially the toolbar is normal and when the user login the toolbar changes and takes the setting for the logged in user as is in the case of Yahoo.
If the user does not work on the website for 18 minutes i.e. if he takes no action he should be logged out and the toolbar should be in its initial state.
Now the problem for me is I am not able to track that no action has been taken on the website and the session of 18 minutes has expired and because of which I am not able to change my toolbar as a aresult of which what happens is that even if the user is logged out of the site after 18 minutes still my toolbar is having the settings for the logged in user.
I am using WIN32 ATL and WTL.
Please help me what to do.
Thanks in Advance.
Dhiraj Kumar Saini
|
|
|
|
|
I think this question would be better asked in a different forum, as it's not really a C++ coding issue - more of a html / webserver question.
Asking over in the Web Development forum would get people who know more than me looking at it!
Iain.
|
|
|
|
|
I have worked in both matlab & VC++ , the same pgm takes so much time when it runs in matlab than in VC++. one of my pgm runs 8 hours in matlab but just 6 mints in VC++.... y is it so??
|
|
|
|
|
Matlab is not an high performance software, it is build to be easy to be used, C++ is optimized during compiling.
If you want to run faster a Matlab routine you can try to write the code in a more optimized way (es. do not use 'for' loop when it is possible, but use matrix aritmetric like addictions or multiplications), then you can also try to compile it in a mex file.
But C++ will be always the fastest.
Russell
|
|
|
|
|
y it is so ? ya i have used matriz form . i wanna know exactly y matlab takes much complie time than VC++..??
|
|
|
|
|
not compile time...but execution time.
there aren't special rules...the only way is try to mesure the execution time (use tic; toc; on matlab)to find what function is slower.
But the general tip is do not use the keyword for , while , if when possible.
Russell
|
|
|
|
|
But Even v r using for, if , while keywords in c++ also??
|
|
|
|
|
it is a little tip that let you write faster matlab routines. In c++ you can use everything.
But, you know, you can write an optimized version of your program in Matlab... but probally you will gain half time(4hours)...surely you can't beat the C++ time (6min).
Russell
|
|
|
|
|
We have several cases where the Matlab-Version is not significantly slower than the C++-Version. Plus Matlab is easier developed.
You seem to have hit a point where recoding the algorithm in C++ gives real benefits.
But in our hands, whe had cases where the algos from 'numerical recipts" were actually slower.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Hi,
I am using VS 2005 on vista platform.
I want to set a registry entry located in HKEY_LOCAL_MACHINE.
The following function fails.
RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"System\\CurrentControlSet\\Control\\Windows",
0,
KEY_SET_VALUE,
&hKey);
The return value of the above API is ERROR_ACCESS_DENIED.
I have logged in as an normal user without any admin privilages.
I know this funciton is failing because I donot have the privilage to perform any write operation.
How do I get around this problem without having Admin privileges?
I want to modify registry value located in HKEY_LOCAL_MACHINE.
Could anybody help me with this issue?
|
|
|
|
|
I think that it is not possilbe ...you need Admin privileges (that is the reason why Admin exist)
Russell
|
|
|
|
|
U will have to execute ur application as "Run as Adminstrator".
Sachin
|
|
|
|