Solved

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

Posted on 2000-03-04
8
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 106
How to determine file rename from EventLog ? 2 62
lucky13 challenge 11 168
mapBully challenge 6 202
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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