Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Application always running Pin
Blake Miller21-Apr-05 4:12
Blake Miller21-Apr-05 4:12 
GeneralRe: Application always running Pin
densitet21-Apr-05 5:04
densitet21-Apr-05 5:04 
Generalcheck internet Connection VC++ Pin
Anonymous5-Apr-05 21:46
Anonymous5-Apr-05 21:46 
GeneralRe: check internet Connection VC++ Pin
Ravi Bhavnani6-Apr-05 1:48
professionalRavi Bhavnani6-Apr-05 1:48 
GeneralRe: check internet Connection VC++ Pin
David Crow6-Apr-05 3:12
David Crow6-Apr-05 3:12 
QuestionHow to get the click time of one picture in the IE contral? Pin
showjan_cn5-Apr-05 21:29
showjan_cn5-Apr-05 21:29 
QuestionHow to get AVI bit depth? Pin
uus995-Apr-05 20:37
uus995-Apr-05 20:37 
GeneralNeed help with QuickFill(), look into the code Pin
awasthy5-Apr-05 19:42
awasthy5-Apr-05 19:42 
I am having trouble with this code. This is giving output as mesgbox with 0, ie successful, but is not filling the image. Please look in to it. I want to replace all connected pixels of a particular color with another color. Normal function outruns stack memory.

Any suggestions will be appreciated.

void dlg::OnButton1()
{
CClientDC* hdc= new CClientDC(this);
CFileDialog fd(1,0,0,0,"Bit Map(*.bmp)|*.bmp||");
fd.m_ofn.lpstrTitle="Browse";
if(fd.DoModal()==IDOK)
{
str=fd.GetPathName();
HBITMAP hBmp = (HBITMAP)::LoadImage(NULL,str,
IMAGE_BITMAP,0,0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);


bmp.Attach(hBmp); //bmp is member of the class dlg

CClientDC dc(this);
bmDC.CreateCompatibleDC(&dc);
pOldbmp = bmDC.SelectObject(&bmp);

BITMAP bi;
bmp.GetBitmap(&bi);

dc.BitBlt(0,0,bi.bmWidth,bi.bmHeight,&bmDC,0,0,SRCCOPY);

bmDC.SelectObject(pOldbmp);

}
}

void dlg::OnLButtonDown(UINT nFlags, CPoint point)
{

COLORREF rgb;
CClientDC dc(this);
CQuickFill qf;
int i;

rgb=RGB(255,10,10);

i=qf.QuickFill(&bmp,point.x,point.y,rgb,CLR_INVALID);

if(i==0)
MessageBox("0","0");
if(i==-1)
MessageBox("1","1");
if(i==-2)
MessageBox("2","2");
if(i==-3)
MessageBox("3","3");

CDialog::OnLButtonDown(nFlags, point);
}


Awasthy

Any work worth doing is worth doing well.
QuestionHow to make multithreading application fast ? Pin
Amarelia5-Apr-05 19:40
Amarelia5-Apr-05 19:40 
AnswerRe: How to make multithreading application fast ? Pin
Blake Miller6-Apr-05 5:43
Blake Miller6-Apr-05 5:43 
QuestionIn ListCtrl, how to draw image on the tooltip? Pin
lowiq5-Apr-05 19:31
lowiq5-Apr-05 19:31 
GeneralMFC Active-X control project Pin
Member 6450675-Apr-05 19:22
Member 6450675-Apr-05 19:22 
GeneralRe: MFC Active-X control project Pin
Michael Dunn6-Apr-05 1:57
sitebuilderMichael Dunn6-Apr-05 1:57 
Questionsaving text in a file? Pin
mpallavi5-Apr-05 19:09
mpallavi5-Apr-05 19:09 
AnswerRe: saving text in a file? Pin
Cedric Moonen5-Apr-05 20:19
Cedric Moonen5-Apr-05 20:19 
GeneralRe: saving text in a file? Pin
mpallavi5-Apr-05 20:54
mpallavi5-Apr-05 20:54 
GeneralRe: saving text in a file? Pin
Cedric Moonen5-Apr-05 21:41
Cedric Moonen5-Apr-05 21:41 
GeneralRe: saving text in a file? Pin
mpallavi5-Apr-05 22:33
mpallavi5-Apr-05 22:33 
GeneralRe: saving text in a file? Pin
Cedric Moonen5-Apr-05 22:48
Cedric Moonen5-Apr-05 22:48 
GeneralRe: saving text in a file? Pin
David Crow6-Apr-05 3:17
David Crow6-Apr-05 3:17 
GeneralRe: saving text in a file? Pin
mpallavi6-Apr-05 19:28
mpallavi6-Apr-05 19:28 
GeneralRe: saving text in a file? Pin
David Crow7-Apr-05 2:14
David Crow7-Apr-05 2:14 
AnswerRe: saving text in a file? Pin
eli150219795-Apr-05 20:41
eli150219795-Apr-05 20:41 
GeneralRe: saving text in a file? Pin
mpallavi5-Apr-05 21:22
mpallavi5-Apr-05 21:22 
GeneralRe: saving text in a file? Pin
eli150219795-Apr-05 21:27
eli150219795-Apr-05 21:27 

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.