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. PhilMunro

    Input from a file problems

    To be honest, I'm not quite sure how you've managed this! The problem has nothing to do with file handling - it's a linking problem. The compiler cannot find the library containing the file stream classes you're referencing in your code. Whenever you see 'error LNK2001' then you know that the...
  2. PhilMunro

    Derived classes and function parameters...

    Also - your class data members (cFname, cLname, and iIDNumber) should be either protected or private. They should not be directly accessible outside the scope of your class. This is good programming practice, but on a more fundamental level, data hiding is the whole point of C++ classes. Add...
  3. PhilMunro

    Problems With MFC Control ...

    If you declare a pointer to your class, don't forget to use the 'new' and 'delete' operaters, otherwise referencing a null pointer will cause a runtime error: MyClass* pMyClass; pMyClass = new MyClass; pMyClass->FuncA(x); delete pMyClass; A much simple solution is: MyClass myclass...
  4. PhilMunro

    SQL help

    I'm not sure if you're asking about which ADO command to use (I assume that's what you're using) or how to handle a Windows message triggered when a button is clicked? Phil
  5. PhilMunro

    Drawing graphs/charts using Visual C++?

    Windows based graphics (which is what you're talking about) is quite a large leap from console apps. I'd recommend finding a class which does this for you rather than struggle through yourself, otherwise you've got quite a steep learning curve ahead of you. If you want to learn, find an...
  6. PhilMunro

    NetFileEnum : not getting any result

    Check that the first three params you are passing are definitely Unicode strings. I've had a similar problem myself where an ANSI string was causing function failure. Alternatively, try doing the memory allocation/deallocation yourself (as with Win9x) and see what happens. Phil
  7. PhilMunro

    a question on EndPaint

    I'm guessing, but I assume it would cause a memory leak if you don't call EndPaint after each call to BeginPaint, and if your window client area is being updated frequently (as it probably will be) that's going to have quite a big impact on resources. Phil
  8. PhilMunro

    How do I create a HDC for the "FormView"?

    I'm guessing you want to get a handle to the DC of your dialog's client area, but you haven't said whether you're doing this using the Win32 API or MFC. Phil
  9. PhilMunro

    Timeout on send and recv calls

    Try the Windows API function MsgWaitForMultipleObjectsEx which takes a timeout value as one of it's parameters. I'm not sure whether it's the right thing for Winsock, but I've used it for communicating with Pocket PCs with 100% success. Phil
  10. PhilMunro

    Untitled and Need Logo instead of MFC.

    References to all project resources are contained in the '<name>.rc' file. Open it in Notepad to view the contents (if you double-click it in Visual Studio, it will simply launch the resource editor). To change the MFC icon, remove the current one and either insert an existing icon or draw your...
  11. PhilMunro

    Transfer Data between C++ and Excel

    Try the 'COMEXCEL' Automation sample in MSDN. Good luck Phil
  12. PhilMunro

    Load picture in win32 console?

    Hi Cantalope My only question is why on earth would you want to do this??? Console apps are specifically designed for quick output of text-only data. If you want to display a bitmap, create a Windows window or MFC window and display it in that. Phil
  13. PhilMunro

    MFC OnOK()

    OnOk is a member of the CDialog and CPropertyPage MFC classes. It's not a global Win32 function and can't just be called without some form of scope resolution (::) unless your class is specifically derived from the two classes just mentioned. If you create a dialog based application using the...
  14. PhilMunro

    Is it possible to use MFC classes in a no-MFC dll?

    Without linking your DLL to the MFC runtimes, no you won't be able to use any of the MFC classes (such as CObject, etc). The MFC libraries are an annoying overhead, both in terms of performance and size (especially when you have to ship them with a relatively small application) but I think the...
  15. PhilMunro

    Whether an application is running?

    This will only work under 95/98, but not NT/2000 . See &quot;HOWTO: Enumerate Applications in Win32&quot; in MSDN.
  16. PhilMunro

    CreateToolhelp32Snapshot fails under Win2000

    Hi Udo Sorry for the late reply. Getting process information from a Win9x machine and an NT/2000 machine is completely different, making it a real pain (especially if you're not sure what the target machine's running). See &quot;HOWTO: Enumerate Applications in Win32&quot; in MSDN. There's an...
  17. PhilMunro

    Initialize a COledateTime object

    I has exactly the same problem. Unfortunately, the answer is that you can't a initialise a COleDataTime object to a non-date value (makes sense really). You must comply with the valid range for whichever day/month/year you're dealing with.
  18. PhilMunro

    i want to display jpeg, bmp etc. in

    Hi vkarthik You've got two options. You can use the CStatic control (I assume this is on a dialog) and use the CStatic::SetBitmap member. Alternatively, you can access the view or dialog's DC (device context) directly and call the CDC::BitBlt member to 'blit' a bitmap directly to the window...
  19. PhilMunro

    Changing Access 97 DB password using ADOX

    Think I've answered my own question. I need to use JRO (Jet and Replication Objects) and not ADOX. If anyone has some example code using JRO to change an Access database password, it'd be a great help. As usual, 90% of Microsoft's data access examples are in VB :(
  20. PhilMunro

    Controlling client programs

    This is quite a task for someone new to VC++. Have a look at some DCOM examples, but I think you really need to familiarise yourself with writing COM components for desktop first! Good luck.

Part and Inventory Search

Back
Top