Thread: win32 development

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    80

    win32 development

    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 ??

  2. #2
    Veni Vidi Vice
    Join Date
    Aug 2001
    Posts
    343
    Maybe ask bennyandthejets. I saw in a previous thread that he mentioned something about "theForger's API tutorial". Check the thread

  3. #3

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    23
    I've started using this tutorial. It's been extreamly helpful.
    This space for Rent.

  5. #5
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    win32 and windows programmgin is the same thing right?
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  6. #6
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Yes, it is

  7. #7
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Driveway
    Yes, it is
    ? no its not, there were versions of windows before WIN95 ya know
    hello, internet!

  8. #8
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    only a couple, and I don't think anyone's gonna be devopling for those

  9. #9
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Driveway
    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.

    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!

  10. #10
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    Originally posted by Eibro
    http://www.sunlightd.com
    on those it says i need a resource editor to make a windows code work. know where i can get one?
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  11. #11
    Registered User
    Join Date
    Jun 2002
    Posts
    82
    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

  12. #12
    Registered User
    Join Date
    Sep 2002
    Posts
    1
    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);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  2. Replies: 1
    Last Post: 10-24-2005, 06:35 AM
  3. Win32 API or Win32 SDK?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 07-20-2005, 03:26 PM
  4. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM