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

    Double Buffering

    Hi Sorry I still can't get this working - I'm obviously not understanding something CBitmap bitmap; //declare array of CBitmap objects CDC dcMemory; //declare array of Memorys BITMAP bmap; //declare array of BITMAP objects (for getsize of bitmap) CDC memDC; //Load Bitmap...
  2. Jaredino

    Double Buffering

    Thanks for the reply. Sorry I am new to this - how do I create a memory DC the same size as the screen? When you say 'draw to the memory DC' do I use the StretchBlt() function?
  3. Jaredino

    Double Buffering

    Hi I have the following code to draw 3 bitmaps on the screen (of a formview): CBitmap bitmap[4]; CDC dcMemory[4]; BITMAP bmap[4]; int bmpWidth = 0, bmpHeight = 0; //Load Bitmap1 bitmap[1].LoadBitmap(IDB_GUITAR1); dcMemory[1].CreateCompatibleDC(pDC)...
  4. Jaredino

    ListBox

    Thanks, I used the second way. I forgot that the dialog, and therefore the string would be deleted once the dialog closed!
  5. Jaredino

    ListBox

    Yeah, so the idea is that the variable m_CursorSel contains the string say "Drums" until the user clicks the toolbar button again to reopen the dialog. The m_CursorSel will be assigned he newly selected string say "Bass" or even "Drums" again. It might even be good to store the list of...
  6. Jaredino

    ListBox

    Hi, I've tried a number of things but just can't get this to work. I have a list box containing a number of strings: void CInstrumentDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CInstrumentDlg) DDX_LBString(pDX, IDC_LIST_INSTRUMENT, m_CursorSel)...
  7. Jaredino

    Add buttons & sliders automatically

    Yeah thanks I've got it working
  8. Jaredino

    Add buttons & sliders automatically

    Thanks. So do I place all the code in the toolbar buttons onClick() function? (I am guessing not since it causes the program to crash) Sorry I am new to this
  9. Jaredino

    Add buttons & sliders automatically

    Hi, I have created a new SDI project which is a formview and have added a number of buttons and sliders in a group box. Does anyone know how I can add a copy of this layout to the form when the user clicks the appropraite button on the toolbar? Any help would be appreciated, thanks
  10. Jaredino

    Calling functions from other classes

    It just comes up with these 3 errors in the Wavfile header: wavfile.h(37) : error C2146: syntax error : missing ';' before identifier 'header' wavfile.h(37) : error C2501: 'CWavHeader' : missing storage-class or type specifiers wavfile.h(37) : error C2501: 'header' : missing storage-class or...
  11. Jaredino

    Calling functions from other classes

    Hi I'm creating a project in MFC for the first time. In 'normal' C++ to call a function from class CWavHeader in the class CWavFile I would simply do this #include "WavHeader.h" class WavFile { .... .... CWavHeader header } Then in cpp file: header.getSampleRate()...
  12. Jaredino

    CString to char*

    Thanks!
  13. Jaredino

    CString to char*

    Hi, I have read lots of posts on this but still can't come up with any answers. I have a CString named 'm_sResults1' that needs to be passed to a function named 'openWavFile()' that expects a char*. How do I convert a CString to a char*??
  14. Jaredino

    CString to char*

    Ooops sorry Ignore me I'll go try the right one should I? Thanks anyway!
  15. Jaredino

    CString to char*

    Yes, the declaration for the function is: void CWavFile::openWavFile(char* fileName) The function is called within CWavFile.cpp file The member variable m_sResults is in a different class
  16. Jaredino

    CString to char*

    Thanks for your quick replies but I'm new to programming so unfortunately I don't know what either 'dimming' or 'passing by reference' is! Is there not just a line of code that can assign a CString object to whatever the pointer is pointing at?
  17. Jaredino

    CString to char*

    Hi, I have read lots of posts on this but still can't come up with any answers. I have a CString named 'm_sResults1' that needs to be passed to a function named 'openWavFile()' that expects a char*. How do I convert a CString to a char*??

Part and Inventory Search

Back
Top