|
|
hello,
i've a strange problem, i've written a program where i use a lot of keybd_event functions to simulate keyboard events, it seems like that this messes up the whole windows system. drag&drop is not working, and therefore starting programs with a doubleclick on the desktop is also not working.
this happens only on a few systems, i've searched for days but found no solution, can anybody help me?
bye
Mario
|
|
|
|
|
Are you also sending key up events? If you send
keybd_event ( VK_ESCAPE, 0, 0, 0 ); you'd better also send
keybd_event ( VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0 ); or else the system will think the ESC key is still pressed.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
I'm not at all sure whether this is the correct forum for this question but here goes:
I'm trying to investigate an existing signal processing algorithm that has been written in C. I do have the source code so I'm NOT reverse engineering! Instead I want to assess its "performance" using some "time series" data that I have generated in MATLAB.
The problem is that MATLABs data storage format (MAT files) does not allow you to extract records (i.e. data at specific timeshots in the time series)- instead you have to store an MxArray variable representing the whole time span of the data. This is inefficient in terms of memory space required - what if I wanted a huge timespan of data points?!
So I've looked at the possible use of CDF - Common Data Format - created by NASA for storing multidimensional data together with descriptive metadata. It is freely available on the Web (nssdc.gsfc.nasa.gov/cdf/html/FAQ.html) and comes with a C API. NOW ... MATLAB has functions "cdfread", and "cdfwrite" so ought to be able to create CDF files and read them back BUT ... the cdfwrite does not work when you try to append a new record to the CDF file. I've sent example files to MathWorks an they concede that the cdfwrite function doesn't work to spec!
Has anyone out there had a similar need to store time series data from MATLAB to a file which can later be accessed from C, one timeshot at a time? How did you do it and was it an efficient process? I'd be very grateful to anyone who can help me.
|
|
|
|
|
hello
can i store in valarray a vectors?
|
|
|
|
|
Is it OK to mix code that uses CString from MFC and CString from ATL?
I've got a library that doesn't use MFC, but does use CString from ATL.
I've got an EXE that uses CString from MFC.
I am running into unusual linker problems, and am not sure the cause. But one suspicion is that it might have something to do with the ?different? CString's....
Any thoughts on this?
Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
I recommend BSTR whenever you work with ATL. ATL offers a helpful BSTR wrapper class, CComBSTR.
Kuphryn
|
|
|
|
|
Uhhh -- Why? Does BSTR do UNICODE? What does BSTR offer that CString does not? And, back to the actual question, do the MFC and ATL CStrings work together?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
Yes, BSTR supports Unicode. BSTR is COM compliant and thus is a VARIANT compliant data type. Other programming languages such as VB, Java, etc. understand BSTR.
Kuphryn
|
|
|
|
|
i want to get the database list in a Sql Server, how can i do?
thanks!
|
|
|
|
|
Anyone knows the equation(s) that can be used to transform a flat surface into a wave? (such as ocean waves, waterfalls, etc...) taking into account frequency, amplitude, perspective, turbulence, etc... Thanks for any help.
Henry P.
http://www.allersoft.com
|
|
|
|
|
Hi everyone,
I will just wanna ask, if who have a brilliant idea about this interesting question.
Sledge
|
|
|
|
|
Me thinks this is impossible because a word is just set of pixels. You could capture the pixels and do OCR and turn them back into a word. Of course if this is your app, then you are drawing the text and you know what a word is. I'm just talking about apps which aren't yours, which is what you asked.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Yes, you are right. The application that I will be capturing the text is not within my application. If you have any basic or advance OCR algorithms, can you give me?
Regards,
Sledge1978001
|
|
|
|
|
I'm afraid I've never done any work with OCR.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
how to use C++ to open the dicom data....
if u know the ans, pls share with me....
|
|
|
|
|
1.What 's wrong with my MouseProc hook?
LRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam)
{
LPMOUSEHOOKSTRUCT pMouseHook=(MOUSEHOOKSTRUCT FAR *)lParam;
if (nCode>=0)
{
HWND glhTargetWnd=pMouseHook->hwnd;
HWND ParentWnd=glhTargetWnd;
while (ParentWnd !=NULL)
{
glhTargetWnd=ParentWnd;
ParentWnd=GetParent(glhTargetWnd);
}
if(glhTargetWnd!=glhPrevTarWnd)
{
char szClassName[40];
GetClassName(glhTargetWnd,szClassName,20);
if (stricmp(szClassName,"XLMAIN")==0)//Excel Main Window
{
switch(wParam)
{
case WM_RBUTTONUP:
case WM_RBUTTONDOWN:
//....
//Here I want stop the message to XLMAIN Window
//
strcat(szClassName,"You press right mouse button");
//Infact my program never go here when I click each mouse button,Why?
TRACE0(szClassName);
break;
case WM_LBUTTONUP:
case WM_LBUTTONDOWN:
strcat(szClassName,"You press left mouse butto");
//Infact my program never go here when I click each mouse button,Why
TRACE0(szClassName);
default:
AfxMessageBox("Mouse is in Excel Window");//program goes here
}
glhPrevTarWnd=glhTargetWnd;
}
SendMessage(glhDisplayWnd,WM_SETTEXT,0,(LPARAM)(LPCTSTR)szClassName);
//glhDisplayWnd-CEdit window HWND,This is just for test.
}
}
return CallNextHookEx(glhHook,nCode,wParam,lParam);
}
2.how to cancel special message to a special window
|
|
|
|
|
Well maybe if you show us your code we could help. That said I don't like the sound of what you are doing.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
It isn't obvious what glhPrevTarWnd does or where it is being set, so maybe you getting anything past that test. Also check what messages are getting past the stricmp(szClassName,"XLMAIN")==0 test. Finally try testing for WM_RBUTTONDOWN and WM_CONTEXTMENU. It is possible the app is capturing WM_BUTTONDOWN and you never get to see the WM_RBUTTONUP. You should also check all Win API functions succeed. eg. GetClassName().
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
i'm not getting any messages to my dialog proc created with DialogBox(...), i am setting my HINSTNANCE, parent window, and dialog proc. they are receiving WM_INITDIALOG, that is the only message i get as far as i know. the dialog is a child window, and that window is a popup window. any idea would could be wrong with it? the code is rather large and distributed (each dialog is created in a virtual function of a property class), but if you want i can post it
|
|
|
|
|
Have you verified with Spy++ the messages are going to the dialog?
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
they are being sent, but to my top level window (because the dialog is a child) which is not what i want. how i can make it send the messages to the dialog instead?
|
|
|
|
|
I have a dialog box with several CEdit controls inside of it that are created dynamically during runtime, that dialog box sometimes is hidden and sometimes is not. When the dialog box is hidden for the first time, the 'strings' in the CEdit controls are saved into a data structure that i've defined, when the dialog is shown again i read the stores values previously and write them into the CEdit controls but this time the text inside of it is not the expected but it is the previous that was stored in there. I think there are some problems with updates. Since i'm new to MFC probably i need to do something to keep the CEdit controls update the text correctly. Any tip ?
Thanks
|
|
|
|
|
There are several solutions. One solution is SetWindowText(). Another solution is to add a CString member variable that corresponds to the editbox. Update the variable as a string and call UpdateData(false) to update the actual edit control.
Kuphryn
|
|
|
|
|
The unusual thing that you are doing, is not actually initializing the dialog -- that is creating it each time. So the 'normal' stuff that MFC does to transfer data from CString's <--> CEdit's is not getting done.
I don't know the answer, but it has something to do with the DoDataExchange stuff that get's done when WM_INITDIALOG is handled. A possible hack would be to send your dialog the WM_INITDIALOG message??? (HACK ALERT!)
Just a thought...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|