|
Hi,
I would like to develop a kind of news displaying app with a transparent window. Unfortunately my machine does not support alpha-blending overlays.
Therefore, I want to have an inactive always-on-top window that doesn't capture mouse events. Instead, all events shall be passed to the underlying windows, just as if my window would not exist.
Is that possible?
Thanks,
Chris
|
|
|
|
|
|
I have tried this. It doesn't work, because the currently active application still becomes inactive when I click into my window.
Any other suggestion?
Chris
|
|
|
|
|
I'm not sure - can we use the == operator on the basic_string templte, as in the following manner:
#include <iostream>
#include <string>
string s1 = "Hello" ;
string s2 = "Hello" ;
string s3 = "hell" ;
cout << (s1 == s2)
cout << (s1 == s3)
In some other languages (as in Java), == checks for equlity of memory location. Does basic_string have an overloaded == operator?
|
|
|
|
|
Yes basic_string does have the overloaded equals operator.
The reason Java checks equality of memory location is that in Java you only have references to objects - never the objects themselves (except for primitive types). In C++ you can have the object itself (in which case '==' should compare values) or a pointer to the object, in which case '==' compares memory addresses.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
|
Hiya I have been reading about com ports and sending data through them. But how do I set up a simple test, say sending one line of data through the comm port??
I know how to use CreateFile, WriteFile and ReadFile.
I have one computer. How can I do this??
Thanks.
|
|
|
|
|
If you call WaitForMultipleObjects with the bWaitAll param set to TRUE (indicating you want to wait for all, not just one, to become signaled), what is the return value if successful?
Is it WAIT_OBJECT_0?
Or some value between WAIT_OBJECT_0 and WAIT_OBJECT_0 + numobjs - 1?
Or something else?
|
|
|
|
|
Philnessosity wrote:
Or some value between WAIT_OBJECT_0 and WAIT_OBJECT_0 + numobjs - 1?
This one.
~RaGE();
|
|
|
|
|
i dont have enough knowledge of visual c++. Thats why iam here in front of the highly professional people like u to assist me.
Right now i am building an Video Conferencing application for a company. as iam heading to it what i want to know that what will be the hardware complications in the case and the prgramming one.
so i want excellent type of programmer to give me an idea actually how to head for it.what approach would be easy to use
|
|
|
|
|
I am creating an application which shares datafiles over a LAN of roughly 5 computers. I am positioning the datafiles on only one computer on this network, and allowing all the other computers access. If I were setting up a server, this would be no problem, for I could manage the files using CSemaphores, but there is no server. Can somebody let me know if there's an option using the CArchives, or any other classes, which would allow me to read and write to these files without interfering with other instances of my application? As an example, if two instances of the same application wish to write to the datafiles, I should only allow one, but I want the second application to patiently wait for access to the datafiles--the basic reader/writer problem, but over a network. Please let me know!!!
Thanks!
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
No. One solution is to create (open) the files such that other processes may not write to the files or even read the files. There are no elegant solutions without a server managing a queue. The clients will need to loop through until the files are accessible.
Kuphryn
|
|
|
|
|
Hi,
I have problem adding a bitmap to the background of my SDI App.
I know how to add it in a dialog, but I have some problem adding it to a SDI App.
any ideas?
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
One solution is to repaint the background in OnDraw(). Another solution add a handler to WM_ERASEBKGND.
Kuphryn
|
|
|
|
|
If I embed a CPropertySheet derived class as a child in a Cformview window. The controls of the initial page are not shown.
You can only see a blank page page.
If I select another tab and swith back to the first page,
the page is shown correctly
Since it's the second time I encounter this same problem,
I think there is someone who might have a solution for this.
thanks in advance.
|
|
|
|
|
use create instead of DoModal
includeh10
|
|
|
|
|
I am creating a RFC-868 compliant time server. It must support TCP/IP and UDP on server port 37. TCP/IP works fine. Each protocol dependent server runs in a separate thread and both threads always get created and appear to run fine.
The problem is on the UDP thread side. I wait for a packet to be rcvd on port 37 then transmit the current time as a long back to the requesting IP or computer. Though, it looks like I am sending the packet, I cannot capture it with a sniffer. There are no errors using the sendto() command and I even sent a bogus string as a test and still cannot see it on the network.
I have verified the socket is created and valid. The only thing I can think of is that maybe there is a conflict when binding the same adapter and IP address using two different protocols, UDP and TCP/IP. Is anyone aware of one? I am currently binding to INADDR_ANY which is supposed to allow me to receive from all network interfaces but I only transmit back to the IP address and port that I received in the request. One of my sniffers is monitoring all network adapters and doesn't see the response that I am sending. Another sniffer a coworker has for Linux did not see it either even though that is a private 2 computer network (crossover cable).
Hope someone can help.
|
|
|
|
|
Update: Though, I am unable to see the reply on a sniffer, apparently it does send it since the device/computer requesting the time can see the reply.
BTW, does anyone know what the minimum packet size for UDP is? I have tried sending a UDP reply packet of 46 bytes -- 42 bytes of IP and UDP header and 4 bytes of data. Also, tried padding it to total 64 bytes but it doesn't seem to matter.
|
|
|
|
|
If I remember correctly, it is something like 400
|
|
|
|
|
Hi
Do you know where I can find the true colour 32bpp 24*24 bitmaps from Microsoft displayed as “Common Toolbar Icons” in this Microsoft page http://msdn.microsoft.com/library/?url=/library/en-us/dnwxp/html/winxpicons.asp?frame=true ? And are we allowed to use them without royalties?
Thank you very much in advance.
Best regards
Guy LECOMTE
|
|
|
|
|
I'm sure this is something real stupid but I am completely lost on getting this simple class (see below) to compile. The compiler returns a
'cout' : undeclared identifier
I'm using the <iostream> include rather than <iostream.h> (I'm using Visual 6.0)... doesn't the compiler by default add the Standard C++ library...so this should work? Actually, I tried it both ways; neither works???
Do I have to add libraries to the Proj/Settings/Link tab (Aren't these automatically added). I think my Directories are OK... Tools/Options/Directory tab... Include files: VC98/Include, VC98/MFC/Include
Library files: VC98/Lib, VC98/MFC/Lib
Source files: VC98/MFC/SRC, VC98/MFC/Include
// Client.cpp: implementation of the CClient class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Client.h"
#include <iostream> //For cout; Use <iostream> instead of older <iostream.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CClient::CClient()
: mName("xxx"),mGender('X'), mAge(0)
{
}
CClient::~CClient()
{
}
void CClient::Input()
{
char name[20];
cout << "\n Name : "; cin>>name;
mName = name;
cout << " Gender : "; cin >> mGender;
cout << " Age : "; cin >> mAge;
return;
}
void CClient::Display() const
{
CString s;
s.Format("%-10s %c %d", mName,mGender,mAge);
cout << s;
}
// Client.h: interface for the CClient class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_)
#define AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CClient
{
private:
CString mName;
char mGender;
int mAge;
public:
CClient();
virtual ~CClient();
void Input();
void Display() const;
};
#endif // !defined(AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_)
|
|
|
|
|
Note for people looking at my post above; the #include statements were not transmitted correctly; apparently the forum software thinks "<" ">" are HTML tags.
I tried including "<"iostream">" rather than "<"iostream.h">" per MSDN literature for the newer Standard C++ libraries. Neither worked
Thanks for any help you can provide.
kyle01
|
|
|
|
|
Either use std::cout or type using namespace std; right after your #include's...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|