|
Hi all,
I have a form view there I am having checkbox buttons.
Now i want to change the background color of the button.
I am using OnCtlColor() fn but it is not working.
|
|
|
|
|
Try this
CBrush m_brushBK;
In OnInitialUpdate function
m_brushBK.CreateSolidBrush(RGB(200,200,0));
In the OnCtlColor function
HBRUSH CtestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
if(pWnd->GetDlgCtrlID()==IDC_CHECK1)
{
return m_brushBK;
}
else
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
return hbr;
}
}
|
|
|
|
|
OK thank you it is working
|
|
|
|
|
Hi all,
I have a camera service that records video to file running on windows mobile. But I will need to change it to record to buffer. It will be a service run in background.
And I may have some others application (on the same device) that need to access to this buffer and display the video in real time. I'm thinking about a RTSP server on mobile, but it will be very complex. So I just need a solution to transfer a video buffer between applications on the same device.
Can you give me any idea?
Thanks,
|
|
|
|
|
How about thorough a socket with TCP/IP or maybe UDP?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
That's why I'm thinking about RTSP server. But it's too complex. I just need something simple
|
|
|
|
|
The other application(s) that would connect to your app, are those also written by you (so you can make up any way to connect you wish) or you want to do some generic, standardized way?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
The other applications/clients could be written by me and could be write be someone else, we have some clients that will use this service. I prefer a standard way, but the speed is in priority (because these applications are for mobile phone). So I'm interested in a specific solution too.
|
|
|
|
|
Well, if you are allowed to come up with the protocol yourself then what's wrong with communicating through a socket? It shouldn't be that hard to come up with a simple, easty to implement way to connect and transfer data, of course i have no real overview of your project so i can't know.
Other methods that come to my mind are named pipes or shared memory, don't know if any of these is available on the mobile platform or not.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I'm wondering about the speed, I need that should be in real time, like when you see the mobile phone camera.
I don't know if I have to compress video before send it to socket. If I have to, so I need to compress and decompress video, the speed will be slow, I think.
If I don't compress them, so the data packet should be very big, I don't know if I can make a stream.
I see that youtube, dailymotion ... doing a stream. So I think the 2nd solution should be ok. That why in the first post I talk about a simple RTSP server.
I prefer a common buffer/shared memory like when you make a communication between threads in one application, this solution is more efficient and simple. But I don't know if we can do the same way with some independent applications.
|
|
|
|
|
Hmm, i just checked the GlobalAlloc method and found out that GMEM_SHARE is obsolete and ignored by the method (and is provided for backwards compatibility with 16 bit windows), i guess i was living in the past, as i could have sworn this would still work. Anyways, here's[^] a list of (some) interprocess communication methods, maybe one of these could be used on a mobile device too.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
thanks your helpful reply
|
|
|
|
|
Yourwelcome, i hope it did help. Could you tell me (and others who are reading this conversation maybe) which method you decided to use? Just curious...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I'm thinking about Pipes, File Mapping and a simple rtsp server (it means that TCP/UDP). I will do a/some test and tell you (not now, but when I done the test) which one I will use.
If RTSP is "enough" simple, I prefer it, because it's a standard, so I can reuse for my other projects.
|
|
|
|
|
The "Using a File Mapping for IPC" part seems to be promising. (see the link in my other post)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
|
Do you see the "reply" link, down to the message ??
If you want to thank someone, just "reply". Don't start a new thread for that.
Otherwise we cannot figure out what are you talking about to whom.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Strange problem: in order to check some securities issues in the organization I need to deploy a sample program that need to be recognized as a known virus or Trojan.
The idea is to deploy simple program to all user's machines and check who will recognized it as virus and to log what was done by the user after it.
Its must be recognized as a well known virus so the standard anti virus applications we have will catch it, but of course wont make any damage to the host machine.
Any ideas?
|
|
|
|
|
alto wrote: I need to deploy a sample program that need to be recognized as a known virus or Trojan.
How could be recognized as known, if you're freshly developing it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I thought maybe its possible to add some code or known recognition string that the anti virus program looks for, or other idea like this, but i don' know how to do it or if its possible
|
|
|
|
|
As far as I know, there are 'innocuos' real viruses around. Cannot you just use one of them?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
maybe I can actually, but I'll have to add it to my program since I need it to log the user action (I make it with simple hook on the anti viruses applications)
Can you point me to such 'nice' virus? thanks
|
|
|
|
|
This is up to you (I don't want such a responsibility...).
There are many online virus databases.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Here use this software, it gives false positive in many virus scanners (they don't like self extractors).
|
|
|
|
|
Thanks, but at list Avira & avg don't have any problem with that application
|
|
|
|