|
I'm searching the method that can install standard 33600 modem using MFC.
This modem is default device in Windows. so I think PNP operation is not necessary and it can be installed by MFC.
What can I do for this program? If you have any sample source, please show me the codes.
Thank you a lot.
|
|
|
|
|
I'm working on a system that consists of a main coordinator app that has many plugin processing modules (as DLLs)
Both the main app, and all the plugins link against a static .lib that contains an assortment of helper classes.
The problem is that these need to be kept in sync (the helper lib only changes rarely, but when it does, both the app and the plugins need to link to the same version)
Is there any straightforward way of obtaining some kind of fingerprint from a .lib so that I can be sure that the main exe and a loaded plugin were linked with exactly the same version of the lib (so I can throw a sensible warning for whichever developer has inadvertantly changed the helper code without rebuilding the correct parts)
|
|
|
|
|
Why don't you get the version info for the plugins, show the user an error if they are of the wrong version. As for build process, I had a similar problem a few weeks back. My solution was to use an auto build incrementer and create a macro to increase the build number on other projects in the workspace.
Also, are you outputting the files to the same directory or coying them over after building? I find it helps to change the output directory that way you can be sure to always have the correct version.
|
|
|
|
|
Dear friends
I wanna have a CSocket object in my class that when I use Accept function this function should has a timeout and after some time if no one connect it it's accept function ended.
Agh
|
|
|
|
|
Is there any windows API to implement the windows function "Scan for hardware change" function. I register 2 windows drivers in the "Device Manager". After one time reboot, it can't appear in the "Device node tree".Also after I use the "Scan for hardware change" in the "Action" menu, those 2 drivers do appear.
I tried to wrote the following code to implement this function, but it seems no effect. Here is my codes.
SendMessageTimeout(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED,0, SMTO_ABORTIFHUNG, 3000, &dwMsgResult);
So, I need someone's help! thanks
|
|
|
|
|
I print HTML document from the WebBrowser control(using ExecWB method) without Printer dialog. I supply customised print Template. Everything works fine except it sends output to the Windows Default printer. I want to print to different printer.
Is there the way to send output to specific printer? I can't find.
aleyner
|
|
|
|
|
Hi ALeyner,
i am searching for sample as how to customize the header/footer for the web page print content. Can u plz send me ur code for my understanding as how to implement the print template for customizing the header/footer of the web page while printing. It will be very useful .plz send me ur code.
|
|
|
|
|
since windows draw it for , i counldn't find any way to avoid it when i was creating my own ownerdrawn menu...
any1?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
What about putting a bitmap there?
hope you are aware about drawing triangles using PolyLine method or MoveTo, LineTo combination in GDI. All you need to specify the cordinates... You can adopt that method.
Another tweak is that
using lines you can draw a pooup triangle.
Here I have drawn a triangle using three lines. Assume that each "|" represents a pixel and each column with "|" represents a line.
You can use this method.
|
||
|||
||
|
Sorry no time to write code for the same
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
i can draw what ever i want, the problem is that after the 'DrawItem' is finished, windows calls its own methods to draw the arrow by itself, so it overwrite my drawings...
anyway to bypass this problem?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Just subclass the menu and handle your own painting.
|
|
|
|
|
subclass as in inherite a class from CMenu and implement DrawItem?
if this is what you suggest, i've already done that, and still the problem remains, because after draw item, windows draw the arrows itself....
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
No, subclass and implement a handler for WM_PAINT.
Steve S
Developer for hire
|
|
|
|
|
I used the following trick:
At the end of your DrawItem(), just before returning, set an empty clipping region. This will effectively prevent Windows from drawing over your arrow.
At the beginning, reset the clipping region to ensure you can draw back.
Code:
void CMyMenu::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
pDC->SelectClipRgn(NULL);
pDC->IntersectClipRect(0,0,0,0);
}
|
|
|
|
|
Sounds interesting, will try it
thanks a lot man
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I wrote a DLL that should serve as interface to an usb-device so that it could handle different requests from different applications. The idea was that the DLL could synchronise all requests and the device should be opened only once.
The problem with this is that although i can use some shared memory between all instances using the DLL, I can't find the good solution for the single HANDLE to my file/device.
I tried starting a thread from the first instance that would hold the handle and all instances would talk with this thread, but then the problem comes when this first instance dies it takes the thread down with it ...
I also tried using two dll's. I thought I could load the 2nd dll from within the first one so that all instances of the first dll would communicate with only one instance of the second dll, but that ain't working either.
At this moment I only can get it to work if every instance/request opens and closes the handle of the file/device over and over again, but that doesn't seem the nice way to me.
So basically my question is this: How can I keep one handle of a file in a dll so that every call made to this dll can use this handle ?
Any help would be welcome thanks
|
|
|
|
|
HANDLE s are only valid within one process, unless you explicitly make a copy with DuplicateHandle() and pass the resulting handle value to another process.
|
|
|
|
|
Thx for the help ...
I don't see how I can get it to work as GetCurrentProcess() (which i need to retrieve the process handle) returns 0xffffffff from within my dll.
Any suggestions ?
|
|
|
|
|
That's the correct vaule, GetCurrentProcess() returns a pseudo-handle that other functions interpret to mean "the current process"
|
|
|
|
|
Hi All,
I have a application, say A.exe. It launches another application, say B.exe. In B.exe i need to know the identity (pid, process name) of calling application.
Is there any way by which I can do it?
Thanks,
Suraj
Suraj Gupta
|
|
|
|
|
|
Hi,
Thanks for the reply but the link did not help.
-Suraj
Suraj Gupta
|
|
|
|
|
When you run B.exe what happen for A.exe its close?
|
|
|
|
|
You can read detaily from a.exe and use WM_COPYDATA for send this data to B.exe
|
|
|
|
|
If you have handle two A.exe window, you can use GetWindowThreadProcessId .
|
|
|
|