Ok guys I did it!! After an hour of searching MSDN I had an idea. If I used lpstrInitialDir, part of typedef struct tagOFN, As a value for ShellExecute's default directory value. Then use GetFileName() just for the name of the file, you can open anything at any time. This is very ghetto!! I...
Ok, the double backslash works, but now how do i get the path of whatever the user selects to be executed by ShellExecite?
void Options::OnBUTTON3song()
{
CFileDialog m_ldFile(TRUE);
if (m_ldFile.DoModal() == IDOK)
{
m_path = m_ldFile.GetPathName();
//m_path is a static control that displays...
your probally correct, this is how i used your ShellExecute.
int CAlarmClockDlg::Ontestbutton()
{
ShellExecute (NULL,"open","C:/unzipped/demo.mp3",NULL,NULL,SW_SHOWNORMAL);
return 0;
}
And it works. Yet when i use GetPathName() on a static text it returns it with...
Hello,
I've built a CFileDialog class that calls an open dialog window. I then use the GetPathName() to retrieve the path of the file. Once a condition is met in another part of my program that file is executed using ShellExecute. The problem is that to open a file you use a path like this...
Thank you Leibnitz! But you answered another question of mine. Perhaps I wasn't very clear. On my main form I have a menu. I want the menu to open another form so that the user can manipulate my program's optoins. Any ideas?
Hello, I'm a new programmer to Visual C++. Currently I'm working on a project and am having trouble trying to figure out how I can open another form from the first one. Thanks for the help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.