Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread Pin
RChin16-Sep-04 0:23
RChin16-Sep-04 0:23 
GeneralDisable Restart from the windows shutdown dialog box Pin
sirtimid15-Sep-04 23:14
sirtimid15-Sep-04 23:14 
GeneralDisable Restart from the windows shutdown dialog box Pin
sirtimid15-Sep-04 23:13
sirtimid15-Sep-04 23:13 
GeneralDeleting ODBC Datasources Pin
si_6915-Sep-04 23:00
si_6915-Sep-04 23:00 
GeneralRe: Deleting ODBC Datasources Pin
P-Rex15-Sep-04 23:55
P-Rex15-Sep-04 23:55 
GeneralRe: Deleting ODBC Datasources Pin
P-Rex16-Sep-04 0:01
P-Rex16-Sep-04 0:01 
GeneralAsynch Serial Comms - IO Completion Pin
louis15-Sep-04 22:40
louis15-Sep-04 22:40 
GeneralVisual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
pohcb_sonic15-Sep-04 21:50
pohcb_sonic15-Sep-04 21:50 
pohcb_sonic 2:17 16 Sep '04

Hi! I'm new to MFC in Visual C++ programming. I had previously used it to do console applications but never used MFC before. I had a problem; I was told to set a 4 by 4 area by using Matrix in MFC coding and use it to check whether the image has any little "black spots". If it does, I have to set these small little "black spots" of the image from "255" or anything else to zero. The codings must be in a function.

So How do I do it?

Pls do kindly reply. I needed this asap. Thanks!Smile | :)

Below are the codes: Poke tongue | ;-P

<br />
void CMediVisionView::MatrixImage()<br />
{<br />
int i;<br />
<br />
if(no_of_rows==512){<br />
for(i=0; i<512-5; i++)<br />
{<br />
if (image512[i]==0 && image512[i+1]==0 && image512[i+2]==0 && image512[i+3]==0 && image512[i+4]==0){<br />
<br />
if(image512[i]==0 && image512[i+512]==0 && image512[i+(512*2)]==0 && image512[i+(512*3)]==0){<br />
<br />
if(image512[i+4]==0 && image512[i+512+4]==0 && image512[i+(512*2)+4]==0 && image512[i+(512*3)+4]==0){<br />
<br />
if(image512[i+(512*3)+1]==0 && image512[i+(512*3)+2]==0 && image512[i+(512*3)+3]==0 && image512[i+(512*3)+4]==0){<br />
<br />
image512[i+512+1]=0;<br />
image512[i+(512*2)+1]=0;<br />
image512[i+(512*3)+1]=0;<br />
<br />
image512[i+512+2]=0;<br />
image512[i+(512*2)+2]=0;<br />
image512[i+(512*3)+2]=0;<br />
<br />
image512[i+512+3]=0;<br />
image512[i+(512*2)+3]=0;<br />
image512[i+(512*3)+3]=0;<br />
			}<br />
				<br />
											       }<br />
										               }<br />
<br />
                       }<br />
		<br />
    }<br />
}<br />
<br />
<br />
<br />
}<br />
<br />

GeneralRe: Visual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
V.15-Sep-04 22:15
professionalV.15-Sep-04 22:15 
GeneralRe: Visual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
pohcb_sonic16-Sep-04 15:21
pohcb_sonic16-Sep-04 15:21 
GeneralRe: Visual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
V.16-Sep-04 20:39
professionalV.16-Sep-04 20:39 
GeneralUnable to view document Pin
Mughi15-Sep-04 21:43
Mughi15-Sep-04 21:43 
QuestionCan anyone help me create this DLL? Pin
noeppkes15-Sep-04 21:34
noeppkes15-Sep-04 21:34 
GeneralVisual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
pohcb_sonic15-Sep-04 20:17
pohcb_sonic15-Sep-04 20:17 
GeneralRe: Visual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
User 58385215-Sep-04 20:23
User 58385215-Sep-04 20:23 
GeneralRe: Visual C++ (MFC) : Using Matrix to set an part of an image to zero Pin
pohcb_sonic15-Sep-04 21:45
pohcb_sonic15-Sep-04 21:45 
GeneralGet Hard Drive Serial Number in VC++ Pin
gokings15-Sep-04 20:13
gokings15-Sep-04 20:13 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
Arsalan Malik15-Sep-04 21:00
Arsalan Malik15-Sep-04 21:00 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
gokings18-Sep-04 2:45
gokings18-Sep-04 2:45 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
wb15-Sep-04 21:00
wb15-Sep-04 21:00 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
Arsalan Malik15-Sep-04 21:27
Arsalan Malik15-Sep-04 21:27 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
gokings18-Sep-04 2:39
gokings18-Sep-04 2:39 
GeneralRe: Get Hard Drive Serial Number in VC++ Pin
Aamir Butt16-Sep-04 2:09
Aamir Butt16-Sep-04 2:09 
GeneralDoes MFC Supports IPv6 Pin
Alpha Siera15-Sep-04 20:13
Alpha Siera15-Sep-04 20:13 
GeneralRe: Does MFC Supports IPv6 Pin
Alexander M.,16-Sep-04 9:53
Alexander M.,16-Sep-04 9:53 

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.