|
In another word, can I avoid using DSN to connect to an Oracle database? My office has all the securities configured that it requires Admin right to access the ODBC configuration dialog.
Elizabeth
|
|
|
|
|
No problems with ADO:
"Provider=msdaora;Data Source=dbsid;User ID=user;PASSWORD=flag;Persist Security Info=True;";
|
|
|
|
|
can anyone tell me to create a program that can tell the difference between to dates. Even leap years?
I really need help. I have been trying to do it for the past two weeks and I still get errors.
|
|
|
|
|
Helps to post exactly what you're having problems with.
|
|
|
|
|
Would this be your homework ? If you've been trying for two weeks, you must have some code you can post ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
The normal approach is to convert the dates into some numeric format, from which you can then perform the subtraction and convert back to days, weeks etc.
In Windows you would normally set up a SYSTEMTIME structure, convert it to a FILETIME with SystemTimeToFileTime , copy the two parts of FILETIME into a LARGE_INTEGER , then do 64-bit arithmetic on the QuadPart member. A FILETIME is in 100ns (0.1us, or 1 x 10 ^ -7 s) intervals.
If the code needs to be portable (e.g. to work on Unixes) you might prefer looking at the C standard library routines, the tm structure and the time_t numeric type.
|
|
|
|
|
can anyone tell me to create a program that can tell the difference between to dates. Even leap years?
I really need help. I have been trying to do it for the past two weeks and I still get errors.
|
|
|
|
|
hi,
this is the one way, try it
COleDateTime t1,t2,t3;
t1.SetDate(2003,11,1);
t2.SetDate(2003,11,25);
t3 = t2 - t1;
COleDateTimeSpan ts = t3;
int t5 = ts.GetTotalDays();
result t5= 24 days. you can hour difference in GetTotalHours(), GetTotalMinutes(), GetTotalSeconds()
Have A Nice Day.
Murali.M
|
|
|
|
|
I've used the app wizard (.NET) to create a basic single view app, w/o doc-view architecture. I've added a few things to the file menu using the resource editor (new, load, save, etc..) and added message handlers to the main frame using the wizard. I have no problem checking any of the menu items using "GetMenu()->CheckMenuItem()" but i can't seem to disable any of the menu items "GetMenu()->EnableMenuItem()" I have tried using the sub-menu, and the main menu, and I have tried BYCOMMAND and BYPOSITION but I can't get it to work. I also can't get it to default as disabled using the resource editor. Is there something I'm forgetting? I'd appreciate any suggestions or comments.
|
|
|
|
|
You should add OnUpdate commands to the message map. For example if you have a menu item titled "New" that has OnNew(). You'd have
OnUpdateNew(CCmdUI *pCmdUI)
{
pCmdUI->Enable(FALSE); // disables menu item
}
Thats the easiest way to do it. Never tried it with GetMenu() so I can't help with that.
|
|
|
|
|
|
Hello all
I want to code an application which can read and write using usb interface. As I'm very new to programming using usb interfaces, not able to understand how to do it. I want to use VC++ environment and want to develop a application which can read and write using usb interface just like we do with a serial port.
Can anyone help me in this. Any sample code or links to articles abt the same are very much appreciated.
Thanks for your help
Hari.
|
|
|
|
|
USB devices have a virtual serial port, their device driver is supposed to emulate a "normal" serial port. Therefor look at PlatformSDK/Device IO, and functions like SetupComm, ReadFile, WriteFile, or take a look at this library:
http://www.codeproject.com/system/serial.asp[^]
Peter Molnar
|
|
|
|
|
I am writing an application to create thumbnails (files) in the fly when an image file name (jpeg, bmp, etc.) is entered. I tried aspjpeg.dll with no success. Can someone help?
Elizabeth
|
|
|
|
|
Try CxImage (search codeproject).
Mike
|
|
|
|
|
Use the new CImage class in MFC 7.
|
|
|
|
|
Whats the easiest way of doing this?
It MSDN says I handle them inside CMainFrame ?
Are messages sent to CMainFrame as a WM_NOTIFY or what?
I can't seem to get anything working
Thanks
p.s-a small example would work wonders
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
A CDialogBar has to be programmed in terms off massage handling just like a CDialog
by creating message maps:
Within you CDialogBar:
BEGIN_MESSAGE_MAP(CYourDialogBar, CDialogBar)
ON_MESSAGE(WM_INITDIALOG, OnInitDialog)
ON_BN_CLICKED(IDC_BUTTON_ONYOURDIALOGBAR, OnBnClickedOnyourdialogbar)
END_MESSAGE_MAP()
Peter Molnar
|
|
|
|
|
By drawing Bitmap, utilizing "StretchBlt" (VC++ 6), I get upside down image. Please suggest ways to get the correct Bitmap picture.
Any help would be greatly appreciated.
German
Ls2333@mail.biu.ac.il
|
|
|
|
|
dc.SetWindowOrg(m_rect.TopLeft());
|
|
|
|
|
Change the hight sign.
Read the MSDN snippet about StretchBlt:
StretchBlt creates a mirror image of a bitmap if the signs of the nWidthSrc and nWidthDest parameters or if the nHeightSrc and nHeightDest parameters differ. If nWidthSrc and nWidthDest have different signs, the function creates a mirror image of the bitmap along the x-axis. If nHeightSrc and nHeightDest have different signs, the function creates a mirror image of the bitmap along the y-axis.
|
|
|
|
|
Anyone has an idea on how to write Outlook Express extensions like OE-QuoteFix?
Regards,
BB
|
|
|
|
|
Hi,
I am unable to watch a static variable in a watch window while debugging. The compiler is Visual C++ 6.0 (without any Service Pack).
Please note that I m not taking about static member variables of a class. I am talking about static variables local to a procedure.e.g
void procedure(void)
{
static int i;
... code follows ...
... code follows ...
}
|
|
|
|
|
Do you have a breakpoint set in procedure() ? What error/message does the debugger give you when trying to view those variables?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I can't see them too - the debugger IDE behaves as if they didn't exist.
Regards,
BB
|
|
|
|