|
1) You have it in that class list.
Go almost to the bottom of it and you will find: "Generic CWnd"
2) You cannot "recreate" the same object in OnPaint. Why do you need to do that?
Jaime
|
|
|
|
|
So I have a video file with already one audio stream. Separately I have an audio stream (can be WAV or MP3).
What I want is to insert this second audio stream into the video file, so the video file resulting to have two audio streams.
I want to do it automatically (a peace of code), not with premier and similars.
thanks guys!
|
|
|
|
|
I have to use these plain sockets, not MFC. If I do one send() from one app, the other can get it with recv. This works. What I really need to do is write a number of separate chunks to a socket, then have the other one read it at its leisure. I tried write() but that doesnt work....it doesnt like the socket handle I get from socket(). So I tried two sends in one and two recvs in the other thinking that my multiple sends will get queued up and the other can recv the info at its leisure in measured doses
eg.
1. send the header
2. send the image
--------------------
1 recv the header
2. recv the image
If I have two sends and only 1 recv I can get the two things sent in the buffer that recv() has.
However i really need to recv() stuff into separate buffers. I thought read and write would work, but it doesnt.
How do I do this, so that I can recv stuff sent in two sends into two recv() buffers? Do I have to do an communication between processes? Like send 1 thing, wait and get a confirm from the other app on receipt, then send my second chunk which the other app will now be waiting for?
send() 1st chunk
recv() -- other app got it, so send again
send() 2nd chunk
while on the other end I have:
recv() 1st chunk
send() -- to tell its okay to send second chunk
recv() second chunk.....
I was hoping I could just read my two chunks and just send() them one after another....
Thanks,
sb
|
|
|
|
|
Question 1: is this TCP or UDP?
if UDP, each send() requires one recv() on the other end.
if TCP, things may get combined, or split.
[you're not doing plain old IP, are you?]
You should also look into a function: "WSASend" and "WSARecv" (these are microsoft re-implementations of send() and recv() that provide some extra capabilities, like sending chunks)
Additionally, I'd recommend that you develop a data format. Some sort of additional data that you include your data with -- to add descriptive information into the packet/stream. Describing how bit it is, and what it is. That way, when it get's to the other side, you can tell what's going on, or what's missing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Please help me. Can I obtain traffic statistics for IrDA on PC-side by some way? Thank You!
|
|
|
|
|
iwant to make a program like the norton ghost i want to know how to make an interface where user can select a whole partition not file and how can i open the files included in this partition and get their paths
|
|
|
|
|
I saw a sample here which uses COM (or ActiveX) interface IPicture (or similar) to save bitmap image to gif, jpg file etc.
but i can not find the sample or code (post) now.
do you know where it is?
thx.
includeh10
|
|
|
|
|
I can not find link to search engine from where we can find a poster etc - not formal articles.
thx
includeh10
|
|
|
|
|
Is this close?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
it is almost but not exactly what i need.
i want to find all messages i posted before.
where is search engine for this finding?
thx
includeh10
|
|
|
|
|
You can only see the last 200 of your own posts from your profile.
Posts[^]
Otherwise you'll have to use the Search comments facility that is at the righthand side of the forums bar, next to the Set Options button.
Michael
CP Blog [^]
|
|
|
|
|
right,
it is from clicking "search comments" on top.
i never use this feature before.
thanks
includeh10
|
|
|
|
|
If a friend of mein works on the same application like I do and in the end we want to bring all the program's parts together, what should we do.
For example we have a MDI and a dialog based application.We want the DIALOG BASED App to depend on MDI. What should we do and how should we work with dialog based classes and variables from MDI app ?
|
|
|
|
|
hi victor ,
in ur case , in a source code file in the DIALOG based app , declare
those variables which u want to use from MDI app using extern keyword as a prefixx .
imagine that u want to use two variables of type double (dbl) and long (lng) from MDI app. (The same can be true for classes/objects also )
in a source file (int the Dialog app ) when u declare variable use the keyword
extern long lng;
extern double dbl;
( i am assuming that u fl and dbl is those variables u want to share )
Hope this helps.
Praseed Pai
www.praseedpai.com
|
|
|
|
|
And how should I add the dialog based project to the MDI,simply adding it as new resources? I've already tried that and I got a lot of errors because of the conflicts between the .res files (the MDi res file and the DIALOG based res file).
------ maybe I didn't understood it well. Is that what you wanted to say ?
|
|
|
|
|
Is there any possibility to link the 2 project into a solution using a dll or a lib file ? I remembered I'd read smth about it on a site but i can't remember exactly how to do it and if it's possible.
|
|
|
|
|
Victor Paraschiv wrote:
If a friend of mein works on the same application like I do and in the end we want to bring all the program's parts together, what should we do
Use a program called Microsoft Visual SourceSafe or similar. This program, and others like it, upkeep a database of source files, and manages the locking/releasing of source files that are being edited by someone. For example, if you have a team of programmers working on the same project, then this is ultimately the best solution: when someone has checked in with a certain source file (checked in means that he/she is editing it), no other person can edit the source file simultaneously. If you need a free solution, the CVS Tree in SourceForge may be a valid approach. Haven't tested it myself, though.
As for the example you presented, did you know that the dialog app project of yours actually consists of a dialog class, the dialog template resource, and a small CWinApp-derived application class used to create and display the dialog ? If you wanted to use this dialog in another program, you would only need to move the dialog class and the resource file over. Naturally, before this moving can occur, you must make sure that the destination project has no duplicate IDs or class names. The easiest way is to take the dialog project as a reference, then create similar classes and dialog templates into the MDI app, create necessary handler functions, then copy/paste the actual code (contents of functions) from the old project to the new one. This ensures that although the IDs may change, the names that refer these IDs remain the same without a hassle.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
In my app I want to use the dialog based app toghethere with MDI. It is simply to much work to do to copy/paste all the cpp-s and header files from a project to another. I just want to build them together considering that they are different modules from a program and I want to pass parameters and functions between them.
Isn't there another posibility than the other 2 described by you? In the first case I think I complicate far to much for what i want to do. What about using dll-s and lib files. Cand you tell me something about them ?
|
|
|
|
|
Is there any way to find out whether desired service is running on the remote port?? i am just scanning for well known ports
|
|
|
|
|
How do i write an application so that it does not run when opened by any user other than administrator? my application is a dialog based application. so i do not want to initialise my dialog when i m not administrator. i just want to show a message box saying the application runs only as administrator. how do i check administrator rights through a VC++ program?
suggestions needed.
|
|
|
|
|
This is a reply to a similar question that I copied from a forum:
[Reply]
This piece of code should be what you are looking for. Also, the article Searching for a SID in an Access Tokenin the Widows Base Services: Platform SDK on the MSDN Library Visual Studio 6.0 will help.
HANDLE hToken = NULL;
PTOKEN_GROUPS pGroupInfo = NULL;
DWORD dwSize = 0;
DWORD loop = 0;
PSID pSID = NULL;
BOOL bSidCheck = FALSE;
SID_IDENTIFIER_AUTHORITY SIDAuth = SECURITY_NT_AUTHORITY;
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken);
GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize);
pGroupInfo = (PTOKEN_GROUPS)new BYTE[dwSize];
GetTokenInformation(hToken, TokenGroups, pGroupInfo, dwSize, &dwSize);
/**** well-know SID *****/
//DOMAIN_ALIAS_RID_ADMINS
//DOMAIN_ALIAS_RID_USERS
//DOMAIN_ALIAS_RID_GUESTS
//DOMAIN_ALIAS_RID_POWER_USERS
//DOMAIN_ALIAS_RID_ACCOUNT_OPS
//DOMAIN_ALIAS_RID_SYSTEM_OPS
//DOMAIN_ALIAS_RID_PRINT_OPS
//DOMAIN_ALIAS_RID_BACKUP_OPS
//DOMAIN_ALIAS_RID_REPLICATOR
// Creating a SID for the BUILTIN\Administrators group. Could use others
AllocateAndInitializeSid(&SIDAuth, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS,0, 0,0,0,0,0, &pSID);
for(loop = 0; loop < pGroupInfo->GroupCount; loop++)
{
// Check All Groups to see if a match to the ADMIN SID that was created if(EqualSid(pGroupInfo->Groups[loop].Sid, pSID))
{
bSidCheck = TRUE;
break;
}
}
delete [] pGroupInfo;
CloseHandle(hToken);
if (pSID)
{
FreeSid(pSID);
}
if (pGroupInfo)
{
GlobalFree(pGroupInfo);
}
if(bSidCheck)
{
//came back with a Match
}
else
{
//No Match
}
[/Reply]
If you vote me down, my score will only get lower
|
|
|
|
|
In A dialog based application where should i put this code segment. in initDialog()?
|
|
|
|
|
I try to get a notification when the user change the current selection in a CListCtrl.
It is possible to get one whith the NM_CLICK event (when the user clicks on it), but I don't know how to get the new selection when the user changes the current selection width the arrows ...
is there any message like TVN_SELCHANGED (for CTreeCtrl) ?
Thx.
--
Gizmo
|
|
|
|
|
Simply provide a handler for the LVN_ITEMCHANGED notification. The iItem member of the NM_LISTVIEW structure will be the number of the selected item. Or, you can just call GetNextItem(-1, LVNI_SELECTED) .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|