|
Hi,
I want to build a module in my app that will alow me to stream the video from my webcam. Anybody knows any open source app or any article on this matter? I don't know how to start.
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
hi,
the DIJOYSTATE2 struct is used to retreive the current state of a gamepad.
two members are standardized (lX, lY). when i say standardized i mean that you can localize a human readable equivalent ("left", "right", "up", "down" in english ; "gauche", "droite", "haut", "bas" in french ; etc).
for other members i didn't find a way to localize them since from a gamepad to another the same member can map a different axe....
is there a function in DirectInput that could help me on this case ??
any hint/suggestion is welcome.
thanks.
|
|
|
|
|
i use "connect" and "send" to send a broadcast,then i use sniffer find i get the response , but i have no idea to use "receive" to get the info of response ,can someone help me how to get the info of the response plz?
|
|
|
|
|
Here is an example that will wait upto 5 seconds for a reply
struct timeval tv;
fd_set set;
int xfd;
tv.tv_sec = 5;
tv.tv_usec = 0;
FD_ZERO(&set);
FD_SET(Socket, &set);
if ((xfd = select(Socket + 1, &set, NULL, NULL, &tv)) == SOCKET_ERROR)
{
}
if (FD_ISSET(Socket, &set))
{
char RxBuff[1024];
recv(Socket, RxBuff, 1024, 0);
}
Note that the first parameter for select is ignored, i.e. Socket + 1 is just so I know what the select is for!
Ant.
|
|
|
|
|
Hi All,
I have a FormView application,which contains some edit boxes ,combo boxes,two radio buttons(radio1 and radio2)and two buttons(button1(IDOK) and button2(IDC_BUTTON_XXX)).
the two buttons have BN_CLICKED handler functions.
when i select radio1, button1 will be shown to the user and button2 will be hidden.
select radio2 ,button2 will be shown to the user and button1 will be hidden.
my problem is that in radio2 selection,i input data in the edit boxes press ENTER key,button1's BN_CLICKED handler function getting invoked instead of button2's handler.
Can anyone tell me what might be the possible reason.
Thanks in Advance..
|
|
|
|
|
This is caused by the form view's default implementation.
A click on the Enter key issues a command for the form to simulate a click on it's default button, which usually is the 'OK' button. In your case, it is the button 1.
To remedy this, change the button 2 to be the default button of the form, or alternatively, capture keyboard messages sent to the form and filter out those containing VK_RETURN. This prevents the form from calling the default button's BN_CLICKED handler when it receives a key press event indicating the Enter/Return key was pressed.
Of course, when you filter out the keyboard messages, you can custom-call the click handler for the second button as well. To simulate a click on a button, create a WM_COMMAND message, put the HIWORD of wParam to be 'BN_CLICKED' and LOWORD to be the ID of the control. The lParam can be left alone (NULL) or can be the window handle (HWND) of the control.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
My problem is to replicate a directory from a server running Windows Server 2003, to a client running Windows XP using Visual C++.
I have search all over to find a solution, but I haven't found any good one. I did find a File Replication Service in Windows Server 2003, but I don't know how to use it.
One solution could be to create a new Replication Service, as I saw here on the code project, but isn't there any existing technique to do this already?
Rickard Israelsson
|
|
|
|
|
Hooking into the File Replication Service would definitely be the way to go as that is what it is for. I would really be surprised if it was not possible. Short of that, I'd search here at CP and Google for some sort of "folder synchronization" utility.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
MFC application generated with App wizard has splitter window with two panes, left pane contains CTreeView descendant. I fill tree control with some items, select one item and click on right pane. In this moment tree view does not indicate the selected item. I want tree view to behave like Windows Expolorer - to indicate the selected item, also when it loses focus.
Can anybody suggest a solution?
Frankie
|
|
|
|
|
Make sure your tree has this style:
TVS_SHOWSELALWAYS
"Causes a selected item to remain selected when the tree-view control loses focus."
You can do it either through the resource-editor or use 'ModifyStyle' at some initialization point.
|
|
|
|
|
I would like to copy an array of bytes beginning at a certain position to another array of bytes which is empty:
BYTE BAnswer[1000] copied to BYTE m_buffer[1000] beginning at BAnswer[6].
Thank's for advance.
|
|
|
|
|
memcpy(m_buffer+6, bAnswer+6, 1000-6);
this will copy all 1000-6 BYTES from bAnswer to m_buffer starting from the 6'th BYTE.
|
|
|
|
|
Same thing but:
memcpy(m_buffer, BAnswer+6, 1000-6);
Thank's...
|
|
|
|
|
ohadp wrote:
memcpy(m_buffer+6, bAnswer+6, 1000-6);
I know what you meant, but I just wanted to offer a minor clarification. Since the first byte is at position 0, and the second byte is at position 1, the sixth byte would be at position 5.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hello,
Some time ago there was a poll on the Code Project about "What do you use for authoring installations?". One of the possible answers was "Visual Studio (MSI)", and it took most of votes (24%). Most of the tools I know (InstallShield, Wise, VISE, InnoSetup, NSIS) were far behind. I wonder what they meant by "Visual Studio (MSI)". May be I am stupid, but I never heard about authoring installations this way.
Thanks
|
|
|
|
|
In Visual Studio* open the New Project dialog, select "Setup and Deployment" projects from the tree on the left and then you can select a variety of project types on the right. The "Setup Project" produces an MSI (+ Setup.exe + setup.ini) as its output.
* This may only be for Visual Studio 7.x (I can't recall if VS6.0 had it)
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Thank you. I think this is about VS.NET. I use Visual C++ 6.0 and cannot find such feature.
|
|
|
|
|
Microsoft Installer, maybe?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi
I have a header file x.h in this I have #include "y.h"
In y.h file I want to use the class declared in x.h. But if I include x.h in y.h file, it is giving me an error saying class X is not decalred.
Could anyone tell me how to solve this?
Regards
Neha
|
|
|
|
|
x , y , y , x , ... *uggg*
put this line where you using it.
class X;
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Thanks for the reply.
Here is the code
In X.h
#include "y.h"
Class X
{
}
In Y.h
#include "X.h"
Class X;
Class Y
{
X m_Item;
}
In this case I will get a error as
'm_Item' uses undefined class 'X'
How to slove this?
|
|
|
|
|
Instead of using the class X, use a pointer to the class:
Class Y<br />
{<br />
X* m_Item;<br />
}
This will solve your problem because you won't have to include the X.h header in the Y.h file (you'll have to include it in the Y.cpp file instead).
Hope this helps
|
|
|
|
|
Just remove line
#include "y.h"
from X.h file
it should work
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
How do i set the size of column/row of the grid?. Also, is there a way when i click on a cirtain column, the data sort itself?
|
|
|
|
|
MFGrid.ColWidth(0) = xxx;
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|