Click here to Skip to main content
15,896,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: change Start Butoon Text Pin
GauranG Shah7-Sep-07 1:26
GauranG Shah7-Sep-07 1:26 
GeneralRe: change Start Butoon Text Pin
Nishad S7-Sep-07 1:33
Nishad S7-Sep-07 1:33 
AnswerRe: change Start Butoon Text Pin
Hamid_RT6-Sep-07 23:53
Hamid_RT6-Sep-07 23:53 
GeneralRe: change Start Butoon Text Pin
GauranG Shah7-Sep-07 1:21
GauranG Shah7-Sep-07 1:21 
Questionquestion about MAPI C++ and ms office outlook Pin
monsieur_jj6-Sep-07 20:02
monsieur_jj6-Sep-07 20:02 
AnswerRe: question about MAPI C++ and ms office outlook Pin
monsieur_jj6-Sep-07 22:51
monsieur_jj6-Sep-07 22:51 
Questionwhat is the message when Service abruptly stopped Pin
Yashusid6-Sep-07 18:23
Yashusid6-Sep-07 18:23 
Questionbitmaps & regions [modified] Pin
zqueezy6-Sep-07 14:39
zqueezy6-Sep-07 14:39 
hey folks,
I've got a little snippet I wanna use to do a splash screen from a mask-image (2-bit image). well... it doesn't work
CBitmap bg_Image;			// create Image
bg_Image.LoadBitmap(IDB_BITMAP1);	// load from resource

BITMAP bBitmap;
bg_Image.GetBitmap(&bBitmap);		// load bitmap data

BYTE *pBuffer = new BYTE[bBitmap.bmWidth * bBitmap.bmHeight];

bg_Image.GetBitmapBits(bBitmap.bmHeight*bBitmap.bmWidth, pBuffer);

CRgn    newRegion;			// new region for dialog
newRegion.CreateRectRgn(0,0,0,0);	// creat empty region

CRgn	tmpRgn;				// temporary region
for (int y=1; y< bBitmap.bmHeight; ++y)
{
	for (int x=1; x < bBitmap.bmWidth; ++x)
	{
		BYTE c = pBuffer[(y)*bBitmap.bmWidth + x];
		if (c == 255)				// white
		{
			tmpRgn.DeleteObject();		// clear out region
			tmpRgn.CreateRectRgn(x,y,x+1,y+1);
			newRegion.CombineRgn(&newRegion, &tmpRgn, RGN_OR);
		}

	}
}
this->SetWindowRgn(newRegion, true);

delete [] pBuffer;


The result is nothing near what I expected... some ragged & jagged dialog.
when I set a breakpoint on "tmpRgn.CreateRectRgn(x,y,x+1,y+1);"
I find that the x and y of the for-loop is not what it should be in the image!!!
any hints on how to do my splash-screen?

thx in advance
zqueezy


-- modified at 20:58 Thursday 6th September, 2007
AnswerRe: bitmaps & regions Pin
Mark Salsbery6-Sep-07 16:34
Mark Salsbery6-Sep-07 16:34 
AnswerRe: I solved it now! Pin
zqueezy6-Sep-07 20:57
zqueezy6-Sep-07 20:57 
GeneralRe: I solved it now! Pin
Mark Salsbery7-Sep-07 6:00
Mark Salsbery7-Sep-07 6:00 
QuestionWriting integer values to file using streams [modified] Pin
Cyrilix6-Sep-07 12:33
Cyrilix6-Sep-07 12:33 
AnswerRe: Writing integer values to file using streams Pin
Mark Salsbery6-Sep-07 14:29
Mark Salsbery6-Sep-07 14:29 
GeneralRe: Writing integer values to file using streams Pin
Cyrilix6-Sep-07 14:36
Cyrilix6-Sep-07 14:36 
GeneralRe: Writing integer values to file using streams Pin
Mark Salsbery6-Sep-07 16:18
Mark Salsbery6-Sep-07 16:18 
GeneralRe: Writing integer values to file using streams Pin
Cyrilix6-Sep-07 16:57
Cyrilix6-Sep-07 16:57 
QuestionOverride afx msg box (pop up) Pin
AeJai6-Sep-07 10:04
AeJai6-Sep-07 10:04 
AnswerRe: Override afx msg box (pop up) Pin
Mark Salsbery6-Sep-07 13:53
Mark Salsbery6-Sep-07 13:53 
QuestionConsole redirection Pin
Waldermort6-Sep-07 9:22
Waldermort6-Sep-07 9:22 
AnswerRe: Console redirection Pin
Waldermort6-Sep-07 11:59
Waldermort6-Sep-07 11:59 
QuestionIs there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 7:00
abiemann6-Sep-07 7:00 
QuestionRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 7:09
David Crow6-Sep-07 7:09 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 7:36
abiemann6-Sep-07 7:36 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? [modified] Pin
abiemann6-Sep-07 8:03
abiemann6-Sep-07 8:03 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 8:22
Mark Salsbery6-Sep-07 8:22 

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.