|
can anybody tell me what framework are you guys using? is it MFC from microsoft? or any other?
|
|
|
|
|
If you want to stay unmanaged, MFC has the huge benefit of the assembled knowledge here, on other pages and at MSDN.
But if you want to be platform independend, I would recommend wxWidgets[^]
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I am programming an application in which I have created a private thread, so I want to know how to manege the thread, for instance: when is the thread active or inactive. I really need the information.
duc an
|
|
|
|
|
Pham duc an wrote: I want to know how to manege the thread
HI.
A very good thread-managing-library ist the one from boost.org: boost-threads[^]
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hey good people.
I was wondering if anyone cud help me work with the month calendar.
My program is to perfrom certain task based on the date selected by the user
but i dont know how to retrieve the date and what format it is in.
Please help
Phoenix
|
|
|
|
|
If this is using MFC, have you looked at the CMonthCalCtrl methods?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I am getting this error when I try to run my app in debug.
Unhandled exception - debug.exe MFC42D.DLL 0xC0000005: Access Violation
It wont run in release mode either. I have checked that my project settings are in debug and its ok. I have heard this is quite a nasty error The thing is my application worked fine the day before. I really dont understand why this has happened . I thought it might be the registry ? If anyone can put forward any ideas I would be most grateful.
Thank you.
|
|
|
|
|
minkowski wrote: 0xC0000005: Access Violation
Someone, somewhere is trying to dereference a NULL-Pointer.
You need to find the place where. Set breakpoint in your program, and when you found one before the crash use step execution to wherever the crash occurs.
The find out what is going on and fix it.
Sorry, but I can't help you more without knowing what is happening in your program.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Simply running your application under the debugger should help, it will tell you where the access violation is.
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
Ok thank you! I will try that !
|
|
|
|
|
Hi, All
I want to change some text of Menu item on runtime.
i had changed submenu text, now i want to change text of menu, ect: File, View, Edit
Please, adv me.
Huynhnb
.: Your success is also mine :.
|
|
|
|
|
I had solved.
CMenu *pMenu = GetMenu();
// Change main menu
pMenu->ModifyMenu(0, MF_BYPOSITION | MF_STRING, 0, _T("New Item 1"));
pMenu->ModifyMenu(1, MF_BYPOSITION | MF_STRING, 1, _T("New Item 2"));
pMenu->ModifyMenu(2, MF_BYPOSITION | MF_STRING, 2, _T("New Item 3"));
Huynhnb
.: Your success is also mine :.
|
|
|
|
|
hi all,
when i'm returning a value from a try block of function, control is jumping in to
catch block.
thanks in advance.
Regards,
Prashanth
-- modified at 5:32 Monday 23rd October, 2006
|
|
|
|
|
voorugonda prashanth wrote: returning a value from a try block of function, control is jumping in to catch block.
Being not a prophete, I can only speculate that you are live-experincing the chatching of an exception.
Otherwise, show some (reduced!) source.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Try a "Rebuild all". It might help.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi
I have a class that I use for logging events in my applications, which are normally left running all day and year. The class generates txt files of the name :
app_name(YYYY_MM_DD).txt
and is designed to delete files that are a month old eg todays date is the 20/10/2006, so it will delete the 20/09/2006.
Occasionally the program may not be running for a few days. In this case the class does not delete the files that were generated a month ago - i.e. if the app was not running yesterday (the 19th), the log generated on 19/09/2006 would not be deleted.
Is there a simple way round this?
Can you use wild cards some how - for instance delete all files from 09/2006 at the start of 11/2006?
Thansk for any advice
69 Bay
|
|
|
|
|
If you are using MFC, just calculate the difference using COleDateTimeSpan . If GetTotalDays() returns 30 or more for any file encountered, delete it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks David
I am using MFC - how do I get a list of all the files that are currently in a folder? I assume I would have to do this, and then go through each file and do as you suggest.
Thanks for helping
69 Bay
|
|
|
|
|
Hi all,
I would like to know if there is a way to programmatically obtain the path to any user's any special folder?
Here I do not mean "All users" profile but really for any user that has his/her profile created on the machine.
For example, I can get what I need with the "SHGetSpecialFolderPath" function, but only for the current user. I need to do the same thing but for any arbitrary user.
If this task can not be achieved with SHGetSpecialFolderPath function or any other API function, is there maybe some workaround (like manually reading specific registry keys and values)?
Thanks in advance.
Bila
|
|
|
|
|
Bila1 wrote: For example, I can get what I need with the "SHGetSpecialFolderPath" function, but only for the current user.
Use SHGetFolderPath() instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for your reply.
I have already tried this function, but I do not know how to use it to get what I need. I guess that the "hToken" parameter is the answer. Problem is, I do not know the process to create such a token (access token).
Could you help me further with this issue please?
Bila
|
|
|
|
|
Bila1 wrote: I guess that the "hToken" parameter is the answer. Problem is, I do not know the process to create such a token (access token).
You can use LogonUser() to retrieve the token.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks, this sure helps.
Now, one more twist: is there any other way I can do what I need -without- requiring the user's password?
|
|
|
|
|
You may read them under HKEY_USERS, but it is not suggested. Some keys are not created until the special folder path is requested by the user, and you may not have the permission to read these entries.
Regards
Microsoft MVP in Visual C++
www.jiangsheng.net
|
|
|
|