|
See the article:
Use member functions for C-style callbacks and threads - a general solution
INTP
|
|
|
|
|
Hi, I'm writing an mp3 player using DirectShow. I want my player to be able to load some sort of playlist.
To do this, I need a way to specify a search directory, like for instance
c:\mp3\
the mp3 dir would serve like a root directory, storing every mp3 file i got in albume directories.
like for instance:
c:\mp3\albume1
c:\mp3\albume2
c:\mp3\albume3
my application needs to search for directories in the mp3 directory and make a list like the one above.
But I don't know what functions could be used to make this serach possible.
Also, I need a way to search every albume directory for mp3 files.
Could anyone guide me to which functions might do what I need?
thanks alot!!
|
|
|
|
|
FindFirstFile/FindNextFile
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hello,
You should use the CFileFind class to do the searching! Use the FindFile() method to start the search and use FindNextFile to retreive data.
exemple:
CFileFind ff;
CList<CString, CString&> dirlist;
dirlist.AddTail(_T("YourMp3Directory"));
do
{
if(ff.FindFile(dirlist.RemoveTail()))
{
while(ff.FindNextFile())
{
if(ff.IsDirectory())
{
if(!ff.IsDots())
dirlist.AddTail(ff.GetFilePath());
}
else
{
}
}
}
}while(dirlist.GetCount() > 0);
hope this helps
|
|
|
|
|
could anyone help me about this ?
for example : my program needs to get the MS WORD's horizontal scrollbar handle and control it.my program needs to scroll the document view on its own in this case.
i had tried these functions include : GetScrollInfo / GetScrollBarInfo / PostMessage but can't get the correct handle.....
tks for ur help !!
have a nice day !!
yoyo
|
|
|
|
|
There are three issues here:
Issue #1: How to get the scrollbar HWND
Using a tool like HPS HwndSpy, you can examine the hierarchy of windows that Word uses. In the case of Word 2000 (Office XP), if you open Word with an empty document, you will see this hierarchy:
"Document1 - Microsoft Word" class OpusApp
"" class _WwF
"Document1" class _WwB
"" class ScrollBar
"" class ScrollBar
(The window titles are in quotes, followed by the window class name).
As you can see, there are two scrollbars, one vertical and one horizontal. It seems like the horizontal scrollbar is always second. So, to find the HWND of the horizontal scrollbar programmatically, simply traverse the window hierarchy for Word, until you come to class _WwB, and then grab the second ScrollBar.
Issue #2: It may not work like you expect
Some programs react violently when you try to send them messages. It may work, or it may not work, or it may cause Word to crash. So before you invest a lot of effort into this, you should first verify that it will work as you expect.
Issue #3: Different versions may be - well, different
You should verify that this technique will work on all the versions of Word that you are interested in. Different versions may have different window hierarchies, and may also react differently when you try to control the scrollbar.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
hello,HPSI, tks for ur answer.
i use while loop with "GetWindow(hChild, GW_CHILD)" and ""GetWindow(hChild_1, GW_HWNDNEXT)" to grap the handle but how can i make MS Word's horizontal scrollbar functional ?
should i use PostMessage or SendMessage ? which handle to input ? parent window's handel (form "OpusApp") ? or parent window's child window's handle (_WwB or _WwG or _WwC) ? or the scrollbar's handle ??
tks for ur help !!
have a nice day !!
yoyo
|
|
|
|
|
hey i wanna know which is the best source online to learn vc++.i'm very interested in c++ and now want to extend my skills.can anyone suggest a good free website or link or a good book?
thanx in advance.....
#include"universe.h"
int main()
{
char *galaxy;
while(1)
{
cout<
|
|
|
|
|
|
hey hillmann thanx for your link.but i asked for vc++.you gave a c++ link.so try to give me a good visual c++ one.
and thanx for your complement on that program......
|
|
|
|
|
You need to learn C++ before you can use VC++
|
|
|
|
|
ah, the way you phrased this: "i'm very interested in c++ and now want to extend my skills" made it sound like you wanted to know C++ too.
|
|
|
|
|
How do I delete the history in a ChtmlView? Also, how do I found out what drives are active (i.e. A:, D:, …)? I need to make a program that have an icon representing the drives and the user is able to open the drives.
Thank you
|
|
|
|
|
pdunn wrote:
Also, how do I found out what drives are active (i.e. A:, D:, …)?
_getdrives();
pdunn wrote:
I need to make a program that have an icon representing the drives and the user is able to open the drives.
Maybe you should use the DriveListBox control
Cathy
Life's uncertain, have dessert first!
|
|
|
|
|
Does anyone know how to write a program to burn a DVD, using some API or COM interface?
Also, on a related note, where can I find information on the format of the .VOB and .IFO files that make up a DVD?
Sorry if I am just missing something obvious. I have been known to do that some times.
|
|
|
|
|
Have you looked into the Nero SDK/API[^]? It does both CD's and DVD's.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thanks! Even better yet, I have nero!
Anyway, that appears to solve my problem with burning the disc. It does not seem to be able to generate the .vob and .ifo files required for the DVD.
What I want to do is write a program that will capture video, synchronize the A/V streams, and convert it to DVD format. Ideally, I could capture video directly into a DVD-compatible format. If anyone can help me there, that would be appreciated.
Thanks,
Mike_V
|
|
|
|
|
i want to add the tooltip for the clistctrl's item,when the item changes, the tooltip changes according to the item
how can i do? thanx!
|
|
|
|
|
|
what are the values for the enter adn delete keys?
and how would i map them for a tree control?
|
|
|
|
|
VK_RETURN and VK_DELETE (as defined in WinUser.h)
I would handle them in the TVN_KEYDOWN notification handler
void CMyDialog::OnKeyDownTree(NMHDR* pNMHDR, LRESULT* pResult)
{
NMTVKEYDOWN* pTVKeyDown = (NMTVKEYDOWN*)pNMHDR;
if (pTVKeyDown->wVKey == VK_RETURN)
{
}
else if (pTVKeyDown->wVKey == VK_DELETE)
{
}
*pResult = 0;
}
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
How would you define a 3-dimensional array of vectors (of any type), and how would you access them?
Thanks.
William
Fortes in fide et opere!
|
|
|
|
|
vector< vector < vector < int > > >
Make sure you put spaces between the >, otherwise two of them look like a shift operator >>
Christian
<b>NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU.</b> - <i>Vinod Sharma</i>
<b>Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. </b> - <i> Nemanja Trifunovic</i>
|
|
|
|
|
Thanks!!
William
Fortes in fide et opere!
|
|
|
|
|
I managed to enumerate currently running the processes, but I couldn't show their starting (or creation) time. How Can I do this?
|
|
|
|