Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Trying to load a wave file into a class from the resource's

Trying to load a wave file into a class from the resource's

Scheduled Pinned Locked Moved C / C++ / MFC
performancelearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simon alec smith
    wrote on last edited by
    #1

    I have come across a program that displays a jpg image, which can be opened in the usual manner. However I noticed at start up it displays a default image loaded from memory(resoucres). The statement m_pict.Load(IDR_MAINFRAME); I thought that this sort of method could work well,in effect with a program that plays sounds (waveBox - from the articles), I have looked in the resources and it allows you to load 'wave' files into it. can anybody explain maybe why this is not working. I have also tried including the resource.h is there any oversite in my part many thanks Simon

    S 1 Reply Last reply
    0
    • S simon alec smith

      I have come across a program that displays a jpg image, which can be opened in the usual manner. However I noticed at start up it displays a default image loaded from memory(resoucres). The statement m_pict.Load(IDR_MAINFRAME); I thought that this sort of method could work well,in effect with a program that plays sounds (waveBox - from the articles), I have looked in the resources and it allows you to load 'wave' files into it. can anybody explain maybe why this is not working. I have also tried including the resource.h is there any oversite in my part many thanks Simon

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      simon alec smith wrote:

      can anybody explain maybe why this is not working.

      Why what isn't working? You can load any file type from resources - this page[^] describes the process reasonably well under the 'Creating a Resource List' heading:

      1. call FindResource or FindResourceEx with the resource name to get the resource handle;
      2. call LoadResource with the resource handle to get the global handle;
      3. call LockResource with the global handle to get a pointer to the resource data.

      I've done this several times - it works really well.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups