|
OK, thanks.
Actually no classes are availble from "outside".
The Lib has a static class (not a class with static functions but a static implemented class),
and only plain functions (that calls member functions of the static class) are available from outside (which prototypes are declared in the .h file that I send to the customer).
Does this make it possible to use it from even more compilers?
If not, is there perhaps a way to mark these functions as "C" functions?
Thanks!
|
|
|
|
|
Is there a way to put a menu in a dialog box in Visual C++.net?
|
|
|
|
|
I assume you mean in Visual C++.
Open the dialog in Resource View.
Go to Properties and find the Menu item (in Misc category).
Type or select the ID of the menu you want to use (you did create the menu first, didn't you?)
You won't see the menu appear in Resource View but it will work when you run the app.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
I appreciate you answer. I am new to Visual C++.net. I was able to figure out how to add the menu. Thanks for the help !
Chris
|
|
|
|
|
I want to print an Enhanced Metafile. This file is generated and printed by using GDI+ (Graphics and Metafile objects)
What kind of Device Context do I have to use while generating this metafile, to be independent from the printer device it will be printed out later on?
When I use a screen Device Context while generating this metafile and print it, the dimensions of the printed shapes are not OK !
|
|
|
|
|
Hello,
who can tell me how to use the interface IFilterChain ?
I have a filter graph in which I would like to pause some filters and play others...
I tried the methods of this interface but it seems to me it doesn't work or, what is certain, that I don't know how to use it correctly !
Thanks a lot for help
There is no way to happiness, happiness is the way !
|
|
|
|
|
Hello Friends,
I am having a problem with the OnSize() member function. I had got 2 edit boxes which I am making them as Read only and at the run time they are getting resized according to the size of the Window. My problem lies in the background color of the edit boxes. Even though I made them as Read only I don't want the user to know that they are read only so I called the OnCtlColor() member function and setting the background color as White.
But same gap is present in between the 2 edit boxes whenever the window is resized. I want to fill this gap also with the edit boxes. but Its not happening
please help me
Neelesh K J Jain.
|
|
|
|
|
Hi
You have not talked about any gap in the first phase, where u r coloring the control to give it a normal look. Which gap r u talking about, Please explain properly...
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hello !
I was creating a custom collection class, implemented as a doubly-linked list and a templated data type wrapped into a struct. Now, I first wrote it following normal coding standards, by seperating the header file of the template class and the implementation file into two different files, then including the header file where ever I needed this class.
This approach lead to a series of linker problems, the linker failing to resolve the template instantations. When I copied the contents of the implementation file and pasted it after the class definition (that is, into the end of the header file) and re-included this new header file into the module where I needed the template class, the code compiled and linked properly, but the template class header file became rather big..
Does anyone know if this is a bug in the IDE, and if it is fixed in the later versions, .NET and/or .NET 2003 ? Is there a possible work-around of this without moving the implementation file as a part of the header file ? A pragma definition, perhaps ? Or is my only possibility to cram the header and implementation files together and distribute this monolithic file ?
Greetings,
Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
I’m going to distribute an ActiveX and need to sign it. I’ve read a lot in MSDN but I can’t put it all together…
Anyone have signed an ActiveX? How did you do?
Really Pleased for help!!!!!!!
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
I have an application which uses 3 custom DLL. I want to create an additional DLL with method which sets the path of the temporary files created (from the application as well as the other DLLs) to a specified path rather than the system temp file path. If this method of the new DLL is not called in the application, the application can use the system temp path for creating temporary files.
I tried using '_putenv()' for setting the environment variable 'TMP' with the new path for temp files, in my new DLL and then calling it from my application. But this does not change the path where the temp files from the DLL are created. It is affecting only the temporary files created from the application. I use the GetTempPath() API to get the temp path.
Is there any other method to change the temporary file path. I need the new temp path to affect the methods of all the DLLs.
Pls help.
Thanks
Vini
|
|
|
|
|
The only way I know of is to update the values in the HKEY_CURRENT_USER\Environment key.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hai, i am trying to lern vc++, could u please tell me how to connect a database from outside to the vc++ program for getting the datas from the database ?
thank you,
yours sincerely,
ann
|
|
|
|
|
If you are using MFC, check out the CRecordset and CDatabase classes.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
If you are using MFC, then u can use the following code to connect to access database.
<code>
BOOL CMyDatabaseTesting::ConnectToDatabase()
{
if(!m_pdb)
m_pdb = new CDatabase;
CString StrConnectString;
try
{
//Two Methods of connecting
//1. Through the database path as described below
//2. Using DSN, i.e, "DSN=szDSN;UID=szUsername;PWD=szPassword;
StrConnectString.Format("Driver={Microsoft Access Driver (*.mdb)};Dbq=%s;UID=%s;PWD=%s",strDBPath/*Contains the database path*/, "Admin",szPassword/*Password of database (fi any)*/);
m_pdb->OpenEx(StrConnectString,CDatabase::noOdbcDialog);
}
catch(CDBException *e)
{
if(e->m_strError.Find("Login failed") != -1)
{
MessageBox(0, e->m_strError, "Error1", MB_OK);
return FALSE;
}
else if((e->m_strError.Find("Server user id") != -1)
&& (e->m_strError.Find("is not a valid user in database") != -1))
{
MessageBox(0, e->m_strError, "Error2", MB_OK);
return FALSE;
}
else if(e->m_strError.Find("Data source name not found and no default driver specified") != -1)
{
MessageBox(0, e->m_strError, "Error3", MB_OK);
e->Delete();
if(m_pdb)
{
if(m_pdb->IsOpen())
m_pdb->Close();
delete m_pdb;
m_pdb = NULL;
}
return FALSE;
}
else
{
//Database related error
MessageBox(0, e->m_strError, "Database Error", MB_OK);
return FALSE;
}
if(m_pdb)
{
if(m_pdb->IsOpen())
m_pdb->Close();
delete m_pdb;
m_pdb = NULL;
}
e->Delete();
return FALSE;
}
return TRUE;
}
</code>
Where m_pdb is a pointer to CDatabase. Also don't forget to include <afxdb.h> in stdafx.h file. That's it, you are connect to the database.
Enjoy...
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hi.
I'm a beginner of Visual C++ so I have many problems when using VC++.
Because I want to update my application when there is a new application version on server so there is an Update button in my project which will download some update files to hard disk (after checking version) when user push it.But I don't know how to update my application after downloading update files to hard disk. Please help me.
Thank you very much.
Sincerely,
King of Merit.
|
|
|
|
|
Hi Merit
i think you need some utility that update your application.
i too created same,for me this work is done by Installer.
actually what the installer do it check wheather our application is running or not,if it running it set the flag to OS to update new appliaction on restart or if it not running it update it.
the insatller i used is INNO setup ,it is freeware go and download from
http://www.jrsoftware.org/
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi all,
As the title, i want to execute command line in a remote machine. For example, i have two machines (P1, P2). Let consider P1 as the local machine (caller) and P2 as remote machine (execute here). Now i develop a application that allow user on P1 run, then put the cmd (e.x: net send P1 "Hello"). Send the message to P2 via tcp sock stream, then execute the cmd line parsed by P2 (it means in P2, open Start->Run->put net send P1 "Hello" and then P1 will receive "Hello" message from P2).
Anyone who know the way to do that, please show me.
P/S: My english not well as i want to described the problem.
.::LDLP::.
|
|
|
|
|
hain
[b]Net Send[/b] is the internal command provide by windows networking.
for executing command line in a remote machine,you need a special application to sit at remote machine which handle you request and execute the files.
there one example similiar to your need in section MFC/VC++-->services
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
You want to use ssh for this. There are other tools, but most of them are insecure.
http://www.ssh.com/
http://www.openssh.com/windows.html
(also http://www.openssh.org/)
Openssh is from the same people who brough openBSD. I you haven't heard, these are people who are extreemly good programs, and extreemly paranoid about security. They are also [censered]. They don't even attempt to be reasonable. It is free, and you can trust it to be secure (though in fact openssh gets the "credit" for the only hole in openBSD in 8 years).
ssh is the comercial version. I haven't used it myself, but the only bad thing I've heard about it is that you have to pay for it. OTOH they will also help you if there are problems.
You will have to read the book to configure either. The task is non-trivial. Using anything else on the internet is stupid. Even on a seperate internal network you are better off with ssh than anything else.
|
|
|
|
|
This sounds like a job for RPC. In short, it is a powerful and secure interprocess communication (IPC) mechanism that enables data exchange and invocation of functionality residing in a different process. That different process can be on the same machine, or another machine on the LAN.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yep, something like that David Crow. I had found a application which allow me to cmd in remote machine. But (alway but), the application required authenticated for the session of remote execute cmd. That's not my reached my expectation.
Let see the following scenario: I have a remote IP, connect to it via socket, and then i send the application to it. After all, send a message via socket to tell the remote system execute my application. That all!
Sound like the blaster mechanism right?
Have you got any idea?
.::LDLP::.
|
|
|
|
|
Hello, is there anybody who can help me.
In my main program I have declared a fonction 'OnMyMessage'
In my .h file : afx_msg LRESULT OnMyMessage(WPARAM wparam, LPARAM lparam);
In my .cpp file :
BEGIN_MESSAGE_MAP(CPatchingMPEG2Dlg, CDialog)
ON_MESSAGE(WM_USER+1, OnMyMessage)
END_MESSAGE_MAP()
...
LRESULT CPatchingMPEG2Dlg::OnMyMessage(WPARAM wparam, LPARAM lparam)
{
EditSCR.SetWindowText(strOut);
strOut.Format("TimeCode %X",wparam);
return TRUE;
}
I pass the m_hwnd variable to another processus (a directshow filter) where I post a value to my main window by :
PostMessage(MYWINDOW, WM_USER+1, TimeCode, 0 );
My problem is that I have to write 2 times this instruction so that my function 'OnMyMessage' start. If I write only one PostMessage i get nothing !
Can you please help me about this point ?
I thank you very much for your help and wish you a nice day !
There is no way to happiness, happiness is the way !
|
|
|
|
|
madretierra wrote:
EditSCR.SetWindowText(strOut);
strOut.Format("TimeCode %X",wparam);
It looks like you need to switch these two statements around.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|