|
|
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?
|
|
|
|
|
salimhassan wrote: Could you please suggest whether this approach will work?
Well, if you can monitor for the fialog window and use SetWindowText, then that sounds like it would work. But I'd think of that as a very fragile solution - maybe a different language user, or a different version of word, and your solution might fail.
But I know next to nothing about automation other than how to spell it, so I'd probably join you on the hack-the-dialog approach!
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
I am getting linking errors with the previous code I shared.
1>shell5.obj : error LNK2019: unresolved external symbol _EnumProcesses@12 referenced in function _main
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
Dont know how to proceed further as i am weak in Window Programming..
|
|
|
|
|
If you search MSDN for EnumProcesses, you'll need to add Psapi.lib to your included libraries.
As fro _WinMain, I'm not sure but this sounds like a UNICODE issue. Do a search for "entry point" and "wWinMainCRTStartup", and that will hopefully steer you right.
But if I'm right about the second point, it would mean you've never been able to run your software, so I'm less sure.
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 was trying with getting the DIALOG Box Handle which comes when I open a password protected word file.
I found that below message is generated for the processess for word and the related dialog box.
"Password" "bosa_sdm_Microsoft Office Word12.0'
"Microsoft Word" 'OpusApp'
I am not sure which one is for what....
I used a tree control to list all the process running and getting the related handle.
::GetWindowText(hwnd, wndtext, sizeof(wndtext)/sizeof(TCHAR));
::GetClassName(hwnd, classname,
sizeof(classname)/sizeof(TCHAR));
str.Format (_T("%08Xh \"%s\" \'%s\' "), hwnd, wndtext,
classname);
getting some poblem with the comparisons..
CString a;
a.Format(_T("%08Xh "),hwnd);
CString temp = _T("\"TF_FloatingLangBar_WndTitle\" 'CiceroUIWndFrame' ");
a.Append(temp);
//if(str.Find(_T("\"Password\" 'bosa_sdm")))
if (!str.Compare(a))
never compares to true for the strings.
|
|
|
|