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...
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?
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)...
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...
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)...
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
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
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...
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()...
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*??
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
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?
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*??
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.