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 strongm 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. sparafucile17

    How to Add an Icon to a CButton

    Sorry Pete, Statement withdrawn: delete >> If I sound a little peeved, that's because I am. <<>> That's the problem with text messages, sometimes certain words convey feelings that are not intended by the writer. When you said &quot;ask the question you want answered in the first post to...
  2. sparafucile17

    How to Add an Icon to a CButton

    I'm sorry I &quot;wasted&quot; your time with that one line response. Everytime I submit a long difficult question no one responds to me. An I'm sorry I didn't know that you couldn't have text and a graphic at the same time, I just assume that adding an icon would do just that: Add, not...
  3. sparafucile17

    How to Add an Icon to a CButton

    Ok, That does work, but only when the &quot;Icon&quot; option is checked in the Button control properties. If I leave it unchecked the button does not change. Also, when I am in Icon mode, the normal Button text: &quot;Save&quot; disappears and is replaced by the icon. How do I keep the...
  4. sparafucile17

    How to Add an Icon to a CButton

    Hello all, I was wondering if anyone knew of a way to add an Icon/Bitmap to a Cbutton? I have already included the icon into my project as a resource: IDI_CHECKMARK. I need to find a way to load this into the Button control m_SaveBtn. I know that I can use the member func: SetIcon() which...
  5. sparafucile17

    Using Multiple Views

    Kudos, pdunncs! That definitley did the trick! :-) I probably wasted about 20 hours reading other methods and this was the quickest and easiest way! You definitely earned that star! But on a side note, using this method above.... How would you control the view after using...
  6. sparafucile17

    Using Multiple Views

    Ok... How do you add views to existing templates? Is there a member function of CMultiDocTemplate that can be used to add views? Or something else? Also, when the view is added to the MDI, how do you launch it? Thanks for the help so far, Jeff
  7. sparafucile17

    Using Multiple Views

    The Dialog is AFX_IDD_NEWTYPEDLG. Apparently, if there is only one CDocTemplate the CWinApp::OnFileNew will create a new doucment of that type using it's associated view. However, when there are multiple CDocTemplate's the CWinApp::OnFileNew will prompt the user with the dialog listed above...
  8. sparafucile17

    Using Multiple Views

    Help Please???? [sadeyes] - Jeff
  9. sparafucile17

    Using Multiple Views

    I have a MDI that I would like to use with multiple views. For the most part the views will be CFormViews. What I'd like my app to do is to load a different view for each menu item. In my app, I have a Menu titled &quot;Membership&quot;. Under this menu I have two items: Add New, View All...
  10. sparafucile17

    ODBC Managers

    Well, since nobody could help me I had to help myself. I looked around the web for several hours before I found out that InstallShield does in fact have the capabilities to register data sources in windows. However, I also found out the copy of intallshield I have is just a demo and that the...
  11. sparafucile17

    ODBC Managers

    If someone knows this answer to this one, I'd like to know also! I tried using Install Shield to load the database into the &quot;Data Sources&quot; located in control panel, but did not have much success. Is there another program that can easily do this? Or is it possible through MFC...
  12. sparafucile17

    Child Dialogs in MDI AFC Application

    Actually, no this doesn't help me. You are talking about launching a CFormView, not a dialog. I need to make a dialog a child of a parent MDI. I know there is a property called WS_CHILD for dialogs, I just don't know how to use it. Suggestions?
  13. sparafucile17

    array/pointer problem

    One comment on the use of CString... CString is part of a standard, just not an ANSII standard. It is part of the MFC standard, which if you're using Visual C++ should already be included in your project. If you are using a console app, then you're pretty much stuck with strcpy() and the...
  14. sparafucile17

    array/pointer problem

    javaguy, The problem is that your passing the variable &quot;dayOfWeek&quot; by value and not by reference. In essence your giving the member function a copy of the string ang not the actual address to where it is in memory. To correct this I would change the calling function to...
  15. sparafucile17

    Child Dialogs in MDI AFC Application

    Does anyone know a quick and easy way to make a dialog into a child of a MDI? I tried changing the dialog properties to WS_CHILD but it crashes the program whenever the dialog is launched via domodal(). The application I am designing uses the menu bar to launch several dialogs that need to...
  16. sparafucile17

    How to add a JPEG to JPanel

    Ok this works, but ONLY after a button is clicked or some other GUI command tries to repaint the screen. Initially, the JPG is not visible. Is there something I can do to load it on initial startup? Just to clear things up a little... here is exactly what I'm doing: class myPanel extends...
  17. sparafucile17

    How to add a JPEG to JPanel

    Can anyone give me a quick couple lines of code for adding a JPEG image to JPanel? I need to put a comany logo in my JPanel, but can't find any definitive way to do it. I got as far as creating a Toolkit and opening and Image from it. But now how to I place it on the panel? Currently the...
  18. sparafucile17

    JPanel update/redraw

    Ok, I have a class that extends a JPanel, that is pretty much my primary GUI interface. I have a JFrame that adds this inherited JPanel and uses it as the GUI display. The problem is that I have a JLabel: connStatus in the JPanel that needs to be updated depending on the remote connection...
  19. sparafucile17

    General Try-Catch question

    Ok, here's the deal: I want to try to open a database but want to know if the connection was successful or not. But the only way I know that it wasn't successful is that a sql exception is fired. So I was thinking that I could use a bool to keep track of connection status like so: boolean...

Part and Inventory Search

Back
Top