Click here to Skip to main content
15,891,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Property sheets and pages Pin
thowra17-Mar-04 1:52
thowra17-Mar-04 1:52 
GeneralDetecting if a print job failed Pin
tcss16-Mar-04 23:58
tcss16-Mar-04 23:58 
GeneralRe: Detecting if a print job failed Pin
Blake Miller17-Mar-04 7:45
Blake Miller17-Mar-04 7:45 
GeneralRe: Detecting if a print job failed Pin
tcss17-Mar-04 20:20
tcss17-Mar-04 20:20 
GeneralGDI+ and bitmap resources Pin
bouli16-Mar-04 23:10
bouli16-Mar-04 23:10 
GeneralRe: GDI+ and bitmap resources Pin
Anonymous16-Mar-04 23:31
Anonymous16-Mar-04 23:31 
GeneralRe: GDI+ and bitmap resources Pin
bouli17-Mar-04 0:34
bouli17-Mar-04 0:34 
GeneralRe: GDI+ and bitmap resources Pin
wb17-Mar-04 1:03
wb17-Mar-04 1:03 
Hi!

I have a DLL with a JPEG ressource and the main App,
that shows this.

here ist the Code from the DLL:
BYTE* GetLogo(int &nSize) {
	DWORD dw;
	HRSRC hRes = FindResource(theApp.m_hInstance,_T("IDR_LOGO"),_T("Images"));
	dw = GetLastError();
	HGLOBAL hg=LoadResource(theApp.m_hInstance,hRes);
	LPVOID lpRes=LockResource(hg);
	nSize = SizeofResource(theApp.m_hInstance,hRes);
	dw = GetLastError();

	return (BYTE*)lpRes;
}


and here ist the code from the APP:
void		CWBLogoWnd::SetImage(BYTE*pBuffer, int nSize) {
	IStream *pStream;
	HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, nSize);
	if (hGlobal)
	{
		void* pData = GlobalLock(hGlobal);
		if (pData)
			memcpy(pData, pBuffer, nSize);		
		GlobalUnlock(hGlobal);
		CreateStreamOnHGlobal(hGlobal, TRUE, &pStream);			
	}

#ifdef _DEBUG
#undef new
	m_pImage = new Image(pStream,true);
#define new DEBUG_NEW
#else
	m_pImage = new Image(pStream,true);
#endif
}

GeneralRe: GDI+ and bitmap resources Pin
bouli17-Mar-04 5:01
bouli17-Mar-04 5:01 
GeneralInstalling .NET Pin
Anonymous16-Mar-04 22:33
Anonymous16-Mar-04 22:33 
GeneralRe: Installing .NET Pin
Prakash Nadar16-Mar-04 23:08
Prakash Nadar16-Mar-04 23:08 
GeneralRe: Installing .NET Pin
Anonymous16-Mar-04 23:12
Anonymous16-Mar-04 23:12 
GeneralRe: Installing .NET Pin
Prakash Nadar16-Mar-04 23:36
Prakash Nadar16-Mar-04 23:36 
GeneralRe: Installing .NET Pin
Anonymous17-Mar-04 0:03
Anonymous17-Mar-04 0:03 
GeneralRe: Installing .NET Pin
Chris Meech17-Mar-04 4:43
Chris Meech17-Mar-04 4:43 
GeneralRe: Installing .NET Pin
Anonymous17-Mar-04 15:17
Anonymous17-Mar-04 15:17 
QuestionCan I keep a DDB for painting? Pin
living16-Mar-04 21:29
living16-Mar-04 21:29 
Questionwhat are differences when using RasDial and InternetDial? Pin
DengJW16-Mar-04 21:07
DengJW16-Mar-04 21:07 
QuestionHow do i place a dialog in a formview Pin
swarnamanoo16-Mar-04 19:43
swarnamanoo16-Mar-04 19:43 
AnswerRe: How do i place a dialog in a formview Pin
Ravi Bhavnani16-Mar-04 20:00
professionalRavi Bhavnani16-Mar-04 20:00 
GeneralRe: How do i place a dialog in a formview Pin
swarnamanoo16-Mar-04 20:27
swarnamanoo16-Mar-04 20:27 
GeneralRe: How do i place a dialog in a formview Pin
Ravi Bhavnani16-Mar-04 20:34
professionalRavi Bhavnani16-Mar-04 20:34 
AnswerRe: How do i place a dialog in a formview Pin
Prakash Nadar16-Mar-04 20:29
Prakash Nadar16-Mar-04 20:29 
GeneralAssembler in VC++ 6 Pin
kempyeng16-Mar-04 18:23
kempyeng16-Mar-04 18:23 
GeneralRe: Assembler in VC++ 6 Pin
tcss17-Mar-04 0:50
tcss17-Mar-04 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.