|
Are you using Visual C++? It should automatically pause after a terminal program is done executing.
If not, give getchar() a try.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Alternatively, instead of double clicking the executeable, run it from the command line (ie cmd or dosprmpt).
|
|
|
|
|
Hello, the codegurus around the world.
It seems that you're working a DOS program or the console application.
You open the dos window directed to the location of your EXE files.
C:\>whatever, and type dir/w. You will find your EXE file.
So,
C:\whatever\Your.exe
You can take a look at your result.
Maybe, there may be some way to keep opening the console application from
executing in Visual Studio.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
I am makeing a Direct Sound music player. How would I use MP3s with it.
|
|
|
|
|
That's easy - there is a demo app here to show how to do skinnable apps, and it uses Direct Sound to play mp3's, all the code you need is there. Now if you come across a way to play more than one mp3, I'd love to hear about it. I want to play multiple mp3's at once, but the code in question uses globals and I couldn't for the life of me get it into a class structure so I could create multiple instance....
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
You don't remember the name of it do you. I can find a WinAmp plugin that uses skinning but not much else?
-Matt Newman
|
|
|
|
|
Here it is...
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Thanks. It will give me something to to while I download DX 8 SDK on a dialup modem.
-Matt Newman
|
|
|
|
|
I want to add a menu item (About...) to the SystemMenu of a console window. I have the menu items added but cannot figure out how to process the message for the menu items I've added.
I have a WinMain that is invisible that does the AllocConsole() call running a msgloop. Checked there for a WM_SYSCOMMAND and got nothing. Have a ConsoleControlHandler installed for the console and that only processes Ctrl-C/Ctrl-Break/Logoff... Don't see anything that helps me there.
I'm using Girish Bharadwaj console class to get things rolling and extending it to get the hWnd for the console along with other extensions ideas I've found in forums discussing Win32 consoles.
Anybody got any ideas on this? Any help appreciated.
--
Michael McGarrah
mcgarrah@ncsu.edu
|
|
|
|
|
Menu commands are sent directly to the window - you can't catch them in your message loop. It seems that you'll have to subclass the console window.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi!
In my main frame, I have a list control. There are severals possibilities to add a item in this list control. One of them is from another dialog, this dialog get the informations of any file and send them to the list control.
void CSendFile::m_SendFilePush(void) //Dialog to send a file
{
CListCtrl *CCtrList;
.............
//Informations of the file
v_CFileInfo.itv_sPathName = v_FilePathName;
v_CFileInfo.itv_sFileName = v_FileName;
v_CFileInfo.itv_sExtName = v_ExtFile;
//The code to add item in my lsit control
CCompadApp *pApp = (CCompadApp *)AfxGetApp();
//CCompadDlg has the list control
CCompadDlg *pDlg = (CCompadDlg *)pApp->m_pMainWnd;
CCtrList = (CListCtrl *)GetDlgItem(IDC_LIST_CONTROL);
LVITEM v_ListCtrlItem;
CString v_StringItem;
CString v_FileType;
// Insert the item
v_ListCtrlItem.mask = LVIF_TEXT;
v_StringItem.Format(v_FileName, 0);
v_ListCtrlItem.iItem = 0;
v_ListCtrlItem.iSubItem = 0;
v_ListCtrlItem.pszText = (LPTSTR)(LPCTSTR)(v_StringItem);
v_ListCtrlItem.iImage = NULL;
CCtrList->InsertItem(&v_ListCtrlItem);
EndDialog(v_SendFileDlgID);
}
This compile but there aren't any added item in the list control from CSendFile Dialog.
What is the problem?
Thanks
PS. Excuse me for this english
Endymion
|
|
|
|
|
Here is the problem....
GetDlgItem(IDC_LIST_CONTROL);
You need to get a reference of The listctrl but in ther other Dialog.
You need to do this.
CCTrlList = (*CListCtrl)pDlg.GetDlgItem(IDC_LIST_CONTROL); //Where pDlg is the class of the other Dialog.
The compiler don't return errors because the IDC_LIST_CONTROL constant exist in the resurce.h file.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
I'm getting a runtime error that reads:
"The value of ESP was not properly saved across a function call. This is usually the result of calling a function declared with one calling convention with a function pointed declared with a different calling convention."
What I'm trying to do is use a CToolbar-derived class to respond to events and access the active document via the toolbar's parent, CMainFrame.
//In the Toolbar-derived class
CMainFrame *mf = (CMainFrame*) GetParent();
CTestDoc *pDoc = (CTestDoc*)(mf->GetActiveDocument());
The error seems to say I can't use a pointer to the MainFrame to call the GetActiveDocument function? Any suggestions would be appreciated
Jake
|
|
|
|
|
i always find that a thorough Rebuild-All will fix this. i think it's a stack corruption issue.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
CMainFrame *mf = (CMainFrame*) GetParent();
You're getting in trouble with the cast. The toolbar's parent window isn't the main frame, it's the CDockBar that the toolbar lives in. Call AfxGetMainWnd() instead to get a pointer to the main frame.
--Mike--
http://home.inreach.com/mdunn/
Push the button, Frank.
|
|
|
|
|
--Mike-- http://home.inreach.com/mdunn/ Push the button, Frank.
Exactly what button am I supposed to push???
|
|
|
|
|
This is question which is rather specific to WinCE...
I can't figure out how to use the CCeCommandBar class to add a button to the command bar represented by the class. This class has methods for inserting menus, combo boxes, and separators, but, for some reason, no InsertButton method.
I have tried using the nonMFC function CommandBar_AddButton, taking as the first parameter the HWND which is the m_hWnd member of the CCeCommandBar. For some reason I am also having trouble getting this to work.
Your help much appreciated, I'm afraid I'm rather a novice at all this.
Matthew Fleming
|
|
|
|
|
I have a function that takes as an argument the address of a function
to be used as a CALLBACK
HRESULT CALLBACK ACallBackFunction(PVOID var);
if i try to make this functiona a method of a class it will not work
and i get the following compile error.
cannot convert from 'long (void *)' to 'long (__stdcall *const )(void *)'
so how can I make a class method be used as a CALLBACK (WINAPI,FAR PASCAL)
|
|
|
|
|
|
Or see Lohman's brand new article on this site.
|
|
|
|
|
How can I know how my propertySheet terminated ? with OK or with CANCLE ?
I need to save the data of pages if it terminated with OK.
|
|
|
|
|
|
Thank
|
|
|
|
|
Hi,
Although I asked this question before, but I can't get it,
I like to know how can I get a pointer to the first document in MDI.
the pointer has to have access to the document's data.
Thanks
Ehsan
Ehsan Behboudi
|
|
|
|
|
What do you mean by "first document"? The one that was created first or the currently active one?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|