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

C / C++ / MFC

 
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 
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 
so for anybody who's intrested and for the sake of completeness:
BOOL CMeineFormDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Symbol für dieses Dialogfeld festlegen. Wird automatisch erledigt
	//  wenn das Hauptfenster der Anwendung kein Dialogfeld ist
	SetIcon(m_hIcon, TRUE);					// Großes Symbol verwenden
	SetIcon(m_hIcon, FALSE);				// Kleines Symbol verwenden

	// TODO: Hier zusätzliche Initialisierung einfügen

	CBitmap bg_Image;						// Bild erstellen
	bg_Image.LoadBitmap(IDB_BITMAP1);		// Bild aus Resource laden

	BITMAP bBitmap;							// Damit man auf die Daten des Bitmap zugreifen kann
	bg_Image.GetBitmap(&bBitmap);			// Daten reinladen aus dem CBitmap
	
	int  iByteSize = bBitmap.bmWidthBytes * bBitmap.bmHeight * (bBitmap.bmBitsPixel/8);
    BYTE *pBuffer = new BYTE[iByteSize];

	bg_Image.GetBitmapBits(iByteSize, pBuffer);

	CRgn    newRgn;							// Eine neue Region für den Dialog
	newRgn.CreateRectRgn(0,0,0,0);

	CRgn	tmpRgn;							// Eine Temporäre Region
	
	int iOffset = bBitmap.bmBitsPixel/8;
	int r,g,b,c;
	for (int y=0; y< bBitmap.bmHeight; ++y)
	{
		for (int x=0; x < bBitmap.bmWidth; ++x)
		{
			c = y*bBitmap.bmWidthBytes + x*iOffset;
			r = pBuffer[c+2];
			g = pBuffer[c+1];
			b = pBuffer[c];

			if (r == 255 && g == 255 && b == 255)					// weiß
			{
				tmpRgn.DeleteObject();								// Die Region erstmal leer machen
				tmpRgn.CreateRectRgn(x,y,x+1,y+1);
				newRgn.CombineRgn(&newRgn, &tmpRgn, RGN_OR);
			}
		}
	}
	this->SetWindowRgn(newRgn, true);
	delete [] pBuffer;


	return TRUE;  // Geben Sie TRUE zurück, außer ein Steuerelement soll den Fokus erhalten
}

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 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 8:27
Mark Salsbery6-Sep-07 8:27 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? [modified] Pin
abiemann6-Sep-07 8:33
abiemann6-Sep-07 8:33 

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.