|
I want to print the window generated by my dialog based application(Visual C++), provided a push button for printing window. Can any body tell me how to do this?
Ravi
|
|
|
|
|
Try with WM_PRINT or WM_PRINTCLIENT.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
As a beginer of ATL Based Web Service programmer, I have some some questions about it:
1)Whether a Web Sevice can hold its state during its serving many clients, for I want keep some data structs among clients because these clients are collorating doing a certain work. If Web Service can has this virtue, how can I do, are there some documents about it?
2) can a web service client dynamicly locate the server without recompiling its source files When a Web Service provider changes its location on the internet? If it can, how can I do and are there some documents about it?
Please help me, thank you!
oyyx@sina.com
|
|
|
|
|
Hi All,
I need to kill a already running exe through my program whose execution I started through the system("filename") command of C.How do I do this.Is there any method available??
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
To kill a process, use TerminateProcess. TerminateProcess needs a process handle - you'll have to use CreateProcess or ShellExecuteEx instead of system("filename").
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz Sowinski wrote:
To kill a process, use TerminateProcess. TerminateProcess needs a process handle - you'll have to use CreateProcess or ShellExecuteEx
... or look it up using one of the MS API's (different for every platform and blah blah blah...).
There is however IIRC a library for this here at CP. Maybe you should browse around a bit.
|
|
|
|
|
Mike Nordell wrote:
... or look it up using one of the MS API's
What if there's more than one instance of 'filename.exe'?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz Sowinski wrote:
What if there's more than one instance of 'filename.exe'?
Then you're in trouble!
Do you know anything else about the app, like Window Class, Window name? Actually, what do you know about the process you want to kill?
|
|
|
|
|
I have no idea what's the Window Class. Maybe you should ask original poster about that?
Anyway, I think switching from system to CreateProcess/ShellExecuteEx is waaaay easier than firetrucking with enumerating processes.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
What kind of data structure would a control like this use...? What kind of loop would you use to iterate the entire array...? Assuming you use and array and not a linked list or something...?
In a very loosley typed lang would it look anything like this???
struct TREE_ITEM{
TREE_ITEM Parent;
TREE_ITEM Child;
CString Caption;
DWORD CommandID;
}
I'm not really interested in Treeview structures only it's more curiousity about how hierarchial structures work. So please don't mention how I may have missed a field inside the TREE_ITEM structure like CImageList or something...
Using the above structure makes iterating an array confusing as heck.
while(TREE_VIEW.Child){
}
The above seems (I'm almost positive i'm missing something) to trivial???
This would only intereate the top most parent items, but what about children of children and such...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
my experience of iterating CTreeCtrls has always been using recursive functions.
ie (pseudocode)
void ProcessTreeItem(HTREEITEM hti)
{
HTREEITEM htiChild = GetFirstChild(hti);
while (htiChild)
{
ProcessTreeItem(htiChild);
htiChild = GetNextChild(hti, htiChild);
}
}
|
|
|
|
|
Hi,
i have 2 questions about helpfile handling :
1 : How can i open a Help file from the Application ?
2 : How can i open a Help file with a specific topic ?
Thanks !
Marco
|
|
|
|
|
|
i need something like mutex that will not be destroyed by windows after the process terminates, so another process can see it later on. any help plz?
|
|
|
|
|
First of all I do not know sth about this, but I think this is bad design what You achieve with this. Think of many processes leaving their garbage in memory after they have terminated. This will lead to many problems. If You want to do sth like this You could create a new process where in its main it is only creating this mutex as You need it. The behaviour could be controlled by command line arguments.
|
|
|
|
|
You don't need a mutex replacement. Do it like MS, use the bloated ini-file-from-hell (the registry).
|
|
|
|
|
This is possible, in principle, using native NT API. Every kernel object that is represented by a handle has an internal "persistent" flag, that protects it from close (until next reboot) even if the last handle to it has been closed. Of course this makes only sense with named objects, because you have to find it later on.
However, this works only NT4 and above.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Something like the lockfiles with Linux?
|
|
|
|
|
I've written a class library in VC6 before, and now compiled to VC.NET now. It uses pointers to link with different classes within the library. Now, I want to use C# to develope the interface, but I need intensively use the class library. Can I do it ?
|
|
|
|
|
how can I get my IP address on the Internet when i am connected to internet via LAN (i am not talking about the static IP which we get using ipconfig command) i want to know the dynamic IP of my computer when i am connected via
LAN.
and plz one more thing...can netmeeting be done when two computers are on the internet but on two different locations behind the LAN network.
thnx
Rashmi
|
|
|
|
|
drmzunlimited wrote:
can netmeeting be done when two computers are on the internet but on two different locations behind the LAN network
Check here...
http://bbs.adslguide.org.uk/postlist.php?Cat=&Board=multiuser[^]
I believe it is not possible to run Netmeeting (or any other video chat except yahoo messenger) from behind a NAT router...
Blade[DMS]
|
|
|
|
|
I am trying to implement a CRC check in my program. I built my program and as a test I used a program that I found to check the CRC of my program. The program gave me the CRC as "708f0d1". With out making changes to any of my code, I rebuilt my program and ran the CRC check again. This time it said that the CRC was "94d40369" I wanted to put code in a dll that would check the CRC value of my program with the expected value, but if the CRC changes when you compile or build your program how is it possible to implement this type of check. If you can help me it would be appreciated.
Thanks.
|
|
|
|
|
Anonymous wrote:
how is it possible to implement this type of check
regenerate the code that tests the CRC each time you rebuild the EXE - make it a post-build step in your EXE project.
-c
Gourmet, n:
Anyone whom, when you fail to finish something strange or
revolting, remarks that it's an acquired taste and that you're
leaving the best part.
|
|
|
|
|
Ok, thanks, I will try it.
|
|
|
|
|
Hello again,
Please tell me What first message affter OnInitialDialog ?
I mean first message after dialog loaded ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|