|
As I recall, you can copy a dialog box from the resources of one VC6 project to another. You open them both with the dialog resources visible, hold down Ctrl, click on the resource for the dialog you want to copy, and drag it to the resources window of the other project.
|
|
|
|
|
Hi,
I've reused dialogs where I made a .h and .cpp file that defined the class and a .rc file to define the dialog layout. I based the class on ATL::CDialogImpl<...>. Though I couldn't use a .rc file straight from one project in another, I had to do some work to make sure the .rc file for the dialog contained nothing but information on the actual dialog. I then #include'd the .h and added the .rc as a resource to a new project.
|
|
|
|
|
Hi guys and gurls,
Does anyone know how u can get two dates and then work out the difference s that it can display someones age?
|
|
|
|
|
In MFC:
To get two dates from controls on a dialog, look at: CDateTimeCtrl.
To work with date / times, use CTime.
To subtract them, you can use CTimeSpan also.
That should give you things to search for and learn from.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
|
No im using visual basics and i really only know the basics of visual so dont really knowhwo to use what you have suggested
|
|
|
|
|
Neal beavis wrote: No im using visual basics
Why are you posting this in the C++ forum then ?
|
|
|
|
|
sorry everyone i get them mixed up everytime visual studio
|
|
|
|
|
So, you are using Visual C++ then ?
Which kind of application did you create (console, win32 or MFC) ?
|
|
|
|
|
|
Neal beavis wrote: No im using visual basics and i really only know the basics of visual
Good pun.
BTW be aware: Visual Basic developers shouldn't taint this forum.
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]
|
|
|
|
|
That's no sooo difficult. Like you are able to compute, inwardly, someone's age, given its date of birth, so you should be able to code the algo.
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]
|
|
|
|
|
culd you use something like
cin>>dateToday
cin>>birthDate
cout<<dateToday-birthDate=age
?
|
|
|
|
|
It actually doesn't look a good plan.
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 about difftime() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
how do u use this my friend :s
|
|
|
|
|
Neal beavis wrote: how do u use this...
By consulting the documentation:
http://msdn.microsoft.com/en-us/library/3wbd7281(VS.71).aspx[^]
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Take a look at here
a programmer traped in a thugs body
|
|
|
|
|
How to give a vista look to MDI mainframe in VC++ 6.0?How to use the PNG buttons in my dialog.Ex: Window Media Player PNG Buttons?
|
|
|
|
|
These are pretty different questions, and you'd probably have been better off posting them as two separate questions.
To answer your 2nd question first, I typed
"codeproject png button", and the article I got was...
A user draw button that supports PNG files with transparency, for Visual C++ 6.0 and VS2005[^]
which looks pretty useful for you...
As for the 2nd, I think this is down to embedding a manifest as a resource in your exe, but beyond that I get a bit woolly. I with you luck with your search. I know I've seen the answer on this very forum, but you're more motivated to search back than I am.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hi all,
I have recently been working on a project that requires to open documents that are password protected. I need to give the password at the run time from my application (NOT MANUALLY). I was using shellExecute() to open the file but I cant pass the password at run time. I need to give passwords for each file MANUALLY.
CString cFileName = FileName; //FileName variable storing the filepath
CString cAction = _T("open") ;
ShellExecute(0,cAction,cFileName,NULL,NULL,1);
Please help me in this regard. Is there any inbuilt class in MFC to cater to this issue. Ho can I OPEN the password protected files at run time?
|
|
|
|
|
It's going to depend on the application that's loading it. There is no generic solution.
If it's application you wrote yourself, then you can call CreateProcess and put arguments in the command line. ie:
c:\program files\myapp\myapp.exe /p password c:\mydoc.xyz
If it's office, then I can't find a /password switch - but you can run a macro on loading with the /m switch, so *MAYBE* you could create a macro that would open a file with a given password. But that's a maybe.
Alternatively, you could automate word and drive it that way, but that's outside my expertise.
If it's some other application, I have no idea. Not very psychic today.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hey I am not sure whether this will work. I am very weak with MACROS, so I am opting for some other options that will reduce the MACROs. Will Office Automation be of help in this regard?
|
|
|
|
|
I'm confused - Are you skamaal or salimhassan?
You have gone outside my field of expertise... I just know you can't do it in normal windows-y stuff.
In my last post I suggested investigating Automation, and David Crow also said it's the way to go. I'd take his word for it if I were you...
The articles under http://www.codeproject.com/KB/office/#Office%20Automation[^] may be of help to you. They're aimed at excel, but the approach is probably still valid.
Good luck!
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Yeah both are me..
actually I logged in with my old ID. Well I have an issue at present that I cannot be using WORD automation as this is increasing the complexity in my program.
basically tried the folloing link
http://support.microsoft.com/kb/252719
The examples at the link you provided are good but I am having a problem with the office versions (most of them are for office 2000 03, I am using 07).
One of the solution i got is that I can capture the Handle of the DIALOG BOX(asking for password) that is opened , and use this handle to pass my password.
I found this link that is similar to my problem. here the handle is being used to close the window.
First the windows are enumerated and then the desired handle is used to close the window.
http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2006-04/msg01244.html[^]
Could you please suggest whether this approach will work?
|
|
|
|