|
i need an urgent help on this plz explain it cleraly how we can add a picture control or any other control inside list control mfc ,,,reply me as soon as possible
|
|
|
|
|
|
|
If you want to put a background picture on a listcontrol, look here[^] and if you want to insert any kinf of control (COleDateTime, CComboBox, CEdit, and so on) to a listcontrol look here[^].
|
|
|
|
|
hi, i'm developing an application for a school project in wich i need to read the data that an open port is about to send to another.
is there any way that i can do that?
i have search in everywhere and it seems to be no answer for that.
can anyone help me?
thanks
|
|
|
|
|
A serial port can be opened only by one application/thread at time. So there is no chance to do this in a simple way.
You may use some hardware that splits the serial lines and mirrors it to another port where you get a copy of the data that has been send.
You may create a special send thread that copies the data to a buffer before sending and flushes the buffer after they has been sent. You can then query the unsend data from this thread.
|
|
|
|
|
I suppose you should hook the WriteFile function. Not an easy task, anyway.
Veni, vidi, vici.
|
|
|
|
|
Or you can create an upperfilter driver for serial.sys and pump the data back up to your app.
Of course this is extremely difficult for most people to do but should you feel up to a mammoth challenge, it is an interesting way to do it.
The other way you can do it is to create a dll that manages serial.sys, ie, implements all the Win32 serial functionality and get the other app to talk to your dll instead of the stock system one. But this has its own problems in terms of replacing the system dll with yours.
|
|
|
|
|
|
The latest version can be found here
|
|
|
|
|
Hello,
My C/C++ skills are minimal but I would like to see if I can somehow compile a working sample to write a multi-level Window shell extension à la 7zip.
I read the article "The Complete Idiot's Guide to Writing Namespace Extensions" from 2001. I was wondering if someone could tell me...
1. If that sample can be compiled as-is or requires some extra work
2. If yes, can it be compiled with a free C/C++ compiler for Windows?
Hopefuly, once I get everything installed and the sample compiled, I can start peeking and poking to see if I can customize it to build my own shell extension.
Thank you.
|
|
|
|
|
fredtheman wrote: My C/C++ skills are minimal There a re lots of articles here[^] and elsewhere on the internet that will help you learn.
fredtheman wrote: but I would like to see if I can somehow compile a working sample to write a multi-level Window shell extension à la 7zip. Given your previous statement I would think that somewhat over ambitious.
What you can do, is get hold of the free Visual C++ Express system[^] and start building your skills and experience.
|
|
|
|
|
Thanks for the links. I'll give it a try and see if I can figure it out.
|
|
|
|
|
Hi,
if I call CWinApp::GetProfileString() for a key that does not exist, it creates one for me.
This is not what I want.
Is there any way to stop this key from being created?
BTW, I read Stuart Konens CRegistry class article, but cannot use that as third party code is not allowed in my current project.
Thanks,
Bryan.
|
|
|
|
|
The best way would be not to use GetProfileString() but instead use the Registry Functions[^] directly. That way you can check first if the key exists and only create it when necessary.
|
|
|
|
|
Thanks, but...I decided to keep the CWinapp functions as-is.
I just check after the GetProfileString() and if the key has a dummy value, I just delete it.
Works for me.
|
|
|
|
|
We have migrated our application which was written in VC 6.0 to VS2010.
The application crashes on launching it.
The crash occurs at ProcessShellCommand( ). On debugging got this error
"Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98"
What could be the problem and possible fix for this.
Thanks in Advance.
|
|
|
|
|
V K 2 wrote: What could be the problem
The problem is that you are trying to use an arguement that the function will not accept.
V K 2 wrote: possible fix for this
One possible fix is to use an argement that the function will accept.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 11-Jul-12 9:36am.
|
|
|
|
|
Sheer poetry.
|
|
|
|
|
We can but try....
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
V K 2 wrote: The crash occurs at ProcessShellCommand( ).
Which is called how?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
CCommandLineInfo cmdInfo;
ParseCommandLine( cmdInfo );
// Dispatch commands specified on the command line
if( !ProcessShellCommand( cmdInfo ) )
return FALSE;
|
|
|
|
|
Have you stepped into ProcessShellCommand() (to find the statement that is throwing the exception)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
It crashes at EnterCriticalSection in below function of C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\afxcrit.cpp
void AFXAPI AfxLockGlobals(int nLockType)
{
----
----
// lock specific resource
EnterCriticalSection(&_afxResourceLock[nLockType]);
-----
}
|
|
|
|
|
V K 2 wrote: What could be the problem and possible fix for this.
A bug in your code probably caused by the migration itself.
Keep in mind also that although the crash originates from that call that doesn't not insure that the cause is specifically there. Pointer bugs can cause problems long after the problem code was executed.
|
|
|
|