|
Are you performing ANY other operations on that control? If your doing the CloseWindow on it, take it out. Do ONLY ShowWindow. Also, I am assuming that there is not another control in the same location as the bitmap control in your dialog, or is there? If the bitmap is behind another control, and it is lower in the tab order, it will not show even with a SW_SHOW, you will need to SW_HIDE the other control. Aside from that, I don't have a clue.
|
|
|
|
|
My static control(bitmap) in my dialog box hidden for ShowWindow(SW_HIDE)
But it does not agree to show !!!
for ShowWindow(SW_SHOW) it show only empty(!) window(without the picture.)!!!
What Can I do ?????????
|
|
|
|
|
Did you consider taking my advice, instead of just re-stating your problem ? If you can see the frame, but not the image, have you tried reloading the image to see if it's getting lost ?
Christian
#include "std_disclaimer.h"
|
|
|
|
|
If the control itself displays but the bitmap does not than Christian is right - you've got something funky in the display logic for the bitmap.
|
|
|
|
|
In CDocument::Serialize I access a .ini-file. All is ready now.
But I want to protect the file currently in use from being edited/deteted/moved... with another application.
How can I lock the file (like in Word: "The file you want to access is currently in use" (or similar)
Can anybody help me?
:-|
Friedrich
|
|
|
|
|
Hello, the codegurus around the world.;)
When we open Word file, another temporary file is created.
So, if someone first opens the file and another temporary file is created,
the other people don't have the previlege to save this file.
Does this work?
Or, move this file to the temporary directory which anyone may not find this file easily?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
How do I increase the mouse sampling rate using DirectX?
|
|
|
|
|
hi, would like to know how to realize resizing a window MPlayer
Called in VBapp with the help COMinterface, generated with the help ATL (VC ++ VS 6.0)
Thanks
|
|
|
|
|
Good afternoon, I would like to know how to realize sending definite events
Through a given time slice for example in VBapps, if it is necessary COMinterface with ATL (VC ++ VS 6.0) to realize. The value of an interval of sending should be set with the help Property ,i.e it to transmit VBapps.
I give thanks for advices
|
|
|
|
|
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
|
|
|
|