|
kir_MFC wrote: please provide the answer.......
kir_MFC wrote: Create a C/C++ console application which connects to a MySQL database and shows all tables and their Primary Keys.
That's not a question.
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]
|
|
|
|
|
How to connect to mysql through c++ using console application?Please do reply as soon as possible in my email address:sheshank.me@gmail.com
|
|
|
|
|
Hi all
I have to run my MFC applications in other PC's .I have developed the application using VS2005 .The EXE works fine in my computers.But i need to run on many computers.Can any one suggest me a idea???
Thanks in advance!!!!
Regards
Gany
|
|
|
|
|
In other PC , u have also include exe with lib or dll file ..
|
|
|
|
|
On the project property's 'Configuration' tab, specify 'use MFC in a static library'. This will remove dependencies on the MFC dlls; you won't have to redistribute those with your .exe. Any third-party dlls you might use will still have to be distributed with the app. Place them in the same directory as the .exe when distributing.
If you want to get a little more professional, you can put together an installation package (.msi) that can create shortcuts to the user's Programs directory, creates any necessary registry entries, etc. VS05 supports this - it's pretty straightforward.
|
|
|
|
|
Hi
Thnks for your reply..
can you help me in providing steps for running the application as a installtion package .msi...
Your reply is highly appreciated.
Thanks
Gany!!!
|
|
|
|
|
Hi
i tried running the application using static library.
My Application is a Database oriented and hence i m getting the following error.
"oracle client and networking components were not found.These components are supplied by oracle corpartion and are part of the oracle version 7.3.3 or later client software insatllation
provider is unable to function until these components are installed."
Kindly provide me a solution
|
|
|
|
|
hi every body.......
in my application i want to convert any format to pdf
i.e word,excel,xml,html,ppt and so on....
in my application using C(or)C++ code....
thanks in advance......
if find any mistakes in my typing sorry......
thanks in advance....
modified on Tuesday, November 10, 2009 6:47 AM
|
|
|
|
|
Hello
The best is to use a PDF Printer Driver.
it is a virtual printer that you install on your computer and you call when you want to print your document.
Somes are free .. and somes not.
(PDF995, PDFCreator, Amyuni, ...).
Regards
Franck
|
|
|
|
|
hello
i drew some polygons, i want to fill each with a bitmap instead of rgb colors...
how can i do that?can you give me an example code?
thk you very much
|
|
|
|
|
please guide for me convert image tiff to image bmp by VC++6.0. not MFC.
wish help of everyone .
thanks very much.
nothing
|
|
|
|
|
You may use, for instance, GDI+ Image class [^].
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]
|
|
|
|
|
There is an Edit control on the dialog. The ID is IDC_EDIT .
In CMyDialog::OnInitDialog() , I do this ...
CEdit* pEdit = dynamic_cast<CEdit*>(GetDlgItem(IDC_EDIT) );
if(!pEdit) {
}
The CWnd* returned from GetDlgItem failed to convert to a CEdit* . But isn't CEdit derived from CWnd ?
Maxwell Chen
|
|
|
|
|
Hi Maxwell,
Maxwell Chen wrote: But isn't CEdit derived from CWnd
Yes, but GetDlgItem does not always return a CEdit pointer so the dynamic_cast runtime check fails. Have a look at the following document:
Inside MFC: Handle Maps and Temporary Objects[^]
Essentially... when GetDlgItem cannot find a permanent object in the MFC CHandleMap it will return a pointer to a CTempWnd object. So your code fails to dynamic_cast from CTempWnd to CEdit.
As an experiment you should add a CEdit member variable to your class for IDC_EDIT. This will cause the CHandleMap to have a permanent handle. Now your code will magically work.
Best Wishes,
-David Delaune
|
|
|
|
|
Thank you!
Maxwell Chen
|
|
|
|
|
Hi,
How to read a DWord Value from Registry... Iam trying with the following code but iam getting Garbage Values... can any body help me out....
void ReadValue()
{
HKEY hKey = 0;
DWORD dw,dwValType;
LPBYTE pbData;
if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Praveen", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
if(RegQueryValueEx (hKey,"DWORDSample", NULL, NULL, NULL, &dw)==ERROR_SUCCESS)
{
pbData = (LPBYTE)malloc(dw);
RegQueryValueEx (hKey, "StringSample", NULL, &dwValType, pbData , &dw);
cout<<"\n\nDecimal Value"<<(DWORD)pbData<<"\n\n";
RegCloseKey(hKey);
}
}
}
Thanks in Advance......
|
|
|
|
|
Pardhu2 wrote: f(RegQueryValueEx (hKey,"DWORDSample", NULL, NULL, NULL, &dw)==ERROR_SUCCESS)
{
pbData = (LPBYTE)malloc(dw);
RegQueryValueEx (hKey, "StringSample", NULL, &dwValType, pbData , &dw);
You get the size information for "DWORDSample" and then try to retrieve the value of "StringSample"! What is the correct name of your value variable?
|
|
|
|
|
First of all, your variable "dw" is not initialized when you're calling RegQueryValueEx. Also, you set the address for the data buffer to NULL.
|
|
|
|
|
Michael Schubert wrote: First of all, your variable "dw" is not initialized when you're calling RegQueryValueEx. Also, you set the address for the data buffer to NULL.
I think that is the correct call to obtain the size of the variable before getting its value.
|
|
|
|
|
You're right 
|
|
|
|
|
Try it this way:
void ReadValue()
{
HKEY hKey = 0;
DWORD dw;
DWORD dwData;
if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Praveen", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
if(RegQueryValueEx (hKey, "DWORDSample", NULL, NULL, NULL, &dw)==ERROR_SUCCESS)
{
RegQueryValueEx (hKey, "StringSample", NULL, NULL, (LPBYTE)&dwData , &dw);
RegCloseKey(hKey);
}
}
}
|
|
|
|
|
Hi all,
I am calling some methods from the Web service which i have added to my solution.
For Example please refer below code.
below code is perfectly running fine on XP,Vista but i have tested it on Windows 2000 prof.
line 1: CoInitialize(NULL);
line 2: xyzService::CxyzService test;
line 3: CComBSTR result;
line 4: test.Methodname(CComBSTR(L"0001"),CComBSTR (L"0001"),&result);
line 5: CoUninitialize();
if i run this code in Win 2000 it gives below error,
"the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll"
if i comment line no. 4 from above code,it runs properly.
This error is arriving due to call of any method in webservice.
Please help me to find some solution.
Thanks in advance
|
|
|
|
|
Hi Rahul,
Your webservice may be calling the Unicode version of GetAddrInfo. And if you have a look at the MSDN for the GetAddrInfoW Function[^] it states that the minimum operating system is Windows XP with SP2.
Windows 2000 should support the ANSI version: getaddrinfo function[^]
Best Wishes,
-David Delaune
|
|
|
|
|
hi Randor,
thanks for your reply. Actually I am using a service which is made in DotNet(C#) by DotNet Team .
Is it possible to overcome this problem through our client Application(My MFC application)?
Regards,
Rahul Vaishnav
|
|
|
|
|
Hi Rahul,
You can use the ANSI version by explicitly calling the GetAddrInfoA function. Make sure that you pass ANSI strings to the function.
Best Wishes,
-David Delaune
|
|
|
|