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. Error Again!

Error Again!

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
2 Posts 2 Posters 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Here is my source code : BOOL APIENTRY SavingDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ...... ...... } \\ here is the error . The complier shows the below error: C:\msdn cd1\SAMPLES\MSDN\TECHART\asfasasfas\dialogs.cpp(293) : warning C4715: 'SavingDlgProc' : not all control paths return a value. So what can be done to solve it?

    R 1 Reply Last reply
    0
    • L Lost User

      Here is my source code : BOOL APIENTRY SavingDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ...... ...... } \\ here is the error . The complier shows the below error: C:\msdn cd1\SAMPLES\MSDN\TECHART\asfasasfas\dialogs.cpp(293) : warning C4715: 'SavingDlgProc' : not all control paths return a value. So what can be done to solve it?

      R Offline
      R Offline
      Rick Benish
      wrote on last edited by
      #2

      Your explaination seems a little vaige but here are some ideas. First of all the warning C4715 indicates that you are not returning a value for at least one control path. This means you are not setting the return value in some logical case. More than likley something like: BOOL APIENTRY SavingDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { BOOL bRet; if(something) { bRet = true; return bRet; } else { //not setting bRet here as a return value } } \\ here is the error . Since this is only a warning from the compiler I doubt its causing an error. I will however for arguments sake assume that when you state "here is the error". That you mean you are getting an error during debugging on the last line of this function. This line of code is were the function goes out of scope and cleans up anything allocated by this function. So I would guess that somewhere in this function you are overwritting something on the stack, that is currupting the computers memory stack. Check any NEW allocations!! If you want more help with this please supply more info thanks!!

      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