|
OK, you can use atoi function (see Help) and convert one per one elements in array (with a loop help).
|
|
|
|
|
Ok, am making a simple thing, a bitmap on a dialog.
Simple.
But i want to move the bitmap to the right when i press a key on my keyboard,
i know how to move the bitmap with a control button, but i dont know to tell my program
that i pressed a button. Please give me an example.
Thank you.
|
|
|
|
|
OnChar, OnKeyDown or OnKeyUp in your class wizard will all tell you if a key was pressed.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Dear all,
Is there anyone familiar with the Microsoft SAPI (text-to-speech)?
I have tried to write a program by using SAPI 4.0, however, I got these
errors. Can anyone help me how to solve it?
Waiting for you sincere reply. Thx a lot.
--------------------Configuration: tts - Win32 Debug--------------------
Linking...
ttsDlg.obj : error LNK2001: unresolved external symbol _CLSID_TTSEnumerator
ttsDlg.obj : error LNK2001: unresolved external symbol _IID_ITTSEnumA
ttsDlg.obj : error LNK2001: unresolved external symbol
_IID_ITTSBufNotifySink
Debug/tts.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
tts.exe - 4 error(s), 0 warning(s)
|
|
|
|
|
The simplest way to solve such type of problems (linking problems) is to search these strings (like ITTSBufNotifySink) in all *.lib files. Than you must link (via Alt+F7 or #pragma comment) this lib-file to your project.
Btw, many MSDN articles describes that libs are needed for the code they describes.
With the best regards, Vitaly.
|
|
|
|
|
As you know, the CRebar in MS Internet Explorer has dividers on all sides (Top, Bottom and Sides). How can I get this done with CRebar?
CString Dutch = "Double Dutch";
|
|
|
|
|
Hello.
When I create the MDI application with other types views the MFC propose select (in the 'list_dialog') the view.
Question is: How I can break this way and call myself list_dialog or set by default some view (where is this place) (how i can find some type of view there) ?
Thx. evb.
Sergey (dr)
|
|
|
|
|
I presume you're asking if you have more than one possible document type when you click 'new' it asks what sort you want to create ? If so, in your CWinApp derived class, override OnFileNew to do this
// Force use of first template as it does not matter
POSITION POS = GetFirstDocTemplatePosition();
CDocTemplate* pTemp = GetNextDocTemplate(POS);
CYOURCLASSDoc* pDoc = (CYOURCLASSDoc*) pTemp->OpenDocumentFile(NULL);
This forces it to use the first template, you'll need to change that by the no. of times you call GetNextDocTemplate if needed.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi,
Please help me. How do I create an EXE file when my program is being run.
Thank you.
|
|
|
|
|
i think you haven't quite grasped the subtleties of programming yet and as such would recommend a bit more reading and practice
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hey,
Anybody familiar with ad-blocking software such as AtGuard or Norton Internet Security? What I want to know is how they trap incoming HTML pages without being set up as a proxy. (i.e. You don't have to point your browser to go through them, they just automagically work as if they intercept the incoming HTML document and modify it before it gets to your browser)
Does anybody have any idea / links as to how this HTML trapping without proxy stuff is done.
Any help would be much appreciated...
|
|
|
|
|
From the presence of several VxDs in NIS, I'd guess it hooks the networking system under the session layer and gets at the data being transmitted that way.
--Mike--
http://home.inreach.com/mdunn/
This must be Thursday. I never could get the hang of Thursdays...
|
|
|
|
|
for IE4+ you can use BHO search for it in MSDN.
|
|
|
|
|
Is there a way to get transparent backgrounds for a CStatic ??
If so - how ??
Thx
TJ
|
|
|
|
|
If you are using the dialog wizard just select the transparent extended style. (Right click on the static bitmap, select Properties and click the Extended Styles tab. Tick the Transparent option.) This generates something like
LTEXT "A Message",IDC_STATIC,167,73,121,40,0,WS_EX_TRANSPARENT
in your resource file. If you are doing your own control, you can use the WS_EX_TRANSPARENT style with any window I believe. There is also a WM_EX_TRANSPARENT message you can catch. I don't know what this does but good luck.
|
|
|
|
|
Awhile ago, when I was annoyed enough by a message box that I always answered no, I tried to implment a hook that would add a "don't ask me this again" checkbox to all message boxes. After much struggling, I got the check to be inserted and work properly. Then I hit a roadblock... How would I store the information on which message boxes were to be auto-answered? Simple sequential search didn't seem right, because message boxes happen pretty often... Anyone have any ideas on how to store/recognize that kind of data? (mainly just app exe name, title, and text.)
I figure I should defer to people who know better on this one.
-wParam
|
|
|
|
|
Wow -- that is a great idea! Now when Wordpad
asks if I would like to save every .txt file in text
format -- losing any special formatting -- I wouldn't
have to answer the message.
Perhaps you could create a key in the registry for each
exe with sub-values for the title or text indicating if
the message box should be answered (and how) or ignored.
The option to ignore msg boxes from specific exes would
be useful too. To implement this you might have to add
an 'advanced options' button beside the check box to
allow the user to set these options.
Daniel
|
|
|
|
|
How are you hooking the MessageBox? do you simply replace the function pointer! if so you know what parameters are on the stack - as your hook function probably has the same prototype - we'll start with the basics a single exe multiple MessageBox calls note this is all off the top of my head -
Within the MessageBox replacement function get the return address off the stack this will be unique and the same everytime you call the function from a specifi place in the code (remeber were dealing in basics here)now if the user selects 'Don't ask me again' save the executable name + path and the address of the call (registry/flat file). Now if you restart the app get all the entries from the registry/file bingo you'll know what MessageBoxes not to show.
Things as far as see can get a little more complicated when dealing with DLL's that show MessageBoxes (something I'm totally against) the reason is rebasing! lets assume that the developer of an app ensured that none of his DLL's clashed when loading and hence no rebasing took place - the address will always be unique as in the simple case above. But if rebasing did occur then your addresses may change with each application run. (I'm thinking of running within a different proces such as IE and it loading ActiveX controls for instance)
So he's what I suppose you could do given the return address determine what module it belongs too (this is the tricky bit) get the modules preferred base address (as specified when compiling)and then do some math to get the relative position for this call - save the new relocation base address in the registry/file. Now if the user changes the base address or when an application changes the relocation at startup to something different with a bit more math you can determine if this is the same position as last time.
The last para needs a little more thought (hopefully by somebody else) and as I say it's off the top of my head but in theory I think it may just do the trick.
Regards.
Robert Rolls.
|
|
|
|
|
Although they don't replace something like SoftICE, the diagnostic tools in VC are sometimes nice. I have just found a short-indexed loop with a "delete *obj" which caused a leak in my app. The tool I used was _CrtDumpMemoryLeaks(). The documentation has this to say:
"_CrtDumpMemoryLeaks is frequently called at the end of program execution to verify that all memory allocated by the application has been freed. The function can be called automatically at program termination by turning on the _CRTDBG_LEAK_CHECK_DF bit field of the _crtDbgFlag flag using the _CrtSetDbgFlag function."
This is typical MSDN doublespeak. It's not exactly wrong, just highly misleading. The two methods give different results. If you call _CrtDumpMemoryLeaks() at the end of your app InitInstance for example, it will detect the main window context and your dynalinks (and I suppose any other external linkage blocks as well) and report them as leaks. Even if you overload your WinApp destructor and put the dump as the very last thing you do in the app, the dynalinks are still detected. You may learn to live with this but I wan't only real leaks reported.
If you include the following code as suggested above,
int tmpDbgFlag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
_CrtSetDbgFlag( tmpDbgFlag );
you will get the correct result and all reported leaks will be your own doing only.
I don't pretend to be a Windows guru but this might help some poor sod trying to plug the leaks on the moth-bitten MFC object arrays or the poxy MS STL.
|
|
|
|
|
Nice tip, I just about to try it.
|
|
|
|
|
Hi, am looking for some websites, with tutorials and help
for game programming, any good around?
THX
|
|
|
|
|
What about going to www.google.com and putting a string such as "Game programming" and click search button!
|
|
|
|
|
I have a CEdit control in my dialog and I need to enable it for editing
via. my program... and not the user selecting it. Can this be done.
and if so... how can I make sure that the text is selected in the CEdit control?
Kind Regards
Peter Marino ( www.ioi.dk )
|
|
|
|
|
What is the windows message no. 0x101E is for ?
(I found it is sent to "syslistview32" list view of open file common dialog)
and...
How can we know details of some mysterious messages like this ?
|
|
|
|
|