|
Viorel. wrote: Hope your problem does not have other subtle reasons
Me too!!
Thanks
Cheers,
Russell
|
|
|
|
|
i want to login in mfc and it cofirm username and password from mysql table
hi plz plz its urgent
tel me code ::::::::::::::::
plz tel me code for my problem which is as::::
my problem is related to login
i make a dialog box in mfc(vc++) which contain two edit boxes one for username and one for password
and it contain a ok button
to which when we click it give the second dialog box if username and password r right else not
but as username and password r stored in mysql table so it check in mysql table and then match wheather they r correct or not
note::: if possible then plz mysql table can store no of usename and passwords
if two username and password r stored in table and when i enter one username and password then it check that one and open one dialog box
and if i enter other username and password then it open another dialog box
Please mail me
-- modified at 8:31 Friday 9th June, 2006
|
|
|
|
|
|
plz tel me code in vc++ (MFC) which is connected to mysql
plzzzzzzz.
Please mail me
|
|
|
|
|
Which part of this problem are you having trouble with? If you are needing a parameterized query, see here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i dont use ODBC for connection i use mysql quires such as follows to connect
f ((myDB = mysql_init((MYSQL*) 0)) &&
mysql_real_connect( myDB, "localhost", "root", NULL, NULL, 3306, NULL, CLIENT_MULTI_STATEMENTS ) )
/*MYSQL *mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
const char *passwd, const char *db, unsigned int port, const char *unix_socket,
igned long client_flag) */
/*mysql_real_connect( myDB, "sanjeeva",
"root", NULL, NULL, MYSQL_PORT, NULL, CLIENT_MULTI_STATEMENTS ) )*/
{
if ( mysql_select_db( myDB,"gourav") < 0 )
{
MessageBox("Can't select the database !\nTry later.");
goto exit_here;
}
}
else
{
MessageBox("Can't connect !\nPlease try later.") ;
goto exit_here;
}
and now plz send me code to login
Please mail me
|
|
|
|
|
Hello,
I have a application UI developed using MFC, however the contents of the controls i.e. strings that needs to be displyed on the various controls(static texts, buttons, lilst boxes etc.) on the dialog boxes are determined at run time. So I need a Intelligent control resizing and positioning utility so that asthetics of the dialog box is maintained when one or the other control is stretched from its statically designed area.
This utility is also required for other purpose : I wish to internationalize my application and I do not want to maintain seperate resource DLL for each language supported by my application.
Any pointers or clues in this direction will be helpfull.
Thanks
Suyash
|
|
|
|
|
|
Hi Sarath,
Thanks, its of great help, in particular http://www.codeproject.com/useritems/SizingDialog.asp,
Though it doesn't solve my problem completely, i can re-use it.
However I still feel there should be some utility developed particularly for my problem, as its very generic requirement for multilingual application if we do not wish to maintain seperate resource dlls.
Anyways, Thanks much.
Regards
Suyash
|
|
|
|
|
Hi
I have one opensource of vc++. While executing this code it is giving the following errors.
1)error C2433: 'HWND' : 'inline' not permitted on data declarations
2)error C2143: syntax error : missing ';' before '{'
3)error C2447: '{' : missing function header (old-style formal list?)
4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5)error C2086: 'int CALLBACK' : redefinition
If any one got these errors and knew the solution please let me know.
Thank You
angle
ThankU
angel
|
|
|
|
|
Can you provide more details of the code or code snap ?
How can we guess where the errors occures and why?
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Can you be more specific its a little.
whitesky
|
|
|
|
|
I want to know how to find the HDD Serial Number from using C++ or C or any assembly code.
Thanks,
Anwar.
|
|
|
|
|
|
anwar1026 wrote: I want to know how to find the HDD Serial Number from using C++ or C or any assembly code.
Check GetVolumeInformation() API where you get the information of the volume serial number in lpVolumeSerialNumber parameter.
Here you get more information[^]
Knock out 't' from can't,
You can if you think you can
-- modified at 8:01 Friday 9th June, 2006
|
|
|
|
|
If you need volume's serial number (for logical disks C:, D:, etc.), you can use GetVolumeInformation function.
If you need serial numbers of your hard disks as physical devices, you can follow the famous Windows Management Instrumentation (WMI) way, which does not look so simple:
#define _WIN32_WINNT 0x0400
#include <objbase.h>
#include <comdef.h>
#include <Wbemidl.h>
# pragma comment(lib, "wbemuuid.lib")
_COM_SMARTPTR_TYPEDEF(IWbemLocator, __uuidof(IWbemLocator));
_COM_SMARTPTR_TYPEDEF(IWbemServices, __uuidof(IWbemServices));
_COM_SMARTPTR_TYPEDEF(IEnumWbemClassObject, __uuidof(IEnumWbemClassObject));
_COM_SMARTPTR_TYPEDEF(IWbemClassObject, __uuidof(IWbemClassObject));
int main()
{
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoInitializeSecurity(
NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
NULL);
IWbemLocatorPtr locator;
CoCreateInstance(
CLSID_WbemLocator,
0,
CLSCTX_INPROC_SERVER,
IID_IWbemLocator,
(LPVOID *)&locator
);
IWbemServicesPtr services;
locator->ConnectServer(
_bstr_t(L"ROOT\\CIMV2"),
NULL,
NULL,
0,
NULL,
0,
0,
&services
);
IEnumWbemClassObjectPtr enumerator;
services->ExecQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM Win32_DiskDrive"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&enumerator);
IWbemClassObjectPtr object = 000;
for( ; ; )
{
ULONG ret;
enumerator->Next(WBEM_INFINITE, 1, &object, &ret);
if( ret == 0) break;
_variant_t variant;
object->Get(L"Caption", 0, &variant, 0, 0);
MessageBox(0, _bstr_t(variant), "The serial number is:", MB_OK);
}
return 0;
}
Hope it helps.
|
|
|
|
|
I cannot find this file
Wbemidl.h
Anwar.
|
|
|
|
|
The "WbemIdl.h" file is located in "Vc*\PlatformSDK\Include\WbemIdl.h" subdirectory of Visual Studio 2003 or 2005. Are you using another compiler? Or may be you have a reduced variant of Visual Studio.
WMI includes more header files, libraries and DLLs. In Windows 98, WMI has to be installed separately.
I think you would have to download WMI from Microsoft site.
|
|
|
|
|
Well... I am using Visual Studio 6.0
And it would not be possible for me to move to Visual Studio .NET 2003 or higher.
Anwar.
|
|
|
|
|
It's part of the Platform SDK.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
|
|
I think you have trouble in your brain?
Sorry....this is wrong forum.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|