Solved

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

Posted on 2000-03-04
8
189 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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
 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

813 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

8 Experts available now in Live!

Get 1:1 Help Now