|
The other one:
int res = CreateArray((void **) &data, &size);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
that one is great, thanks.
Чесноков
|
|
|
|
|
Hello Guys
i am reading a tiff file and i m having all its image data with other tags too,now I want to show this image in frame window.How can I do this in MFC?
Is something thru OpenDocumentFile()?
Any Ideas??
Regards
Yogesh
|
|
|
|
|
I'm trying to auto-scroll while dragging; this is the gist of my code:
In OnLButtonDown I capture the mouse.
In OnMouseMove I set a timer to an initial value.
In OnTimer I send a WM_VSCROLL message and reset the timer to a shorter interval.
So when I stop moving the mouse, the scrolling happens, but only at the rate of the longer (initial) interval. Lots of investigation reveals that OnMouseMove is being called again, AFTER I send the WM_VSCROLL, even though the mouse has not been moved, and so the timer is being reset to the longer value. Is Windows somehow generating extra WM_MOUSEMOVE messages in response to the WM_VSCROLL? I'm completely mystified.
In case it's relevant, the WM_VSCROLL is sent to a different window to the one that did the mouse capture.
|
|
|
|
|
You might find here [^] what you looking for ...
|
|
|
|
|
Thanks, but I was looking for information about extra mouse messages.
Further debugging suggests that Windows generates a mouse-move message at various odd times, even though the mouse has not moved. For example, if I set a breakpoint in OnMouseMove, it is triggered immediately. I hit F5 to continue running the app (being careful not to touch the mouse), and the breakpoint is triggered again. It seems that Windows sends a mouse-move message when it activates a window, perhaps just to remind it where the mouse is. Does anyone know for sure whether or not that is the case, and what other circumstances may lead to spurious mouse-move messages?
|
|
|
|
|
hello guys....i have written some code in C# (did some database work in C# using ADO.NET). Now I dont want to do that from scratch in vc, i just want to add that class to my vc prject and do my job. Is it possible, if yes how??....thnx
|
|
|
|
|
when you build a DLL in one .NET language, it can be used by other DLL or EXE files created using another .NET language, without you actually see the language difference. Just make sure you add a reference to the DLL (solution pane), import the namespace (that would be a "using" in C#), and start using your other-language types.
The above implies you meant C++/CLI, i.e. managed C++; and if you did, you actually are asking in the wrong forum.
|
|
|
|
|
Luc Pattyn wrote: you actually are asking in the wrong forum
well since i was trying to add C# class to my managed C++ project so I thought this to be the right forum. Thanks anyways
|
|
|
|
|
The C/C++/MFC forum is for native code, i.e. unmanaged, non-dotnet stuff.
The C++/CLI forum is for managed C++ code, as is used (by a few) in the .NET framework.
|
|
|
|
|
yes it can be done in vc also.
|
|
|
|
|
Hiii
I wanna know the term "IP Stack". What does it contain? What is the purpose of it? Where it resides inside Operating system?
Thanking you
Krish
|
|
|
|
|
If you want to know basics then this[^] is always the best place to start.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Is 'your' Google broken, today?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
bleedingfingers wrote: Let me google that.
Let me google bing that.
FTFY.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
No, google is actually a verb found in the dictionary which means to search the web, yeah...eat it M$ fanboy...
|
|
|
|
|
Hi i have to read a binary file from disk and i have to transfer file through serial port. i am using mscomm1 in vc++ 6.0.
Please help how to transfer a binary file through serial port.
|
|
|
|
|
What is your doubt about?
Read the file in binary mode and then send the data on the serial line (set the Output property).
BTW Why are you using MsComm (instead of Win32 API )?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i am working on dialog based application , i need to transfer binary file. any examples or sample code which helps me.
|
|
|
|
|
Still you're not giving info about your doubts. Are you able to read a binary file? Do you know how to use MsComm or Win32 API for serial communication?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
here i will give the example what i am doing.
CFile file;
CString str;
unsigned char ch;
if(file.Open("source.bin",CFile::modeRead|CFile::typeBinary))
int nLength = file.GetLength();
for(i=0;i<=nLength;i++) //Transfering file data
{
file.Read(&ch,1);
str.Format ("%c",ch);
m_mscom.SetOutput (COleVariant(str));
}
is it the right way to transfer a binary file ?. i have to transfer a binary file up to 15MB.
|
|
|
|
|
Well, you don't need to read the file (and write it to the serial port) a character at time (incidentally your loop-exit condition it's wrong, you should use i<nLength ).
For sending binary data, you need to fill a SafeArray and pack it into a Variant , see, for instance: "Mscomm and mode binary" at codeguru (using MFC OLE wrapper classes really helps here).
Again, you may also choose to avoid COM and go with Win32 's CreateFile, WriteFile , .., see the link Paniello provided.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
BYTE *pBuffer = new BYTE[nLength];
COleVariant var;
CByteArray barr;
file.Read(pBuffer,nLength);
for(UINT i = 0; i <sizeof((pBuffer)/sizeof(BYTE)) ; i++)
{
barr.Add(bytes[i]);
}
var=barr;
m_mscom.SetOutput(var);
is it right way ,if file size is 5000 byte it will work?.because i have to transfer up to 15MB .
|
|
|
|
|
Why don't you try (start with small amount of data)?
You know, sending 15MB of data will take more than 20 minutes even at 115200 baud.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|