|
I have to ask one question - are file date-times before 1970 actually meaningful? They obviously aren't proper create/modification dates, so why do you need to manipulate them?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My customer has this kind of data files!
|
|
|
|
|
With creation and/or modification dates prior to 1970? Really.
OK - what do you need from the _stat function? You should be able to use Win32 functions to determine the values of file attributes that _stat gives you.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I write dialog box application using MFC.
my questions is after run the application we are able to view the dialog box there is no problem.
when user click the ok button in the dialog box then i have call userdefind class call MYclass.
From the MYclass I need to create one ProgressBar control and placed to dialog box.
Please clarify me how to create progressBar control from Myclass.
Thanks.
|
|
|
|
|
By reading your description, it seems your design is a bit wrong. In general, you shouldn't let other classses manipulate the controls on your dialog.
What are you trying to achieve at a higher level ? Why does your class need to add a progress bar on your dialog directly ?
|
|
|
|
|
Hi
In my application ,I loaded a dll and tried to update a string in that dll using UpdateResource function,but it is not changing the string in that dll.Please Help !
CString strDll = "C:\\MyRES.dll";
CString strTest = "END";
WORD wLang = MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT);
UpdateMyResource(strDll, _T("108"), wLang, strTest.GetBuffer (strTest.GetLength ()), strTest.GetLength ());
BOOL CBTNDlg::UpdateMyResource(const CString &strFilePath, LPCTSTR lpszResourceId, WORD wLangId, LPVOID lpData, DWORD dwDataLength)
{
HANDLE hUpdate = ::BeginUpdateResource(strFilePath, FALSE);
if (hUpdate == NULL)
return FALSE;
BOOL bUpdateResult = FALSE;
bUpdateResult = UpdateResource(hUpdate, RT_STRING, lpszResourceId, wLangId, lpData, dwDataLength);
return EndUpdateResource(hUpdate, FALSE) && bUpdateResult;
}
|
|
|
|
|
Where has the error occurred?
Has BeginUpdateResource succeeded?
What does UpdateResource return?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I am getting back to VC++ after a long time. I am using VS 2008 SP1. It is a simple application a button, an editbox (plain) and a richedit box. When i added a control variable (CString) to richeditbox2, a message pops up that i must call this function. The messagebox now does not show again. when i run the program, i get no errors but the dialog fails to load.
I get the following in output window.
<br />
Binary was not built with debug information.<br />
Any info will be appreciated.
|
|
|
|
|
Are you calling AfxInitRichEdit2[^] in your application? Not calling that can have the effect you're seeing...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Yes I tried that after finding some help online but it did not work. Still the same problem. I am using AfxInitRichEdit2() inside the OnInitiDialog as first line. I may need to recompile everything. I also tried linking to RichEdit20.dll ( in project setting) but did not work.
I am using Windows Vista SP1 and Visual Studio 2008 SP1. Could it be that the dll is missing. I tried searching for the dll but could not find it.
|
|
|
|
|
Put AfxInitRichEdit2(); in InitInstance function.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
That actually solved the problem. I was putting it in OnInitDialog. May be i was doped...lol
Thanks
|
|
|
|
|
I have a server app (regular EXE, not service) that supports both ATL and MFC, and it uses Windows messaging as IPC (to exchange data with other applications on the same machine). We run it after an automatic login. So far so good.
Now I've got a new customer that requires that the server be able to run without automatic login. I know we can change the app to a service, replace messaging to other IPC, and bla bla... But, I am looking for some simple solution that minimizes the effort. BTW, the code is from a previous contractor and is not very straightforward.
Any suggestions are welcome!
Best,
Jun
|
|
|
|
|
Take a look at the 'Srvany.exe' program, that used to be part of the Windows NT Resource kit.
|
|
|
|
|
If you want an application to run without a user being logged in, you need to run it as a service. The previous reply mentions a tool that m,ay assist you in this endeavor.
If it needs to run without a user being logged in, and you have the source code, my advice is to convert it to an actual service.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Search for XYNTService here in CP... it can make any application to start as a service...
Also you can create a service that launch your application.
The best option is to transform the application into a service...
Good luck.
|
|
|
|
|
hello , i am new in c++ and i am learing vs c++ MFC.how can i open MFC project in vs c++ and compile and run and want to view my window what i have wrote.i can anyone explain me detail how can i open MFC project in vs c++ 2005.i want to see my created window.
plz help.
|
|
|
|
|
goutom roy wrote: can anyone explain me detail how can i open MFC project in vs c++ 2005
Look on the File menu for an option like Open Project or something.
Good luck
|
|
|
|
|
look for a file with .sln (solution) extension or a file .vcproj (project) extension.
A Solution may contain a number of projects but a project file contains only one project. Usually there are one project per solution though.
good luck
|
|
|
|
|
hello , i dont understand what u have said.plz i am new in visual studio c++ 2005.i want to open project and add a cpp file to write c++ MFC code.now how can i open MFC project and .cpp file to write my MFC code in visual studio c++ 2005.tell me plz detail such as menu->project->--------like this.
thanks in advance.........
|
|
|
|
|
Does your copy of VS 2005 include documentation?
modified on Wednesday, July 22, 2009 5:17 AM
|
|
|
|
|
i will not read myself i will have u my minions read to me
|
|
|
|
|
There's this new thing available on the internet called google. You can enter search terms and get thousands of possible results, and it only takes about 15 seconds. that's what I did, and I came up with information DIRECTLY from Microsoft.
http://msdn.microsoft.com/en-us/library/ms235422%28VS.80%29.aspx[^]
If you don't have the mental chops necessary to perform *essential* research, maybe programming isn't your best choice of vocations.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
now John, I believe there are new rules about not being so condecending to people lacking in mental chops
Pete
|
|
|
|
|
goutom roy wrote: how can i open MFC project in vs c++
File -> Open -> Project/Solution (Ctrl + Shift + O)
Here I assume you can navigate to the appropriate directory and select either the .sln (Solution File) or the .vcproj (Project File)
goutom roy wrote: compile and run
To compile and run the project you have just opened: Shift + F5 OR Debug -> Start Without Debugging
To compile and run in Debug mode: press F5 OR Debug -> Start Debugging
And To view and work on the window (such as add buttons, sample text boxes, and other control objects) Go to the Resource Tab and look under the Dialog Sub menu.
And as everyone else above has mentioned: GOOD LUCK
|
|
|
|