Hi
i am a newbie and i know nothing about win32 and i want to learn win32 programming.do you know any tutorial which is very simple for beginners ??
Hi
i am a newbie and i know nothing about win32 and i want to learn win32 programming.do you know any tutorial which is very simple for beginners ??
Maybe ask bennyandthejets. I saw in a previous thread that he mentioned something about "theForger's API tutorial". Check the thread
I've started using this tutorial. It's been extreamly helpful.
This space for Rent.
win32 and windows programmgin is the same thing right?
? no its not, there were versions of windows before WIN95 ya knowOriginally posted by Driveway
Yes, it is
hello, internet!
only a couple, and I don't think anyone's gonna be devopling for those
actually quite a few, and if people hadn't developed for them there wouldn't have been a win95.Originally posted by Driveway
only a couple, and I don't think anyone's gonna be devopling for those
but anyway, this is not relevant to the question. whether or not they are being developed for anymore, windows is not the same thing as win32. no how no way.
hello, internet!
on those it says i need a resource editor to make a windows code work. know where i can get one?Originally posted by Eibro
http://www.sunlightd.com
I use the lcc-win32 resource editor; lcc is theoretically a c-only compiler but I do like the resource editor. You can find it at http://www.cs.virginia.edu/~lcc-win32/
Claus Hetzer
Compiler: Borland 5.5 (on Windows)
Solaris CC (on Unix)
Known Languages: C++, MATLAB, Perl, Java
thank for giving tutorial site!!!
I have read about Directx Audio.But I don't know
what it is?
i saw they use #include<dmusici.h> in the source code
(the program perform loading sound & music from music file)
I don't understand it any more.!!!
please help me!!! thank you
How can we know to use that API funtions!!!!!
#include <dmusicc.h>
#include <dmusici.h>
/*DirectMusic initialisation works slightly differently from that of DirectDraw. It uses the standard COM call CoCreateInstance to create the IDirectMusicPerformance object. Therefore, we don't need a library for DirectMusic. You will have to add OLE32.LIB for CoCreateInstance, though.*/
BOOL InitDirectMusic()
{
::CoInitialize(NULL);
::CoCreateInstance(CLSID_DirectMusicPerformance, NULL,
CLSCTX_INPROC, IID_IDirectMusicPerformance8,
(void **)&g_pPerformance);
/*We now initialise the audio. We want the defaults for almost everything. We will specify a standard music (stereo and reverb) setup:*/
g_pPerformance->InitAudio(NULL, NULL, NULL,
DMUS_APATH_SHARED_STEREOPLUSREVERB,
64, DMUS_AUDIOF_ALL, NULL);
/*We must now create an IDirectMusicLoader object, which will load our audio files for us.*/
::CoCreateInstance(CLSID_DirectMusicLoader, NULL,
CLSCTX_INPROC, IID_IDirectMusicLoader8,
(void **)&g_pLoader);
/*We need a cleanup function:*/
void ExitDirectMusic()
{
if (g_pPerformance)
{
g_pPerformance->CloseDown();
g_pPerformance->Release();
g_pPerformance = NULL;
}
if (g_pLoader)
{
g_pLoader->Release();
g_pLoader = NULL;
}
}
/*Loading a Sound
Unlike DirectDraw, in which we had to call a GDI function to load an image file, in DirectMusic we use an IDirectMusicLoader object. This gives us back an IDirectMusicSegment object, which represents the loaded music data, which we can then play through the performance.
Unusually (and in contrast to DirectInput), DirectMusic interfaces all operate in Unicode. We can call LoadObjectFromFile to load a music file:*/
IDirectMusicSegment8 *pSegment = NULL;
g_pLoader->LoadObjectFromFile(CLSID_DirectMusicSegment,
IID_IDirectMusicSegment8, L"passport.mid", (void **) &pSegment);
This file is a standard MIDI file, containing all the patch and tempo changes for the piece. We must tell DirectMusic this:
// Standard MIDI file
g_pBackgroundMusic->SetParam(GUID_StandardMIDIFile,
0xFFFFFFFF, DMUS_SEG_ALLTRACKS, 0, NULL);
We want the file to repeat over and over:
// Repeat forever
g_pBackgroundMusic->SetRepeats(DMUS_SEG_REPEAT_INFINITE);
We must now download this segment to the audio system, to make sure all the instruments are loaded.
pSegment->Download(g_pPerformance);
Now we will play it. The segment will loop, as we specified.
g_pPerformance->PlaySegment(pSegment, DMUS_SEGF_AFTERPREPARETIME, 0, NULL);
And finally, we must stop the sound when we finish.
g_pPerformance->Stop(NULL, NULL, 0, 0);