Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. EORCandy

    Learning algorithms

    You may want to purchase "The Art of Computer Programming" by Donald E. Knuth (Get the latest version.) It is a three volume set that discusses all kinds of different algorithms (albeit in a mathematical form.) This is the de facto trilogy on alogrithms in general. Hope this helps...
  2. EORCandy

    is String to char possible?

    My apologies. I'm suffering from a brain hiccup. I posted my previous method twice. *~-> EOR Candy <-~*
  3. EORCandy

    is String to char possible?

    Take a look at the &quot;mbstowcs&quot; C run time function or &quot;MultiByteToWideChar&quot; Platform SDK API call. Hope this helps! Happy coding! :) *~-> EOR Candy <-~*
  4. EORCandy

    Finding handle (hwnd) in a MFC Appwizard (exe) project

    Try this: CYourClass::SomeMethod() { HWND hWnd = NULL; CWnd* pWnd = NULL; pWnd = ::AfxGetMainWnd(); // pWnd = ::AfxGetApp()->m_pMainWnd; will work also. if (pWnd) hWnd = pWnd->m_hWnd; // All being well, hWnd should contain the HWND of your main window. } This will give you the HWND of...
  5. EORCandy

    Custom Control (Soccer League Table) From Ground-Up

    Cool! I am a HUGE soccer fan myself (and I referee youth soccer games.) If you could explain more exactly what you are trying to achieve, I will try to help. Happy coding! :) *~-> EOR Candy <-~*
  6. EORCandy

    Error Message when closing application

    I thought of something else. Be sure that in any one allocated memory block that you do not write more data to it than the size of the allocated block. For example, if you allocate a block of 4096 bytes of memory and then proceed to write 5000 bytes of information to that block, you more than...
  7. EORCandy

    Pass a value to another CDialog

    To pass values among dialogs (CDialog's): 1) Create a CString member value in each dialog class. 2) If the user selects OK in the first dialog class, save the value in the CString member variable (of the first dialog class.) 3) After calling DoModal() on the first dialog, assign the CString...
  8. EORCandy

    Experiences in developing API

    So you want to develop your own API and/or extension API? Here are some suggestions: 1) If you're using C++, see if there are any MFC classes that impement TAPI (Sorry, I have't done much with TAPI :( ). If so, subclass them and add your own extension methods in that subclass. If there are...
  9. EORCandy

    no help button in CProperySheet

    I would imagine you would be able to use CreateDialog to create a modeless dialog but then you must be sure that OnCancel and OnOK do not call the respective base class member functions becuase these in turn will call EndModal which you do not want to happen with a modeless dialog. In regard to...
  10. EORCandy

    no help button in CProperySheet

    I found this out by applying DeMorgan's Law and/or boolean algebra (my memory is hazy on the specifics.) This essentially says that: &quot;A OR B&quot; and &quot;NOT A AND NOT B&quot; are logically equivalent so that if: m_psp.dwFlags |= PSP_HASHELP shows the help button then the...
  11. EORCandy

    Modeless Dialog from DLL causes Assertion fails

    I noticed the DLLEXPORT in several of your routines. If you are relying on a method in a DLL to be automatically called in response to a notification message, this will not work because DLLs do not have messaging loops so there is no way for a DLL to receive a notification message. Be sure...
  12. EORCandy

    Error Message when closing application

    The only thing I can think of is that every time you allocate a block of memory, write down its memory address. Every time you release a block of memory, note the memory address of the pointer to the block of memory BEFORE the release operation (free() or delete) If you find a base address...
  13. EORCandy

    prblems with GlobalFree in drag and drop

    One possibility is that you should only perform the GlobalUnlock in the OnDrop method since the data is cached in OnBeginDrag and then accessed when processing another notification message (specifically dropping) and therefore the data needs to be valid for the lifetime of multiple notification...
  14. EORCandy

    a problem of access violation

    Without seeing some code, the only thing I can think of is the following scenario: I'll use a hypothetical function called theFunc that takes a CComboBox* as a parameter. Assume you encounter documentation that says &quot;pass a pointer to a CComboBox in the call to theFunc(CComboBox*...
  15. EORCandy

    Help with type conversion (char to time_t)

    I not sure exactly what you are trying to do. Keep in mind that &quot;char&quot; is a type and &quot;time_t&quot; is of type long. Hope this helps. Happy coding! :) *~-> EOR Candy <-~*
  16. EORCandy

    Error Message when closing application

    It appears that dynamically allocated memory is not being freed properly. Be sure that your &quot;delete&quot; (C++ operator) or &quot;free&quot; (C function) is releasing the correct block of memory. Be careful! The C functions (malloc, free, et al.) and C++ operators (new, delete) are NOT...
  17. EORCandy

    best way to copy a file

    Look at the CopyFile/CopyFileEx API functions. Hope this helps. Happy coding! :) *~-> EOR Candy <-~*
  18. EORCandy

    dialog based windows

    It sounds like you want to create a modeless dialog box. Look at the &quot;CreateDialog&quot; and &quot;CreateDialogParam&quot; API functions. There are also MFC examples for creating modeless dialogs. Hope this helps. Happy coding! :) *~-> EOR Candy <-~*
  19. EORCandy

    no help button in CProperySheet

    I use this all the time. The trick is that you need to modify the flag (PSH_HASHELP) for EACH property page (CPropertyPage) that you include in the property sheet (CPropertySheet.) You also must do this BEFORE calling DoModal(); Here's a quick code snippet example: COptsSheet...

Part and Inventory Search

Back
Top