|
It's probably affordable to write a web service that sends the text to a call centre in India and takes back an mp3.
Seriously, that's a hell of an ask. If Microsoft provides a speech API, why don't you want to use it ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
|
|
I don't want to use it because i want code in website and client doen't install aspi, but could listen the text voice.
thanks
Nho'c Ti`
|
|
|
|
|
Hi
I am currently building a computationally-heavy application, which requires processing of hundreds of image data, and this processing must also be done hundreds of times. To let users know which image file is currently processed, I simply bound a variable to a static text control, and I update this variable and call UpdateData(FALSE) everytime a new image file is processed.
The application runs fine for the first few iterations. But after it reaches a certain iteration (the exact numbers differ between executions, but they are close to each other), the text control suddenly moves to the topleft of my monitor! Updating of the control is also abnormal (some image files are skipped). Apparently the processing still runs fine, and the result is correct, it's just that the update is messed up.
Could someone shed some light on what may cause this problem and how I can rectify this?
Thanks!
|
|
|
|
|
Try to log some information to a text file...
Maxwell Chen
|
|
|
|
|
I'm guessing that the image processing is done in a different thread than the main application so as to keep the GUI 'snappy'.
If so, there could be an issue with one thread manipulating a window created by another (the main app) thread. This could cause the app to screw up at random. I have seen similar effects related to this before.
I would suggest that the image thread post (not send) a message to the window. The app thread can then update the variable and call UpdateData(FALSE).
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Having bint a DataGrid to a data source,I want to modify each colunm's width of DataGrid,what to do next? I tried as below but failure:
CColumns cols=m_DataGrid.GetColumns();
CColumn col;
VARIANT var;
long l=cols.GetCount();
for(long i=0;i
|
|
|
|
|
Hi,
I've been working on an image based application. I'm using VB and VC++ to work with the images. Both are activex controls. I created a property like Get/SetActivePicture(LPPICTUREDISP pPicture). The code is given below.
I'm facing memory problems. Can someone help me how can I release the memory from VC++ after I use the picture object? Thanks in advance .. I can't release the component until I solve this issue. Pls. somebody help me.
The implemenation in VB is like this ... After using this, the virtual memory has been increasing each time ... the performance became too slow !!!
....
PicEd.Open("C:\Temp.bmp")
set PicEd.ActivePicture = Picture1.Picture
PicEd.RotateBy(90)
set Picture1.Picture = PicEd.ActivePicture()
....
//----------------------------------------------------------------------
void CPicEdCtrl::SetActivePicture(LPPICTUREDISP newValue)
{
// TODO: Add your property handler here
if (newValue == NULL) return;
try
{
HBITMAP hBMP;
HRESULT lResult;
newValue->AddRef ();
m_Pic.SetPictureDispatch(newValue);
newValue->Release();
lResult = m_Pic.m_pPict->get_Handle((OLE_HANDLE FAR *) &hBMP);
//CxImage* image;
image->CreateFromHBITMAP((HBITMAP)hBMP);
}catch (CException e)
{
e.ReportError();
e.Delete();
}
SetModifiedFlag();
}
// ------------ ---------------------- --------------- ------
LPPICTUREDISP CPicEdCtrl::GetActivePicture()
{
// TODO: Add your property handler here
if (image == NULL)
{
m_Pic.CreateEmpty();
goto EndProp;
}
try
{
m_Pic.CreateFromBitmap (image->MakeBitmap(0));
}catch (CException e)
{
//Suppress any exceptions
e.Delete();
m_Pic.CreateEmpty();
}
EndProp:
//return the IPicture dispatch interface
return m_Pic.GetPictureDispatch();
}
|
|
|
|
|
I am new to (attempting) to use template classes.
My requirement is to avoid coding using inheritance - becuae I have 13 classes already coded and I want to have two "new forms" of classes that "inherit" this class and another class. To clarify...
I have a class X and I wish to make a class publishedTrack and a class reflectedTrack.
For example: I was hoping to use
typedef PublishedObject< Track > PublishedTrack ;
PublishedTrack* publishedTrack = new PublishedTrack;
where
template < class T >
class PublishedObject
{
private:
p_;
public:
PublishedObject();
virtual ~PublishedObject();
operator T*(void) { return p_; }
T& operator*(void) const { return *p_; }
T* operator->(void) const { return p_; }
PublishedObject& operator=(PublishedObject<t> &p_)
{ return operator=((T *) p_);}
PublishedObject& operator=(T* p_)
{ p = p_; return *this; }
T* get() const { return (T*)p_; };
}
I also want to be able to do publishedTrack->someMemberFunctionInTrack()
But what I get is that my operator overloading of -> is not quite right.
Any advice...any "pointers" ?
|
|
|
|
|
This is just a wild guess but perhaps instead of overloading the -> operator you could try overloading the . operator? ... Like I said, a wild guess...
|
|
|
|
|
Anyone know where I can get my hands on some C/C++ (not Java) code to control an X10 device? I just want to be able to turn the device on and off by running a simple command line program, eg:
C:\> foo.exe ON
C:\> foo.exe OFF
There seems to be nothing available @ x10.com or SourceForge.
Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
How do I convert a CString into a DWORD or to a INTEGER.
Basically suppose I have a function that returns a DWORD value , but the acutal value that I need to return is in a CString. (actually ...it is a number between 0 - 100)
suppose...
DWORD myfunc()
{
CString strVal="5.5";
DWORD retVal = {some how convert the strVal into an integer or DWORD};
return retVal
}
|
|
|
|
|
Use _ttol() to convert a CString to an int .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I'm trying to convert a "CString" not a "string"
dont' have to use a member fucntion on this object?
I thought I need to format it first?
|
|
|
|
|
CString strFoo = "1234";
int nFoo = _ttol (strFoo);
ASSERT (nFoo == 1234);
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Very Simple
Convert CString to String and then to int/double(whatever)
DWORD myfunc()
{
CString strVal="5.5";
char *str;
str=new char[CString.GetLength()+1];
for(int i=0;i<CString.GetLength();i++)
{
str[i]=CString.GetAt(i);
}
str[i]='\0';
return atol(str);
return atof(str);
}
I hope this solves ur problem.
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
it may work but very inefficient.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Hi all,
I'm writing a simple dialog with a listbox in "report" mode. My problem is that in order for a user to select an item in the list, (s)he has to click on the 1st column in the list. Also, this will only highlight the first column and not the rest of the row. This is functional ofcourse but it would be nice the have the whole row highlited.
Any help would be greatly appreciated
Mark
|
|
|
|
|
DWORD dwStyle = ListView_GetExtendedListViewStyle (m_myListCtrl.GetSafeHwnd());
dwStyle |= LVS_EX_FULLROWSELECT;
ListView_SetExtendedListViewStyle (m_myListCtrl.GetSafeHwnd(), dwStyle);
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Need help...
How can I make a CMonthCalCtrl created at runtime (with Create(..)) not clipped by the parent window?
I need to show a CMonthCalCtrl control, and need to show it outside the bounds of a CFrameWnd, but when I create and show it in a view, this is clipped by the parent.
I tried with SetWindowPos(&wndTopMost...) but nothing..
Can anyone help me?
Thanks, Paolo
|
|
|
|
|
There is one thing you should know before using the advanced controls like Date-time-picker in ur program.
You should Call this function when your program starts.(You have to do this in API programming, cant say for sure about MFC, just give it a try. Refer www.msdn.com[^] for detailed info)
BOOL InitCommonControlsEx(<br />
LPINITCOMMONCONTROLSEX lpInitCtrls<br />
);
It registers specific common control classes from the common control dynamic-link library (DLL).
Parameters
lpInitCtrls
Address of an INITCOMMONCONTROLSEX structure that contains information specifying which control classes will be registered.
Return Values
Returns TRUE if successful, or FALSE otherwise
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
For some reason every time I call ShowWindow it just hangs and I never get control of my application back. This didn't happen just earlier today, I may have changed something, but I have it called in two places. I know that one of them (the first example) didn't get changed, so I know that it can't be what I changed.
Here is the code that (I have changed) calls ShowWindow:
bool BuildWindow()
{
const LPCSTR pstrTitle = "Game";
const LPCSTR pstrCaption = "Game";
WNDCLASS pwdcWndSpec =
{
CS_HREDRAW | CS_VREDRAW,
WindowProc,
0,
0,
GetModuleHandle(NULL),
NULL,
NULL,
NULL,
NULL,
pstrTitle
};
if ( !RegisterClass( &pwdcWndSpec ) )
{
Console::WriteLine("Error: Unable to register window.");
return false;
}
mhwdWndHandle = CreateWindowEx(
WS_EX_TOPMOST,
pstrTitle,
pstrCaption,
WS_POPUP,
0,
0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
NULL,
NULL,
pwdcWndSpec.hInstance,
NULL );
if ( !mhwdWndHandle )
{
Console::WriteLine("Error: Unable to create window.");
return false;
}
mhinWndInstance = pwdcWndSpec.hInstance;
ShowWindow( mhwdWndHandle, SW_SHOWNORMAL );
UpdateWindow( mhwdWndHandle );
SetFocus( mhwdWndHandle );
return true;
}
mhwdWndHandle - Global HWND
mhinWndInstance - Global hInstance
The other place I have it called is in a class I made to give better control of the console window (I have not changed):
void AdvancedConsole::SetWndState( enuWndState venuWndState )
{
ShowWindow( mhwdWndHandle, venuWndState );
}
mhwdWndHandle - Class level HWND
enuWndState - Enumeration:
__value enum enuWndState
{
wsHidden = SW_HIDE,
wsMax = SW_SHOWMAXIMIZED,
wsMin = SW_SHOWMINIMIZED,
wsNormal = SW_SHOWNORMAL
};
Any help would be greatly appreciated.
|
|
|
|
|
Just out of curiousity are you doing anything in OnPaint event that would hang for certain inputs?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|