|
Who knows clearly about Text To Speech SDK 5.0 ? Help me ! I heard that SDK 5.0 can deal with international pronunciation. Really (I have just began to use it today)?
Email me: dlhson2001@yahoo.com
|
|
|
|
|
know that I need to use WNetAddConnection2 to map a network resource but when I use WNetCancelConnection, and then try to map again I get an error 1312. I noticed that I can use WNetUseConnection to make my mapping but how do I disconnect a mapped resource on my pc? Thanks
Tom Wright
Programmer
tawright915@yahoo.com
|
|
|
|
|
How do I determine whether to use regular sockets or overlapped sockets? If I only have three or more connections connecting to my server (which I'm writing)at a time.
If I make this a multi threaded application then would I need to have events telling me that a client wants to connect?
How do I set the socket handle globally in MFC, without sticking it in my header file? So that I can pass it from one function to another...example
Handle is created in my OnOk function, how do I pass it to my OnCancel function to close the handle?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Tom Wright wrote:
How do I determine whether to use regular sockets or overlapped sockets? If I only have three or more connections connecting to my server (which I'm writing)at a time.
what flavour you prefer. should be good for a first start.
How do I set the socket handle globally in MFC, without sticking it in my header file? So that I can pass it from one function to another...example
make it a member variable in your class or pass it to function you call.
|
|
|
|
|
You would be better off making the socket a member of the class, in which you hanle your communication functions. You can use overlapped writes and reads, if you use an IOCompletionPort or WaitForMultipleObjects, so that you get notified of network events based on your pending reads/writes.
The easiest would be to have a lokk at an article here on CP by Norm Almond about creating scalable socket servers. A look at the article could give you ideas on implementing a multi-threaded server or client. If you cannot tie the code to NT, you will have to use WaitForMultipleObjects instead of the IOCompletion port
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
hi..
I want to change text color of RichEdit but this code didnt work.
void ChangeColor(HWND hWnd)
{
CHOOSECOLOR cc;
static COLORREF acrCustClr[16];
COLORREF cResult;
CHARFORMAT2 cf;
cc.lStructSize=sizeof(cc);
cc.hwndOwner=hWnd;
cc.rgbResult=cResult;
cc.lpCustColors = (LPDWORD) acrCustClr;
cc.Flags=CC_FULLOPEN|CC_RGBINIT|CC_ANYCOLOR;
if(ChooseColor(&cc)==IDOK)
{
cf.crTextColor=cc.rgbResult;
SendDlgItemMessage(hWnd,IDC_REDIT1,EM_SETCHARFORMAT,SCF_ALL,(LPARAM)&cf);
}
}
|
|
|
|
|
I want to insert "{" to the top of exist text file and insert "}" to the bottom of text file
Example:
If in "1.txt" has this data in it.
1234afd
daf845
dfdfa
and I want to insert "{" to the top of text file and insert "}" to the bottom of text file. So I think it should be like this
{
1234afd
daf845
dfdfa
}
I write program to do that. But my program replace "{" to the first line data of "1.txt"
So my program write this data in "1.txt"
{
daf845
dfdfa
}
Below is my program.
<br />
CStdioFile OutputFile;<br />
CString outp_filename, m_string; <br />
CFileException FileExc;<br />
BOOL bEnd;<br />
<br />
outp_filename = "1.txt";<br />
<br />
if (!OutputFile.Open(outp_filename, CFile::modeCreate | CFile::modeWrite | CFile::modeNoTruncate, &FileExc)) <br />
{<br />
FileExc.ReportError();<br />
return;<br />
}<br />
OutputFile.SeekToBegin();<br />
<br />
m_string = "{";<br />
<br />
OutputFile.WriteString(m_string+'\n'); <br />
<br />
OutputFile.SeekToEnd();<br />
<br />
m_string = "}";<br />
<br />
OutputFile.WriteString(m_string+'\n');<br />
<br />
OutputFile.Close();<br />
<br />
}<br />
<br />
Do you know how to solve my problem?
Thank you very much.
|
|
|
|
|
You will have to write the { followed by the regular text and the a } to a new file, delete the old one and rename the new one.
You can't append to the start of a file unfortunately.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
I have a console socket server, that takes user commands on the cin and displays some output on cout. The commsnds are basically performance statistics like messages processed, users connected etc. There are also commands to logout a user.
The server is cross platform and can be compiled on both Windows and Linux. The Windows compiled version allows me to run it as a service. Now, I want to run this as a service.
The question: Is there some application that can redriect cin and cout to a socket connection? Like I invoke my console app from this application and it provides a remote console to me, giving me exactly the same behaviour as the console.
If not, is there any technique to hook into cin and cout from an external application. I do not want to make any changes in the server. It is in production and extermely stable. I do not want to change it.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
program > mysockprogram
There you would handle any STDIN input from the incoming program.
In Win32, you can use GetStdHandle()[^] to get the handle to STD_OUTPUT_HANDLE and optionally STD_INPUT_HANDLE , duplicate them, and use Read/WriteFile() to get input/output from a standard handle pipe(s). There's a good example, Creating a Child Process with Redirected Input and Output[^] on MSDN.
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
I want to write a small app that encodes / decodes mp3 into wav format,
All i can find is tons of info about codecs, acm , etc...
Is there any way to write an mp3 codec so one does not have to worry about it already being installed. I can find no good information about this topic, windows media sdk seems to only really care about .wma files.
|
|
|
|
|
In addition say i use windows media sdk for mp3 decode/encode, does it come default on win 95 - xp?
and do i still have to pay the insane fees to mp3licensing.com?
|
|
|
|
|
nlecren wrote:
Is there any way to write an mp3 codec so one does not have to worry about it already being installed
If you write your own codec, you'll have a unique global id, so you don't need to bother what's already installed.
nlecren wrote:
windows media sdk seems to only really care about .wma files.
Looks like you don't know what you are willing to do. You just said you didn't want to bother what was already installed, and now you are talking about a MS product with ramification at the very core of the operating system.
You need to write a windows-compliant codec, that takes MP3 as an input, and output WAVs files. Get your hands on the Windows DDK.
Quite honestly, I would be you, I wouldn't do this at all. Writing codec stuff is very hard, because if you want reliable features, you need a lot of time, and you need a large background as a professional programmer. I don't know why instead you wouldn't get some free source code on the net (check out virtual dub for instance). But now, what would do with this code if it already produces WAV streams from MP3 ?
How low can you go ? (MS rant)
|
|
|
|
|
Good point,
What im really concerned with is paying royalty fees just to write a app that converts mp3 to wav, which it sounds like I will have to do if i use the windows media sdk, as far as virtual dub goes, i hadn't even thought of that, thanks i'll go check thier source code.
|
|
|
|
|
|
I have a dialog app and I want to fire off a child window which is the equivalent of a ("modeless") MFC SDI 'app' (with no doc/view support) showing a CListView.
Where do I start!?
Regards,
Jason
|
|
|
|
|
In your main dialog class, prepare:
private:
CYourModelessDlg* m_pYourModelessDlg;
then in your OnInit for main dialog:
this->m_pYourModelessDlg = new CYourModelessDlg
this->m_pYourModelessDlg->Create( IDD_YOUR_DIALOG, AfxGetMainWnd());
in your fcn that will show the dlg:
this->m_pYourModelessDlg->ShowWindow(SW_SHOW);
then when you handle WM_CLOSE for your main dlg:
delete this->m_pYourModelessDlg;
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Thanks nitron, but what about the CListView part...?
I effectively want a FULL APP as a child and modeless window. In otherwords, I want to see menu/toolbar, etc...
Jason
|
|
|
|
|
design the dialog in the resource editor like the primary dialog. In the properties of the dialog, pick which menu you want to load. Add the List control to the dialog like any other control. If you are a purist and don't use the resource editor, I guess you can dynamically create the controls and menus if you want...
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
|
I'm trying to give my Outlook Plugin (It's a COM dll) the XP themes but the manifest file I used to use for standalone apps doesn't work...
I got some info on: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp[^] but I don't understand that part
Add the manifest to your application's resource file as follows:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.manifest"
Winuser.rh includes the following defines:
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define CONTROL_PANEL_RESOURCE_ID 123
#define RT_MANIFEST 24
Can anyone help me out? Thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
The resource ID needs to be 2 for DLLs, 1 is for EXEs.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
|
I cant debug this since it happens sporadically. Basically sometimes my trackPopupMenu context menu doesnt show up when I right click on the control where its s upposed to be enabled. Is this a windows bug? If I cant debug it, how shall I figure out whats wrong and how to fix it?
Appreciate your help,
ns
|
|
|
|
|
It's not a bug. The menu appears at the coordinates of the pointer at the time you pick it up with the GetCursorPos() call. Due to the nature of mice and mice movement, coupled with the processing time for the right click, or the context menu key hit, and delays from that action to your application actually processing it because of other processes running, the position may be off from where you expect.
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|