|
Appears so;)
I would like to know as to realize the Com-interface for control Mediaplayerîì in environment VC ++ with ïîìîøüþ for example ATL (for VBapps). In MSDN there is an example of implementation where it is possible Play, Stop, Reset- "Funktionen" and path to Avi or MPG for the file to call. I would like to add a capability of reproduction from a definite position of film,, forward and back from THIS position, transition to first and last to staff(frames). And also definite staff forward and back, the temporary coordinates for this listing should be transmitted with events To today I only has created a function Play (double Ze) through parameter by which one transmits value of a position. But as âñ ¸ it in link.. I do not represent: ((it be necessary Property-Variable to insert that the flow bundle was between these functions..
Thanks by All for advices
|
|
|
|
|
Hi together
I despaired almost. I tried a ATLMOVIE-example from MSDN to represent. But it was not possible to me ((
Again and again as I by means of ATLWISARD uner VS6.0 vc ++ have created, then testkotainer has invoked, at last I direct a filename - property(VT_BSTR) something to and invoke kclickte, it drops with ((. But (however) in " the original - proggi " something to select. Probably I put aside money that falch at Ertsellen either AtlObjekt or AltProjekt.aber What???
I require it that the project with events to create, and I do not know as to consisting ATLOBJEKT Events add
Thanks by All for advices
|
|
|
|
|
I can't to access to global variables in my dialog project from all the classes.
If I define them in header file and call this file from all the dialogs of the project -the compailer cry that it is already defined,
So,The same,if I define it in some source files(cpp).
and if I define it only in the main source it shout that there ara undeclared variables
when I use in this global variables ???
I tried to put the declarations of this variables in CWinApp, too
and this did not success too,
Who can help me ????????
WHAT HE WANT THAT I WILL DOING ?????????????????????????????
|
|
|
|
|
There are a variety of methods to do this but here is one that I use and it works for me. In one header file that all the source files include do this :
#ifdef DECLARE_GLOBALS
#define Global
#else
#define Global extern
#endif
Then you declare your global variable like this :
Global YourType YourVariable;
Now here is the really important part. In one and ONLY ONE file, typically the application class source file, you place this definition :
#define DECLARE_GLOBALS
right BEFORE you include the header file with the variables.
What this does is make the global variable declaration an extern in all files except for the one where the official, non-extern declaration occurs. So, this one file will look something like this :
#define DECLARE_GLOBALS
#include "YourHeader.h"
It is REALLY IMPORTANT that only one file has the DECLARE_GLOBALS definition. Otherwise you will get multiple variable declaration errors.
|
|
|
|
|
You can define some global variables in cpp file,and in other cpp files you can use "extern " import these global variables.
for example: if you define a variable
"int global" in the test.cpp file.you can use this varible by using
" extern int global " in the mytest.cpp files.
|
|
|
|
|
Hello, the codegurus around the world.;)
Why do you want to use the global variable?
As long as we work as C++ project, we don't need to use the global variable so much?
Or, if you work as C project in the dialog application, we may need the global.
In fact, I also use the global variable in my C++ project.
1) The previous developer often uses the global variable.
2) Object->variable seems not to be good if Object has a long name.
((CMyMainFrmae*)AfxGetMainWnd())->Other->Other1->Other2->variable
If we assign this as the class member variable to Object, we do this one time, but
the current project seems to be complicated if I try to change these.
Anyway, my point is that if you work as C++ project, you may not use the global variable
so much since it is easier to maintain the code if we use the class memeber variable.
I didn't mention about "extern" since the other people pointed out this already.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
It's nice to talk about why it's a good thing or bad thing to use global variables, but the simple truth of the matter is that sometimes it's faster to do so. Besides, we can't really sit here and critisize a guy because he wants to use global variables because we don't have the benefit of seeing his project in its entirety. We therefore cannot propose a "better course of action" nor recommend that he not proceed on his current tack.
|
|
|
|
|
I tried your advices but this DONT WORKING with the extern global.
as annonomous said. what can I do ???
|
|
|
|
|
The advice that has been given to you ( using extern for a global variable/using AfxGetApp() to get a pointer to your app object to access variables stored there) has been good, and correct. If you are incapable of making it work, then there is a problem with your ability to apply the information provided. Therefore, what you can do is post some of your code here, so that someone here ( I'm more than happy, and I'm sure others are the same ) to cast our eye over your code so we can show you what you are doing wrong.
Christian
#include "std_disclaimer.h"
|
|
|
|
|
Did you try what I posted ? It is not clear that you did since you did not reply to my post. I have written thousands of lines of code that use this very convention and I know for a fact that it works.
|
|
|
|
|
Hello, the codegurus around the world.;)
I agreed with you partly because I admitted that the global variable isn't bad
in C++ project.
However, in Java and C#, we can't use the global variable at all.
Global variable is always called even though we don't need this.
However, the member vairable of class is alive as long as the class object is alive.
If someone overwrites the value of the global vairable, we sometimes don't notice this.
However, the member variable of class only overwrites the value by its class object.
(If we declare the member variable by private.)
I guess that the global varibales exists in MFC library, so we can't neglect the global at all.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
As you may know from reading my other post, I'm developing a client\server app. Well I am stuck on how to manage a database of users. I don't know whether each server should have each server have an embedded database engine and allow them to connect to each other to query each other for user authentication or to make a database server which will manage the list of users. The servers will be in diffrent geographic locations.
Thanx in advance.
Stephen Caldwell
Desick Information Technologies
|
|
|
|
|
when we did something similar we had a central authentication server (can have fall-over backups too) that would the username & password thing ... if a user was verified this server would respond with an access token as well as an ip address and port number for the client to connect to for the actual service ... the server they log on to gets sent the access token from the client which it then tries to verify with the authentication server
hope thats clear enough (was at a party last night) ... not saying its the best way to do things but it worked
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hello, the codegurus around the world.;)
Hum, this question sounds like IM Messenger.
Actually, I used to make Client\Server application on my school project for a long time ago.
And I enhanced Server can access Access Database. (but, not thread safe. )
That is, the client types user id and password, and server queris these from Access database.
So, now I have an idea to enhance this application to IM Messenger.
So, Central Server gets the dynamic IP address and port number if the user login Internet.
And these data goes to SQL Server.
So, acutally, the user's client application includes the server program to commnicate to
the other client machine.
This sounds like COOL.
I guess that Napster uses the same concept.
However, Gulant(?) uses the multicase approaches to find the client.
This is more cool, isn't this. More .
This is mainly because Culant doesn't need the central server.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
the reason we had a central server was for authentication services ... it allowed us to keep all authentication databases on a single safe server ... the load wasn't much as it only authenticated and then handed off to another server / port
we also used port switching if we detected an unauthorised connection ... we assumed it was an attack and instructed all clients to switch to other ports
worked quite well
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I'm trying to add MySql connectivity to my application, but i don't want to have to use ODBC. When i ad the mysql++ header file to my application i get these errors:
d:\development\sources\mysql++\mysql\include\mysql_com.h(115) : error C2146: syntax error : missing ';' before identifier 'fd'
d:\development\sources\mysql++\mysql\include\mysql_com.h(115) : error C2501: 'SOCKET' : missing storage-class or type specifiers
d:\development\sources\mysql++\mysql\include\mysql_com.h(115) : error C2501: 'fd' : missing storage-class or type specifiers
I include winsock2.h but all that ends up doing is causing redefiniton errors in the rest of the app. I was able to find a way to get it to compile, but whenever I try to use a certain class i get this:
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char=""> >::~basic_ios<char,struct std::char_traits<char=""> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined
in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::basic_iostream<char,struct std::char_traits<char=""> >::~basic_iostream<char,struct std::char_traits<char=""> >(void)" (??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ) a
lready defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_iostream<char,struct std::char_traits<char=""> >::basic_iostream<char,struct std::char_traits<char=""> >(class basic_iostream<char,struct std::char_traits<char=""> >::basic_streambuf<
char,struct std::char_traits<char> > *)" (??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char=""> >::~basic_streambuf<char,struct std::char_traits<char=""> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ
) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(void)" (??1?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in mysql++.lib(connection.obj)
libcp.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
etc...
Has anyone found a way around this bug(?)?. Could suggest a better way to manage a database without using
mySql. I can't use Access so don't suggest it. Thanx in advance.
Stephen Caldwell
Desick Information Technologies
|
|
|
|
|
use msde
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hello, the codegurus around the world.;)
What is MSDE?
Just kidding.
As far as I know, MSDE only works for the test on Client machine.
So, I guess that we can't use MSDE as SQL Server does on Window NT Server.
One more thing.
Don't update to the beta of SQL 2000 from MSDE CD
This overwrites ADO library, so we must rewrite the code.
If we have VC++, we can get this free MSDE CD.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
As far as I know, MSDE only works for the test on Client machine. So, I guess that we can't use MSDE as SQL Server does on Window NT Server
MSDE runs on both Win NT workstation and Server, and is 100% compatible with Sql Server 7.0...
Is is a Sql Server 7.0, just with some performance limitations.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hello, the codegurus around the world.;)
You're right partly.
I mean that the client can't access MSDE through the network, can it?
If MSDE works as SQL Server, we don't need to buy SQL Server at all.
MSDE is only the test Database server if the developer makes a test for his or her code to
the client enviornment. (127.0.0.1).
So, MSDE works on Window NT server, but this is only for the local host enviornment.
If i am wrong, I'm happy since I don't need SQL Server at all.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
You are wrong...
MSDE is not for test... On the MSDE CD there is a Sql Server 7.0 Developer Edition, that you can use for test. MSDE is for production.
It works perfectly over network, just as the "real" SQL Server.
But, when more than 10 clients is connecting to MSDE at the same time, it starts to get way slower than the "real" Sql Server.
If you only are 5 persons in a business, there is NO difference in the use of MSDE and Sql Server... (except that there are no admin tools installed when you install MSDE)
Trust me, I know MSDE as we use it on some of our solutions...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
hey anders
where did you get the info about slow-down after 10 users? we use msde in production too (thats how come i knew masaaki was in error too) ... and i would like to know some definitive source of info (if there is one) thats states the 10 user issue so i can give reasons for some of our clients to foot the upgrade bill if required
thanks
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
|
I have a CHtmlView based app. How can I detect when the app creates a download file dialog? I would also like to get the url of the file it is trying to download.
Thanks in Advance
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Hello,
I was wondering if someone could point me to the documentation that describes what DATA specific MESSAGES pass to there call back functions.
Example:
A ListCtrl has the message of NM_CLICK. It gets mapped to a fucntion like this
CMyDialog::OnClickList(NMHDR* pNMHDR, LRESULT* pResult)
Now How in the hell am I supposed to know what type of data pNMHDR is pointing to?
I guesse it is pointing to a LPNMITEMACTIVATE, but the only reason I know this is becuase i found it in someones code, not in any documentation.
This question is not focused on a CListCtrl. Im talking about any MFC contro;. What are the are there passed arguments pointing to??
Is there documentation on this? Am i just blind and its right in front of me?
Any Help would be appreciated.
Thanks.
|
|
|
|