|
You can set folder details on a per folder basis,
just right click on the listview header in explorer and select what you want to see.
Arjan
|
|
|
|
|
You can switch on and off the columns that you want to be displayed via the menu item 'View->Choose Columns...', in Explorer. Or right click on the column header and select the appropriate column information.
I Dream of Absolute Zero
|
|
|
|
|
|
Hi all,
Can anyone tell me if it is possible to customise the 'Open' dialog so that the user can select a Folder to 'open' instead of a file?
Also on a normal 'Open' dialog is it possible to disable the browse options so I can 'force' the user to select files from only the current location?
many thanks,
Andy
|
|
|
|
|
to select a folder instead of a file, change the flags you pass the open dialog by the OPENFILENAME structure.
to disable the "browse location" functionnality, i don't think it is possible.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
to select a folder instead of a file, change the flags you pass the open dialog by the OPENFILENAME structure.
This is a functionality I've been trying to get too. I wnat the user to select a folder only but I cannot find any combination of flags that allows me to close the dialog without actually selecting a file, or typing a filename into the "File name" edit box. Ideally I don't even want the "File name" edit box to appear on the dialog.
I have successfully used SHGetPathFromIDList() to select a folder only but prefer CFileDialog as SHGetPathFromIDList() does not remember the last folder selected.
Are there some undocumented flags that limit CFileDialog to opening folders instead of files?
Steve T
|
|
|
|
|
What's wrong with SHBrowseForFolder, it does exactly what you want. Fiddling with BFFM_ENABLEOK in your CallBack fuction you can force a user to select only files from the current location.
Arjan
|
|
|
|
|
cheers Arjan,
I've got the SHBrowseForFolder working, however I can't do the 'fiddling' in the callback function as the user doesn't select the files straight away.
I've investigated this a bit further and I've found a solution in the CFileDialog class on the m_ofn structure, on this we can set the Flag variable to 'OFN_NOCHANGEDIR' which according to MSDN
"Restores the current directory to its original value if the user changed the directory while searching for files.
Windows NT 4.0/2000/XP: This flag is ineffective for GetOpenFileName."
unfortunately I'm working on XP so I can't use this, so what I'm going to do is manually go through the selected directory get a list of all files which are of the right type and then populate a list box with these files. A Bit long winded but at present I don't have any other ideas.
If you have any ideas or comments on this please let me know,
thanks,
Andy
|
|
|
|
|
Hi,
My question is really two-fold, I'm more looking for direction that actual code answers!
First, I want to use display a clock in my applicatio that uses an atomic clock to sync its time with. What is the recommended way to do this/links to useful info?
Second, I also need to display the time of other timezones, say I'm in LA, and want to diplay the time for London and NY. Does any body have links to information on how one would go about determing the time in other timezones,area. My biggest issue is with how the user can pick his location and how the software knows the timezone/etc at that location?
Many thanks in advance,
Mark
|
|
|
|
|
mr_mark_hewitt wrote:
First, I want to use display a clock in my applicatio that uses an atomic clock to sync its time with. What is the recommended way to do this/links to useful info?
Modern versions of Windows (XP, 2003) come preconfigured to contact time.windows.com using the Simple Network Time Protocol[^]. If you join a machine to a 2000 or 2003 Active Directory domain, the machine then gets its time from the domain controller.
Second, I also need to display the time of other timezones, say I'm in LA, and want to diplay the time for London and NY. Does any body have links to information on how one would go about determing the time in other timezones,area.
My World Clock[^] sample application does this. Source code is available at that link - it's a C# application but uses OS function calls for the actual time conversions. The tricky bit is handling daylight savings time - otherwise it would be a simple offset calculation.
My biggest issue is with how the user can pick his location and how the software knows the timezone/etc at that location?
You'd have to have some kind of database of locations and the corresponding time zones.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Wow, cool, many thanks for the link, great article!
The API function should do the trick just fine, I'll scan the net a bit to see if I can come up with an implementation someone did for 9x, otherwise this feature just won't be supported on those OS'es
Many thanks again!
|
|
|
|
|
mr_mark_hewitt wrote:
First, I want to use display a clock in my applicatio that uses an atomic clock to sync its time with. What is the recommended way to do this/links to useful info?
You can use RFC-1035, RFC-867, or RFC-868 for this. I've found examples of each to be plentiful via Google.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Dear All,
I am vc++ newbie. I need to create virtual directory in IIS 5.0/6.0 from vc++ 6 application I have this sample. http://www.installsite.org/pages/en/isp_net.htm[^] It is gives lots of errors when i comple it in VC++ 6.0. Can any one send me a sample code to create Virtual ditectory in IIS 5.0/6.0 from vc++ 6 application.
Thanks in Advance
|
|
|
|
|
You probably need an updated Platform SDK. Download it from Microsoft SDK Update[^]. Tell the installer to register with VC++ 6 if requested.
If that doesn't help try defining _WIN32_WINNT to 0x0500 before including any headers (e.g. at the start of your stdafx.h).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
How can I change the background color in of dialog form if the values for red,green and blue are entered through three text boxs which are placed on the first dialog forms.The resultant color RGB color is displayed on the second dialog form.
Can anyone please help me in this matter
Hopping for a early reply from any one .
PHILIP
|
|
|
|
|
In the second dialog form create a brush
CBrush m_brBk;
m_brBk.CreateSolidBrush(RGB( r,g,b ) );
OverRide OnEraseBackground
CRect rc;
GetClientRect(&rc);
hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
Hi, everyone:
I have a problem about how to open a document file with a specific application or pass some parameters into the application while opening the document file.
For example:
I need to open a .nrv file, a Nero file. But using ShellExecute() would always open Nero in traditional mode. I wanna open the .nrv file by Nero Express. I examine the shortcut of the Nero Express is like this:
"C:\Program Files\Ahead\Nero\nero.exe" /w
It looks like passing a parameter into the nero.exe, how can I do that through programming? Thanks!
|
|
|
|
|
In ShellExecute
HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
<code>LPCTSTR lpParameters, </code>
LPCTSTR lpDirectory,
INT nShowCmd
);
pass \W in lpParameters
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
But that would only execute Nero Express but not open the .nrv file if lpFile is passed with the path of nero.exe and lpParameters is passed with /w . On the other hand, if lpFile is passed with the path of the .nrv file, the parameter /w is ignored since it views .nrv file as a document file, as MSDN said. Actually it didn't work...
But thanks for your reply anyway...
My code is like this:
// csFilePath is a CString object which is equal to the path of the nero.exe
// or the path of the .nrv file.
ShellExecute(GetSafeHwnd(), NULL, csFilePath, "/w", NULL, SW_SHOWNORMAL);
|
|
|
|
|
I didn't check but what will happen if you attch your parameters right to the filename?
|
|
|
|
|
ytod wrote:
ShellExecute(GetSafeHwnd(), NULL, csFilePath, "/w", NULL, SW_SHOWNORMAL);
Use it this way
CString str;
str.Format("/w %s",<code>lpFileNameToOpen</code>)
then
ShellExecute(GetSafeHwnd(), NULL, csFilePath,<code>str</code>, NULL, SW_SHOWNORMAL);</
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi! I downloaded the source code for the simple MP3 player from this site. I am trying to add volume buttons in MFC. I added the buttons and functions with the class wizard in Visual C++ 6.0, but my functions are not working. Here is my code:
void CAVIPlayerDlg::OnVolumeDown()
{
long vol;
vol = MCIWndGetVolume(m_Video);
vol-=250;
MCIWndSetVolume(m_Video,vol);
}
void CAVIPlayerDlg::OnVolumeUp()
{
long vol;
vol = MCIWndGetVolume(m_Video);
vol+=250;
MCIWndSetVolume(m_Video,vol);
}
It runs, but the call MCIWndGetVolume(m_Video) returns 0 each time, and the volume isn't affected. Any ideas?
|
|
|
|
|
You may need to check if m_Video is a valid MCIWnd handle...
If so, use this function to check the error code: MCIWndGetError( ).
Good luck!
|
|
|
|
|
Hello,
I'd like to loop over a std::list and for a given element in the list, get a pointer to that element. My code looks something like this:
<br />
Object* pointerToObject;<br />
iteratorType listStart, listEnd, listIt;<br />
list<Object> objectList = getObjectList(); <br />
listStart = objectList.begin();<br />
listEnd = objectList.end();<br />
for(listIt = listStart; listIt != listEnd; listIt++)<br />
{<br />
pointerToObject = listIt;
}<br />
<br />
Any ideas?
Thanks!
-Jordan Atlas
|
|
|
|