Solved

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

Posted on 2000-03-04
8
187 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

17 Experts available now in Live!

Get 1:1 Help Now