|
hey mike
can u please help me its very urgent and i have to submit my project of activex the only thing left is calling javascript function from activex.
Please help me.
|
|
|
|
|
See here and here and here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hey david
the links u send are not much help for me.i only want to know how to call my javascript function from my mfc activex control.please help me its very urgent.
|
|
|
|
|
Hello,
I have a problem with a program I'm working on where I am using a couple of dll's to share functions. My question is how to overcome the problem when one dll is written using unicode and the other is not using unicode.
As it seems to me, the problem is that the linker does not recognize the function created in the other dll (even thought it is defined in the same header).
I have tried turning off the Unicode and this will work.
This is what is defined in the StdAfx.h file in the project using unicode.
#define _UNICODE
#include <tchar.h>
#define UNICODE
#include <windows.h>
When I comment out the _UNICODE and UNICODE definitions I will compile but when they are present I get the error
LNK2019: Unresolved external symbol "__declspec(dllimport)int __cdecl SomeFunctin(wchar_t*, int)... "
The function that I am trying to reach has the following header definition
int SomeFunction(_TCHAR *pszPath, int accessMode );
My guess is that the _TCHAR has different definitions (for some reason) when using unicode and not using it since the compiler seems to expect the function to use wchar_t* as first parameter and not _TCHAR*
Anyone who has any ideas about how to solve this?
|
|
|
|
|
Change the headers so that the character encoding is hard coded to what it actually is in the compiled DLL. Based on your comments, this is probably what you want:
int SomeFunction(char* pszPath, int accessMode );
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
If you're mixing them, then you're going to have some fun...
While it is good practise to use TCHAR so you can make unicode / non-unicode apps from the same code base, there's nothing stopping you explicitly using char / wchar_t, and the A/W versions of function names.
So you could do...
#include "stdafx.h"
#undefine _UNICODE
#undefine UNICODE
#include "MyNonUnicode.dll"
#define _UNICODE
#define UNICODE
#include "MyUnicode.dll"
...
This will be a bit confusing, but it can be done.
I'd try and make them be more uniform if at all possible though!
Have a look at http://www.codeproject.com/KB/string/cppstringguide1.aspx[^] for more information on TCHAR and friends.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Iain Clarke wrote: While it is good practise to use TCHAR so you can make unicode / non-unicode apps from the same code base,
There is really no reason to make non-unicode apps any more. These days I simply use wchar_t for UTF-16 (on Windows) and char for UTF-8 and legacy 8-bit encodings.
|
|
|
|
|
In our team, We Develop/maintain a CAD software develop in VC++.
We converted the entire code to VS2005 for vista support.
All our modules are working fine.
But in very few test machines, we continuously work for 1hr, the
operation of dialogs in our software is dead slow.
We use Sql sever 2005, as the data base.
We analyzed and found that, many message handles are in queue,
due to which when we press a button it takes more time.
This time is more when change of focus is from an edit control
to a button.If it is between a button and a button its normal.
We also checked for memory leaks and fixed.
It seems to be a very rare bug but unable to find the reason for it.
Please ask me if you need any further details.
Thanks in advance for your help.
Its a very critical issue for us.
B.s.siva kumar.
|
|
|
|
|
*Vista sucks.
Disable all UI effects, Stop all unnecessary background services. And check again?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
We have remove all the UI effects and disable many unnecessary services.
Still it is slow.
B.s.siva kumar.
|
|
|
|
|
Did you check these?[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
hi, I have checked all these and done the required tweaking operations
Can This slow down be because of any memory leaks in my software?
What I found is the kill focus from an Edit Control to a Button
in a dialog is slow.
Between button and button it is faster.
Also all the mathematical operations/Calculations are so fast.
Only resource i.e dialogs are slow.
It seems to be an unusual bug and unable to resolve.
Can you please suggest.
B.s.siva kumar.
|
|
|
|
|
Thanks for Reply.
We are using DDE Communication between 2 applications.
can this cause any slow down in vista?
B.s.siva kumar.
|
|
|
|
|
I suggest you measure a single communication operation (if possible the most relevant one), then:
- either measure same on non-Vista;
- and/or multiply it by the estimated number of such communications and compare with the total time the app takes.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
How can I display a flash file in dialog control?
I am using VS 2003
|
|
|
|
|
What about our wonderful article search engine? [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Step1[^]
Step2[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I am trying to read the Unicode output from an application.
the application writes strings out to a .txt file using :
L"Date, Time, 150"
I am trying to read the value of the number, but since it is unicode, this is not a straight ReadFile operation. Is there any way in MFC to do this nice and clean. I know C# has some built in functionality to make a conversion to interpret the text.
Thanks,
|
|
|
|
|
Every (or at least most) text-file read operations have their widechar (unicode) versions, like for fgets there is fgetws. Did you try using those?
> 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. <
|
|
|
|
|
You just need to specify the number of bytes to read in the ReadFile API.
Unicode and non-unicode is decided based upon how it is interpreted.
So you're probably not giving the correct number of bytes to read.
Try doubling it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You mentioned MFC so I suggest you use CStdioFile to read text files. You have to set the flag CFile::typeBinary in order to read Unicode strings and of course your app has to be Unicode enabled.
|
|
|
|
|
When you say that the app has to be Unicode enabled, do you mean building it as Unicode as opposed to release?
|
|
|
|
|
You have to define _UNICODE and UNICODE and you have to set the Entry-Point symbol in the Linker output options to wWinMainCRTStartup
That's for both configurations, Release and Debug.
|
|
|
|
|
Oh i see... So if i just do this:
"You have to define _UNICODE and UNICODE and you have to set the Entry-Point symbol in the Linker output options to wWinMainCRTStartup"
Is that equivalent to building as unicode or does that serve a totally different purpose relating to the output of the application?
|
|
|
|
|
LCI wrote: Is that equivalent to building as unicode
Yes.
The output of your app depends entirely on the functions/classes you use for writing to files.
|
|
|
|