|
Alvaro Mendez wrote:
I don't know if you noticed, but Age of Empires II uses MP3 files for all their sound files.
No, I didn't notice that, although I have AOE II.
Alvaro Mendez wrote:
Unfortunately I have to first find a way to stop playing AOE.
I know what you mean - I played it for a week and forced myself to stop so I could get some work done....
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I used app wizard to build a dialog box to display the command line. The app wizard built two classes, test.cpp and testdlg.cpp. I added Carlos Antollini's command line class and using debug I can see the command line value in the test.cpp class(InitInstance) but can not figure how to get the value into the testdlg.cpp class. I have built an edit window and can use UpdateData() to put a value in to it.
Any help would be greatly appreciated.
|
|
|
|
|
It is not completely clear to me what you want to do. However, if all you want to do is display the command line arguments in a dialog, I would use a listbox. Add a listbox to the dialog using the resource editor. Using the class wizard, add a member variable of type CListBox to the dialog class and map it to the listbox control that was added. Then in the OnInitDialog function add this :
CYourDialog::OnInitDialog()
{
for( int i = 0; i (less than) __argc; i++ )
m_ListBox.AddString( __argv[i] );
}
That's it. This will fill the listbox with one argument per line.
|
|
|
|
|
I use SetFieldValue to add a record to database,
but each time only the first character was added to database.
|
|
|
|
|
PRB: MFC DAO Functions Accepting COleVariant Strings May Fail
Article ID: Q140599
mentions a similar problem...
|
|
|
|
|
You'll need to post your code. I've not seen this behaviour from SetFieldValue.
Michael
|
|
|
|
|
I need to open a CFormView window in a certain size depending on the system font definition.
How can I know if large fonts or small fonts are defined?
Thanks for the answer,
Aviv.
avivhal
|
|
|
|
|
GetDeviceCaps(hDC,LOGPIXELSX) - on large fonts it usually returns 120 on small fonts it usually returns 96 - at least on my system.
|
|
|
|
|
Danke.
Du hast mir sehr geholfen.
Aviv.
avivhal
|
|
|
|
|
Help, I've got a static picture control on a formview and I keep sizing the picture to the size I want but it comes up in the static control a little bit smaller.
Could this have to do with the pixels/inch (just guessing)?
Any help would be greatly appreciated.
Thanks in advance.
|
|
|
|
|
Why don't you just blt the picture yourself ? The 'bit smaller' is probably the frame of the control ( about 8 pixels ? ).
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hi all,
I wrote this code but won't work !
wnd_Toolbar.CheckRadioButton(IDC_BUTTON1, IDC_BUTTON8, IDC_BUTTON5);
How can i solve it ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Correct me if I'm wrong but there's no such function in CToolbar, according to MSDN.
Is this a doc/view app? If so, then you should use the UI handlers to enable/disable/check/uncheck menu items and toolbar buttons. Search for ON_UPDATE_COMMAND_UI in the MSDN for more info.
Regards,
Alvaro
|
|
|
|
|
Hi,
Thanks for responsing !
Now, my problem is solved ...
But thanks for your hints
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
How to display the "Synchronize" dialog???
|
|
|
|
|
Which dialog ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
The "Synchronize" Dialog is at menu of IE|Tools. The dialog synchronize the offline page with the web's.
Thanx
|
|
|
|
|
Looks owner drawn to me.
It sure isn't a common dialog, I doubt you'll get hold of it, although you might through an IE COM object.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Have you found an answer; I'm interested also.
klefton@dwfritz.com
|
|
|
|
|
I used app wizard to build a dialog box to display the command line. The app wizard built two classes, test.cpp and testdlg.cpp. I added Carlos Antollini's command line class and using debug I can see the command line value in the test.cpp class(InitInstance) but can not figure how to get the value into the testdlg.cpp class. I have built an edit window and can use UpdateData() to put a value in to it.
Any help would be greatly appreciated.
|
|
|
|
|
From the dialog you can call the application class to get the string.
CString m_EditStr = AfxGetApp()->m_lpCmdLine;
I would however add a function to the application class to return this string.
Happy programming!!
|
|
|
|
|
Hello all,
I am writing an MFC app for a college project.
I have some code that opens & saves files (not using serialization).
When I open a file (.gbc) it is read in and parsed, objects are created (Notes, Chords, Bars, Tablines) based on these values, but I dont know how to create a new view or doc to display these objects.
Can someone help me please ?
My open code is in MainFrame.cpp and works wonderfully, except I can open 5 files but only have the one original document open ?
Rob
|
|
|
|
|
You should place your load/save code into the Document class, regardless of if you use serialisation or your own code. If you put it in the mainframe, you're going to be fighting doc/view all the way. If you set things up so your view displays the info in your document class, which loads and saves it, using your existing code, and let OnFileNew/OnFileOpen/OnFileSave do their default thing of creating instances of views/documents, you'll find life a lot easier.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Thanks Christian,
I'll try moving my code into the doc.
One thing I am baffled on is how the default view/doc is created ?
When I open one of my files, i can parse the data, but i can make a view to display the objects I have just made ?
I found some code to do this, but keep getting errors. If you were going to open a file, parsing it and then make a new view, how would you do it ?
Rob
|
|
|
|
|
Opening a document also creates a view to go with it.
To open a document from the mainframe class ( which I do to impliment a file browser ), I do this
AfxGetApp()->OpenDocumentFile(Dlg.m_Path);
where m_Path is a member variable of the browser dialog, containing the path to load
In my document class I override OnFileOpen and call it in the CWinApp derived class, which looks like this:
CDocument* CMyApp::OpenDocumentFile(LPCTSTR lpszFileName)
{
CFileStatus fs;
if (!CFile::GetStatus(lpszFileName,fs))
{
CString s;
s.Format("Error - file %s not found",lpszFileName);
AfxMessageBox(s,MB_ICONERROR);
return NULL;
}
try
{
CDocument* pReturn = CWinApp::OpenDocumentFile(lpszFileName);
CMyDoc* pDoc = (CMyDoc*)pReturn;
pDoc->m_Filename = lpszFileName;
return pReturn;
}
catch(...)
{
return NULL;
}
}
I seem to recall this was because it's a MDI app, so it called the method in CWinApp if I had nothing open, otherwise it called it in the document class.
This calls OnOpenDocument in my document class, where I simply load my data into the class and return TRUE. This gives me a document and the view associated with it.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|