Click here to Skip to main content
16,017,899 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Bitmaps in a dialog Pin
Mark Salsbery1-Jun-07 6:42
Mark Salsbery1-Jun-07 6:42 
GeneralRe: Bitmaps in a dialog Pin
SimplCodr1-Jun-07 6:57
SimplCodr1-Jun-07 6:57 
AnswerRe: Bitmaps in a dialog Pin
Hamid_RT1-Jun-07 5:27
Hamid_RT1-Jun-07 5:27 
GeneralRe: Bitmaps in a dialog Pin
SimplCodr1-Jun-07 6:39
SimplCodr1-Jun-07 6:39 
GeneralRe: Bitmaps in a dialog Pin
SimplCodr1-Jun-07 6:58
SimplCodr1-Jun-07 6:58 
GeneralRe: Bitmaps in a dialog Pin
Hamid_RT1-Jun-07 9:24
Hamid_RT1-Jun-07 9:24 
GeneralRe: Bitmaps in a dialog Pin
SimplCodr1-Jun-07 9:54
SimplCodr1-Jun-07 9:54 
QuestionGDI / GDI+ Pin
Adno1-Jun-07 4:09
Adno1-Jun-07 4:09 
hi im trying to code below, but is not working.

void update(HWND hwnd){<br />
	<br />
	HBITMAP pBitmap;<br />
	pBitmap = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP1)); // using this it works <br />
	<br />
	//Image* pBitmap = new Image(L"clockbg.bmp"); // this is the same image as above, it doesn't work when i use it <br />
	no errors it compiles fine just no window <br />
	// i want to use GDI+ to load the image because i want to use a png just trying to get it to work first<br />
<br />
	HDC pDC = GetDC(hwnd);<br />
	HDC dcMem;<br />
	dcMem = CreateCompatibleDC(pDC);<br />
	COLORREF colour;<br />
	colour = RGB(255,255,255);<br />
	<br />
	SelectObject(dcMem,pBitmap);<br />
	<br />
	BLENDFUNCTION blend;<br />
	blend.BlendOp = AC_SRC_OVER;<br />
	blend.BlendFlags = 0;<br />
	blend.SourceConstantAlpha = 255;<br />
	blend.AlphaFormat = AC_SRC_ALPHA;<br />
<br />
	POINT ptSrc = {0, 0 };<br />
	SIZE sz = { 270, 270 };<br />
<br />
	//int t = UpdateLayeredWindow(hwnd, NULL, NULL, &sz, dcMem, &ptSrc, colour, &blend, ULW_COLORKEY );<br />
	int p = UpdateLayeredWindow(hwnd, NULL, NULL, &sz, dcMem, &ptSrc, colour, &blend, LWA_ALPHA );<br />
}


thank you
AnswerRe: GDI / GDI+ Pin
Hamid_RT1-Jun-07 5:28
Hamid_RT1-Jun-07 5:28 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 5:41
Adno1-Jun-07 5:41 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 5:50
Mark Salsbery1-Jun-07 5:50 
GeneralRe: GDI / GDI+ Pin
Hamid_RT1-Jun-07 5:55
Hamid_RT1-Jun-07 5:55 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 6:30
Adno1-Jun-07 6:30 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 6:48
Mark Salsbery1-Jun-07 6:48 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 7:06
Adno1-Jun-07 7:06 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 7:25
Mark Salsbery1-Jun-07 7:25 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 7:48
Adno1-Jun-07 7:48 
GeneralRe: GDI / GDI+ [modified] Pin
Mark Salsbery1-Jun-07 9:01
Mark Salsbery1-Jun-07 9:01 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 10:39
Adno1-Jun-07 10:39 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 10:48
Mark Salsbery1-Jun-07 10:48 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 10:50
Mark Salsbery1-Jun-07 10:50 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 10:52
Adno1-Jun-07 10:52 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 11:06
Mark Salsbery1-Jun-07 11:06 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 11:10
Mark Salsbery1-Jun-07 11:10 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 11:23
Adno1-Jun-07 11:23 

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.