|
Use the FindFirstFile() /FindNextFile() pair.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
FindFirstFile/FindFirstFileEx/FindNextFile should do that.
Just pass the appropriate filter; I guess it's "X:\*"
|
|
|
|
|
Hi
I have list of URL in a text file. I want to save all the URL in local mahcine and display in a HTmlView. Can any give idea on this
|
|
|
|
|
Read each URL from the text file and pass it to your view. Or perhaps your question means something else.
It's time for a new signature.
|
|
|
|
|
Hi,
I have written an MDI MFC (using VS2010) application which one of our distributors in China is testing. He is running Windows 7, Simple Chinese.
The problem he has encountered are that for some of the dialogs the text shows ??? instead of the text. These dialogs are MFC ones i.e. prompt to save an unsaved file or response to a value beign out of range in a dialog.
since all the remaining text from the application resources show without any problems I wonder if it may be down to the application using a "Multi-byte Charactor Set" and not unicode. (can't remember why I choose "Multi-byte Charactor set")
Should I build the application as a Unicode application?
and would this help pave the way for localised resources?
thanks in advance
Robin
|
|
|
|
|
Robin,
Its good if you build your application using Unicode character set, hopefully this will solve the problem.
Thanks,
Anand.
|
|
|
|
|
Hi Anand,
Thanks for your suggestion. I had suspected that building my application using unicode would solve my problem.
I have heard back from our Chinese distributor this morning that the display issues are now resolved.
Thanks,
Robin.
|
|
|
|
|
He he, that's great
Thanks,
Anand.
|
|
|
|
|
Hi!
I've to generate .lib file from my project. But only object file is generating. I've set the configuration type as Static Library (.lib). But no lib is generated. How to generate .lib file?
|
|
|
|
|
Take a look at your project properties, there is probably something missing that is preventing it executing the LIB step.
It's time for a new signature.
|
|
|
|
|
hello guys...i did not inted to confuse all of you. I want to show the system time in a messaagebox and im using the following code
SYSTEMTIME st;
GetLocalTime(&st);
now as stated earlier, i want to show it in a messagebox thus need to convert it to string, how can I do that??
modified on Tuesday, September 14, 2010 8:14 AM
|
|
|
|
|
How is the date and time represented?
If using COleDateTime , you can use its Format method.
Otherwise use sprintf_s or swprintf_s to format the date and time into a string.
You can also use CString::Format instead.
|
|
|
|
|
What do you mean by "date and time" exactly ? You have different types of objects that can represent date and time, so what are you using ? Take a look for instance at COLEDateTime[^].
|
|
|
|
|
If you're using ATL/MFC COleDateTime then have a look at Format method.
If you're instead using Win32 then read about strftime function.
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]
|
|
|
|
|
if there are many if's in the replies, maybe you should provide more information to start with.
|
|
|
|
|
overloaded Name wrote: ...thus need to convert it to string, how can I do that??
In addition to the others, there's also asctime() and ctime() .
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
in mfc use COleDateTime class and after that Format method
in win 32 use sprintf function
|
|
|
|
|
Hi All
I need to block or show message when application run as Administrator.Is it possible?
Please help me
|
|
|
|
|
Already tried[^] ?
virtual void BeHappy() = 0;
|
|
|
|
|
Thanks for reply
No i just going through this let you know.
|
|
|
|
|
Hey i use code which is given in MSDN.I use like this
bool CCheckApp::IsUserAdmin(void)
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if(b)
{
if (!CheckTokenMembership( NULL, AdministratorsGroup, &b))
{
AfxMessageBox("Test");
b = FALSE;
}
FreeSid(AdministratorsGroup);
}
return(b);
}
And call in
BOOL CCheckApp::InitInstance()
{
...
..
..
IsUserAdmin();
}
i am wrong or right.Please help me
|
|
|
|
|
Why not ?
You could modify the last line:
return (FALSE != b);
virtual void BeHappy() = 0;
|
|
|
|
|
|
Try it also in the admin mode at the switched-on UAC
virtual void BeHappy() = 0;
|
|
|
|
|
Hi all,
i m using COleDateTime Ctrl to find out dates.
i want to find out 2nd sat of month,
please tell me how can i do this.
thanks in advance.
|
|
|
|