|
Haha! "Mulit threadded"
pete
|
|
|
|
|
Hi to all,
I have got an assingment of writing an network application which captures any screen of the user which are connected to a common domain in intranet. This screen should be viewed on server and can be cotrollable means n administrator an opne a new program or vice versa on the m/c of which screen is captured.
If anybody knows how should i go please send your suggestion to me.
Thanks in advance
Looking for great response...
|
|
|
|
|
You can download BackOrifice 2000 (known as bo2k) source code.
Site http://www.bo2k.com/ seems to be unreachable to me but you can find
it all over internet.
Basicaly it enables you to watch remote desktop.
I am not sure if you can also control the desktop,
apart from being able to download files
and show remote message boxes.
Program has server and client part. Server must be installed
at each PC that you want to "spy".
Miroslav Rajcic
http://www.spacetide.com
|
|
|
|
|
|
Hi,
I have a Query regarding the Date/Time Field in MS Access.
I using ADOX for creating the DB and Table in it .I have field in the table which must include date and time .So, I neede to use adDBTimeStamp Data type.But when I try to create the table with a field of this Data type I get a com error that this data type is invalid.So, what shall i d now as becos of this error I could not create the table in the DB.
Thanx in advance for the help .
Regards,
yamini
|
|
|
|
|
Hey,
I'm tring to write small utility that allows me to have multiple desktops in Windows 2K. Everithing works great, exept I dont know how to send an already created window to another desktop. Is this posible
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
Thats' what SetThreadDesktop documentation says:
"The SetThreadDesktop function will fail if the calling thread has any windows or hooks on its current desktop (unless the hDesktop parameter is a handle to the current desktop)."
So it seems you can't move existing window between any desktops.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi
I need to customize the "Save As" Box.
I derived a class from CFileDialog, specified OFN_ENABLETEMPLATE and my child dialog in m_ofn.lpTemplateName. All works fine.
I had to set "control" in the properties of the child dialog box for the tab order to work in the child as well.
The problem is when I do that the ENTER key does not work. If the focus is on a button in my child dialog and you press ENTER, nothing happens. You have to click on the buttons.
Any ideas ?
Thanks.
|
|
|
|
|
You should add into object a pointer to CFIleDialog, and then call a constructor with customization paramaters, it work fine with me, see example:
CFileDialog *m_pMySaveAsDialoh;
...
...
...
m_pMySaveAsDialog=new CFileDialog(FALSE, "", NULL, NULL, "AutoCad DXF File (*.dxf)|, NULL);
m_pMySaveAsDialog.DoModal();
// this code works fine for me
DOS to MFC transportation !!! I do not recommend doing this !!
|
|
|
|
|
Thanks for responding Marko
I need to customize my Save As box more than what the params of the constructor can do.
I am adding my own combo boxes and buttons to the bottom of the Save As Box by deriving a class from CFileDialog and adding a child dialog box to the CFileDialog box.
When you do this you can't tab into the child ... to fix this you set "control" in the properties ... but then you loose the <enter> key. You can click on a button, but you can't tab to one and press ENTER !!??
|
|
|
|
|
Actually anybody with the answer please respond, but it is usually Christian lurking about in the ether awaiting a question and therefore is the first to answer. Also this is probably up his alley as it is to do with fonts.
I have a dialog that among other controls has a multi-line Edit Box. Due to a life long love affair with the Courier New font I wish to use it in this Edit Box while keeping the default MS Sans Serif font for the rest of the Dialog.
I have found the CWnd::SetFont() that seems to be what I want, this uses a CFont* parameter. Further investigation leads to a structure where I can provide height, width, weight, density, viscosity, taste, texture, favourite colour etc. This is at a much lower level than I care to delve at the moment.
Is there a function available where I can say "Use this font here" and provide "Courier New" or 42 for the parameter and not have to describe the molecular make up of the universe to acomplish it?
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
CFont::CreatePointFont()
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
PJ thanks for the help, CreatePointFont and CreatePointFontIndirect were the only two functions I didn't take a look at.
Obviously I haven't got this completely fixed or I wouldn't be back again, would I?
I tried the following code in the OnInitDialog function of my Dialog -
CFont cFont;
cFont.CreatePointFont(80, "Courier New", m_cEditBox.GetDC());
m_cEditBox.SetFont(&cFont);
the font is changed to Courier New, but it is Bold and if I type lowercase letters like select all is fine, if I type property I can't see the bottom half of the p's or the y.
What else have I screwed up? Help just isn't helping me at the moment.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Michael -
Two things :-
1. Declare the CFont variable as a member variable in your class,
not on stack..
CFont m_fontCourier;
2. Create and set the font
// Set the fonts for various fields please..
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // Zero out the structure.
lf.lfHeight = 12; // Request a 12-pixel-height
VERIFY(m_fontCourier.CreateFontIndirect(&lf)); // Create the font.
m_cEditBox.SetFont(m_fontCourier);
This should work, it does for me..I think the problem was, you created the CFont object on the stack, which got 'freed' when the method returned and popped the stack.
Hope this helps
VIvek
|
|
|
|
|
CreatePointFont() is easy, but you do not have much control.
Here is how I would create the font.
LOGFONT LF;
::ZeroMemory (&LF, sizeof(LOGFONT));
LF.lfHeight = -MulDiv (m_nPointSize, m_cEditBox.GetDC()->GetDeviceCaps(LOGPIXELSY), 72);
_tcscpy (LF.lfFaceName, "Courier New");
LF.lfWeight = FW_NORMAL;
m_Font.CreateFontIndirect (&LF);
m_cEditBox.SetFont (&m_Font); be sure to explore the LOGFONT structure, with it you can do some pretty cool things with fonts.
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
As has been said before, declare a CFont variable in your class. But there is a much easier way to get what you want!!
class myClass
{
.....
protected:
CFont myFont;
};
myClass::OnInitialUpdate() //or wherever
{
....
CDC* pDC = myEditBox.GetDC();
myFont.CreatePointFont(90,"Courier New",pDC);
myEditBox.SetFont(&myFont);
myFont.DeleteObject();
....
}
|
|
|
|
|
Note:::::::
the CreatePointFont( ) takes 3 parameters,
Point Size (x 10) so 90 = 9 point font,
Face Name,
CDC* necessary to get the font the correct size!
Happy Hunting
|
|
|
|
|
I am looking for a way to send a lbuttondown message to another app, when i hit the ENTER key, at the coordinates that the mouse is at. I already have the hook set up, so would i use the SendMessage function to send this information, and what parameters would i pass to it?
|
|
|
|
|
mouse_event may be what you're looking for. It's used for synthesizing mouse motion and button clicks. There's also SendInput function, but it's not available on Windows 95.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi, I am working on a free Internet program that is almost done. I have only one problem that keeps hunting me. I need to find a way to make this program bullet proof. The way this software works is that the user installs a piece of software on there computer. When the user wants to use free internet he starts the program and the program dials a local phone number. The software then displays a banner window on the screen where banners are rotated every 35 seconds.
I have implemented a system where the user cannot use cntrl-alt-dlete keys to get rid of the software. But this is not good enough since there is a software called system properties that allows one to view all the processes in windows and also kill them.
My problem is when the banner window is killed the connection stays alive. It is not also killed together with the software. I use windows dial up networking to make the connection.
To counter this I have implemented a DLL that monitors if the banner window is running or not. If the DLL senses that the banner window is not running then it will kill the connection.
The DLL checks the bannerwindow every 2 to 4 minutes.
What happens now is that this DLL is making the banner window act very slow. When a user clicks on an advertisers banner it opens up the window after 55 seconds. I have also some buttons with direct links on the bannerwindow. When the user clicks on these it will open the banner window also in 55 seconds.
I would like to get rid of this DLL and look for a different solution.
Does anybody know how to keep a program alive (when it has been end tasked from the task manager) enough time so the program can send a string to the modem to kill the connection together with the program?
Or does anybody know of any other solution?
That will have the same effect. Thus killing the connection when the program is being ungracefully killed also. So, banner window and connection must be killed together.
Thanks in advance,
Raymond
|
|
|
|
|
Hello, the codegurus around the world.;)
If I am on the same situation, I try to use Timer rather than Thread.
Timer is easier than Thread.
1) Main program is always checking if the banner window is opened.
(Timer and CWnd::FindWindow() )
2) If the banner window doesn't exist, try to open the banner window again.
(Well, in my sense, the user can kill the banner window, but show this ASAP and connect ISP by the modem. )
At the same time, the banner window is always checking if the main window is opened?
BTW, I sometimes use NetZero, and if I close the banner window, the connection is also closed.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Ok, so you imply me to use a seperate Dll to check if the banner window is open?
I have done this and I have run in a performance problem with the banner window.
When user click on it it reacts very slow to the users clicks, it sometimes takes 30 to 40 seconds for the advertisers page to open.
I am using a seperate DLL to check if the banner window is running.
Do you know of any Dll source code that does the some job but without affecting the performance?
Thanks in advance,
Raymond Bnetoera
|
|
|
|
|
Hi there again and thanks for your reply.
BTW, Do you know how Netzero implemented to kill the connection after the bannerwindow was disabled?
If you have more info on how NetZero was programmed please forward this to me.
Thanks in advance,
Raymond Bentoera
|
|
|
|
|
You could write a loader program. All it would do is run you free internet application, and monitor its status. If your program gets killed, the loader program would close the internet connection.
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
I'm writing a Win32 Console Application and I'm using the getline() function for the input of strings. Each time getline() is executed the user has to press enter twice after entering any data. I've tried using several different combinations of cin, cin.get(), cin.ignore, and getline(). The best combination is cin.ignore() followed by getline(). The only problem is having to press enter twice. If anyone knows how to fix this let me know.
|
|
|
|