|
thx for u 2,
the tag works great!
I spent for one hour last night on this without any result!
cheers
includeh10
|
|
|
|
|
i'd like to get bitmap bits from an image.
I got the image 30X30, and i want to get the byte pointer to the one dimensional array of
30*30*24 where 24 is number of bits. How to make it?
I tried to use CImage, where i use the method GetBits(), but i got only the first line of
the picture - am i doing something wrong???
|
|
|
|
|
Hi,
I have a dll project but I no longer want to send the dll to the customer. Instead I want to send a lib file that the customer can link to in their projects (instead of loading the dll as they do today).
1. is there a way to convert the dll project into a static library?
if so how?
2. If not, I presume I have to create a new static library project from
scratch using New Project w32 static lib. Right?
3. If I have to create a new static lib proj, how do I "export" the functions
from the projects so they are available for the customer that will link the lib?
Thanks!!!
|
|
|
|
|
ackabacka wrote:
3. If I have to create a new static lib proj, how do I "export" the functions
from the projects so they are available for the customer that will link the lib?
You don't have to do anything. The LIB is essentially like an OBJ file when it comes to linking, the LIB has the compiled version of your code, and the linker will search it for functions that your client calls.
--
I'm Michael Dunn and I approve this post.
Vote Trogdor in oh-four!
|
|
|
|
|
Michael Dunn wrote:
You don't have to do anything. The LIB is essentially like an OBJ file when it comes to linking, the LIB has the compiled version of your code, and the linker will search it for functions that your client calls.
OK thanks.
I've now created a new static library project and (re) created all functions, as it didn't seem possible to change any setting for the dll project to have it compile a static library (or is it?).
It works fine for me, but now I wonder, who can use this library?
It doesn't use MFC.
Sure, it will only run on intel compatible computers running Windows but what else is required.
Of course another VC++ 6 developer could use it (as it's compiled under VC++ v6), but what if the developer is using VC++ .NET environment, with or without managed C++?
What if the developer is using another c++ compiler (Intel, Borland etc)?
Anyone?
|
|
|
|
|
When you compile the code as C++, the LIB can only be used by compilers that understand the VC name decoration scheme. VC 6 and 7.x do so, as does the Intel compiler. There may be others as well, but those are the only ones I've used.
--
I'm Michael Dunn and I approve this post.
Vote Trogdor in oh-four!
|
|
|
|
|
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::.
|
|
|
|