|
var.c_str()
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to write a MFC program that do the same thing as MATLAB imread() function. That is read in the image file, get the RGB value of each pixel.
Is there efficient library to load the image and get all the pixel values, resize the image, and convert to gray scale?
Or I can do that in MFC?
|
|
|
|
|
MSDN: HBITMAP structure and CBitmap class. (only bitmaps)
Also look on stuff like Image, jpg,... in C++ in google, MSDN, CP, ...
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
there are many libraries to do what you need (there's even a link to one at the bottom of this message). there are some here on CodeProject, too - look in the Bitmaps and Palettes section .
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
how can i get the properties of a window(not created by a user application) by using the Window Handle?
i know the Window Handle....which function to use to get the properties?
regards,
kedar.
|
|
|
|
|
It depends on what properties you're looking for
GetWindowText will give you the name in the titlebar
GetWindowRect and GetClientRect will get size
GetWindowLong can be used the see what styles the window has...
you can enumerate all the child windows with EnumChildWindows
There are lots of things you can do, so maybe you should check the msdn docs
hope this helps
Don't think you are, know you are...
|
|
|
|
|
how to send file with tcp/ip?
|
|
|
|
|
|
See the Reference for TransmitFile in your Local Documentaion
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
How we can get handle to other applications window
please help.
|
|
|
|
|
try using EnumWindows....and the corresponding CALLBACK function ... i think it is EnumWindowProc...
be sure to go thru the MSDN before u use the above mentioned..
|
|
|
|
|
|
|
|
Hi All,
I want to write a program, which could monitor the IP Address which is trying to ping me. For example my system IP is 44.33.22.1 and other systems Ip is 44.33.22.2. If the other system trys to ping me using command
"ping 44.33.22.1" then i should be able to track the IP(44.33.22.2) which pinged me.
Regards,
Prax.
|
|
|
|
|
tgprakash wrote:
I want to write a program, which could monitor the IP Address which is trying to ping me. For example my system IP is 44.33.22.1 and other systems Ip is 44.33.22.2. If the other system trys to ping me using command
"ping 44.33.22.1" then i should be able to track the IP(44.33.22.2) which pinged me.
But how effective it can be, as there are many sites that does the pinging for its users. like :http://www.t1shopper.com/tools/[^].
suhredayan There is no spoon.
|
|
|
|
|
The packet header has a source and destination IP address. If the ping is legitimate the source address will hold the IP address of the machine that instigated the ping.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
Thanks for ur response.
But what is packet header??? where wil i find it.
I was think on "ping" command, one of the port will be used. If we could monitor that port then we will be able to track the IP. Right??? If yes , that what is that port No.??? and how to monitor it?
Regards,
Prax.
|
|
|
|
|
Simply a packet is a unit of data that appears on a network. In order to analyse network packets you will need some sort of intermediate ndis driver (see WinPCap[^]
The ping command is an ICMP Echo. If you look at IANA[^] you will see that this happens on port 7.
In order to become more familiar with network packets and their format you may want to read the following RFCs
0760 - Internet Protocol[^]
0761 - Transmission Control Protocol (TCP)[^]
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Can you see anything wrong with this code? How to write to a RichEditView? Thanks.
POSITION pos = GetFirstViewPosition();
while (pos != NULL)
{
CRichEditView* pView = (CRichEditView*) GetNextView(pos);
CRichEditCtrl* ctl=new CRichEditCtrl();
ctl=&(pView->GetRichEditCtrl());
int i, nLineLength, nLineCount = pView->GetRichEditCtrl().GetLineCount();
CString strText;
for (i=0;i < nLineCount;i++)
{
try
{
nLineLength = pView->GetRichEditCtrl().LineLength(i);
ctl->GetLine(i, strText.GetBuffer(nLineLength+1));
strText.ReleaseBuffer(nLineLength+1);
}
catch(...)
{
}
}
}
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Try:
CString strText;
CRichEditCtrl &ctlEdit = GetRichEditCtrl();
ctlEdit.GetWindowText(strText);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
HI,
How can i add Horizental Scroll Bar in CCheckListBox Control.
waitng for reply.
Thanx
Regards.
|
|
|
|
|
See the documentation on SetHorizontalExtent() . For automatic support for a horizontal scroll bar, see this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
My small program is written on SDI. I have a CArray type data in my CProgramView.c and I would like to use it in one of my dialog box. Normally I do it within the dialog boxes but I dont understand the concept of SDI and dialog box.
Can anyone give me some example coding? Thanks
- VC++ newbie
|
|
|
|
|
Try the following:
CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();<br />
CYourView* pView = (CYourView*)pFrame->GetActiveView();<br />
pView->GetArray()<br />
...
In case of SDI the first call returns the application frame window which contains the active document, view etc. The active view is your current view where your array is implemented. What you need to do is implement a member function GetArray which gives access to your data.;)
However generaly it is not a good idea to have data in CView, use rather CDocument for your data and then access it using pFrame->GetActiveDocument()
Cheers
|
|
|
|