Solved

*.gif, *.DLL, *.mid, etc. questions.

Posted on 2000-03-04
8
188 Views
Last Modified: 2013-11-20
Hi Everybody!

I have a couple of questions:

1). How does one play a midi file continuously using MFC (VC++ 6.0)
I have the source code for the Windows API SDK but I am finding a little tough to convert the MM_MCINOTIFY message to appropriate message map and message handler entries in MFC.

2). How does one load *.gif and *.jpg files in Windows using MFC. I know that *.bmp files can be easily loaded using the LoadBitmap function. But can someone give me the functions for loading a gif and jpg file in MFC.
Someone pointed to me to
http://web.ukonline.co.uk/Members/julian.smart/code.html
but I cannot find this page.

3). Is there a program in this planet that can list all the functions stored inside a *.DLL file and their prototypes. Also how can I call such a function using MFC.

4). There are 2 ways one can build a project in VC++. One is the Debug version and the other is the Release version. Someone told me that I should do all my development in the Debug version as one can use the macros such as ASSERT(), Debug(), ASSERT_VALID(), etc. in this version. For actual distribution of the software one should recompile in Release version and distribute this program. Is this true?

Thanks in advance.
0
Comment
Question by:jawrani
  • 4
  • 3
8 Comments
 

Expert Comment

by:AidanHolmes
ID: 2583952
On points 3) and 4)

*.DLLs are similar to .EXEs in windows. You need to decipher them by reading the information contained in the .DLL or .EXE header. Go to http://www.wotsit.org/search.asp?section=binary
and look at the PE format. You will then have to write code to read the header inforamtion.

The answer to 4) is yes, but the actual benefit is that you can set breakpoints within your program and step through the execution of your code. Try it by going to any line of your code and setting a breakpoint (F9). Then run in debug mode (F5) and you'll see that the program stops on the line that the breakpoint is on. Also debug mode uses the debug versions of headers and libraries. This means that memory exceptions and other errors in your code can be detected. MFC also tells you about memory leaks.

BTW Too many questions...
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 2583996
1.
BEGIN_MESSAGE_MAP(CMyWnd, CWnd)
    ON_MESSAGE(MM_MCINOTIFY, OnMMMCINOTIFY)
END_MESSAGE_MAP()


LONG CMyWnd::OnMMMCINOTIFY(UINT wParam, LONG lParam)
{
    //...
    return 0L;
}

2. http://www.anthemion.co.uk/code.htm

3. Dependency Walker (depends.exe)
http://www.dependencywalker.com

But it can only list the function names. There is no way to list the parameters.

4. Yes.
0
 

Author Comment

by:jawrani
ID: 2585182
Thanks chensu.
But for question 2). I want a function from you like LoadGIF (LPTSTR lpszFileName) and LoadJPEG (LPTSTR lpszFileName). I have checked out the site but hey the amount of source code takes me aback. Actually I am developing a screen saver and want to load the *.gif files in the OnTimer (UINT) function. Please Help.

I will check the answers of the rest tomorrow.

Thanks chensu.
0
 

Author Comment

by:jawrani
ID: 2585195
Thanks chensu.
But for question 2). I want a function from you like LoadGIF (LPTSTR lpszFileName) and LoadJPEG (LPTSTR lpszFileName). I have checked out the site but hey the amount of source code takes me aback. Actually I am developing a screen saver and want to load the *.gif files in the OnTimer (UINT) function. Please Help.

I will check the answers of the rest tomorrow.

Thanks chensu.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jawrani
ID: 2585204
Thanks chensu.
But for question 2). I want a function from you like LoadGIF (LPTSTR lpszFileName) and LoadJPEG (LPTSTR lpszFileName). I have checked out the site but hey the amount of source code takes me aback. Actually I am developing a screen saver and want to load the *.gif files in the OnTimer (UINT) function. Please Help.

I will check the answers of the rest tomorrow.

Thanks chensu.
0
 
LVL 23

Expert Comment

by:chensu
ID: 2586486
2. That is a library and it comes with samples. Look into it. It is not hard to use.
0
 

Author Comment

by:jawrani
ID: 2592747
Thanks Chensu.
You get the credit.

Could You please tell me how to go about making a registry cleaner. I mean how to check for Orphan entries in the registry and the broken links therein.

Any links/sites/source code will be welcomed.

Thanks.

0
 
LVL 23

Expert Comment

by:chensu
ID: 2592896
According to EE's policy, you may ask one question per question. Please post a new question. I will answer it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
repeatSeparator  java  challenge 13 56
windows 10 how make picture as desktop background 2 58
sum67 challenge 35 93
firstChar challenge 13 110
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now