|
VSS = Visual Source Safe? Ewwww. Horrid. We switched to CVS because VSS used to be crap for multi-user projects (code shared by a team for example).
It's not like the movies. They fed us on little white lies.
|
|
|
|
|
I prefer not to automatically add a new class or file to source-safe. Only code that compiles should be added. Otherwise you end up breaking a build when somebody gets the latest code.
I'm suprised there isn't an option though.
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
|
|
See Lounge.
Sleepy Jack the fire drill. Round and round and round and round.
|
|
|
|
|
I'm trying to use mmioOpen so a new file will be created (or truncated)
m_hFile = ::mmioOpen((LPSTR)(LPCTSTR)m_FileName,&mmioInfo, MMIO_CREATE|MMIO_WRITE|MMIO_EXCLUSIVE | MMIO_ALLOCBUF);
Sometimes mmioOpen fails. When I look in mmioInfo.wErrorRet, it's set to 257 (File not found). I can't understand why I get this error. Want to create the file, of course it doesn't exist.
But like I said sometimes this works, I haven't been able to figure out how to reproduce this.
Has anybody else run into this problem before?
|
|
|
|
|
Here's a little more info on the problem
I can create the file, record, and play from my app, but once I play the file from the explorer, then mmioOpen fails. I tried selecting a different file, but it still fails. I even tried deleting it, but it still fails. But once I hit F5, then my app will work again.
Any ideas why?
|
|
|
|
|
Ok here is a question I can't seem to find an answer to.
How can I use a command button to open up another Dialog window.
Currently want to use a Comand Button in Window A to close Window A and Open Window B...........
Anyone got any ideas? I am totally stuck
P.s. I wouldn't mind even shifting the focus (as long as the old window isn't seen) i.e. have all the windows ready but all hidden, except the one thats active.
Cheers.
P.S. If you're not living life on the edge you're taking up too much room.
From Crazy Skydiver.
|
|
|
|
|
let the window that owns dialog A handle all of it. set a flag in dlg A when the button is pushed; let the owner window check that flag; if the flag is set, have it launch dialog B.
that's how i'd do it.
-c
WWJD? JWRTFM. found on /.
|
|
|
|
|
Any chance of posting some code to do that ?
Pretty please with sugar on top (this is good magic sugar and it's not bad for your teeth)
Cheers.
P.S. If you're not living life on the edge you're taking up too much room.
From Crazy Skydiver.
|
|
|
|
|
void CMainWindow::Whatever()
{
CDialogA a;
a.DoModal();
if (a.m_flag==1)
{
CDialogB b;
b.DoModal();
}
}
....
void CDialogA::OnMagicButton()
{
m_flag = 1;
OnOK();
}
WWJD? JWRTFM. found on /.
|
|
|
|
|
I am wondering if I have gone about this project the wrong way round.
I firstly designed the displays. One intro window with some buttons, each button would take you to a different window depending on what you pressed and those windows would all have different functions and applications.
Only problem is that I can't seem to link the command button on the intro screen to open the next level.
First menu is IDD_SKYDIVE. It has several command buttons. One of which is labled Carear.
The code for it is:-
void CSkydiveDlg::OnCarear()
{
//so when the button is clicked it does whats in here..... am I right so far, and if I am right what code goes in here ?
}
I want it to open another Dialog called IDD_CAREARMODE and shut down it's own window. I think this is where I am getting mixed up.... yet I'm not exactly sure how.
Cheers.
P.S. If you're not living life on the edge you're taking up too much room.
From Crazy Skydiver.
|
|
|
|
|
Well, why don't you create a new object of the class of the dialog box that you want to open?
e.g.
put this code in the command handler of the button:
CMyDialog mydlg;
mydlg.DoModal();
Why do your need a flag after all?!
Cheers
|
|
|
|
|
because he said he wants the first dialog to go away before the second one comes up.
WWJD? JWRTFM. found on /.
|
|
|
|
|
No, I mean I have my windows designed and laid out and I just want to code the button so it closes down the window it was clicked in and opens up another window specific to the button that was clicked..... Does that make sense ?
** I am really new to Visual C++..... I am supposed to make a basic game in it. **
(Still not got the thing to work though)
Cheers.
P.S. If you're not living life on the edge you're taking up too much room.
From Crazy Skydiver.
|
|
|
|
|
I haven't done this in MFC yet but I think it would be something like this.
In the button handler for the first dialog, DlgA....
void DlgA::OnButton1Click()
{
CMyDialog MyDialog();
MyDialog.Create(..parameters if needed);
MyDialog.ShowWindow(true);
}
|
|
|
|
|
I bought this book "Windows 98 Programming" by Schildt [osborne/mc graw hill] on sale for $5, and this guy says you must learn Win32 API before learning MFC, is this true ?
I thought MFC was an abstraction away from WinAPI calls.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
you will still need to learn some of the Win32 API. MFC doesn't hide all of the details. plus it certainly helps to understand what the various MFC classes are actually doing (especially when it comes to GDI objects).
-c
WWJD? JWRTFM. found on /.
|
|
|
|
|
Well, you needn't, but it makes life alot easier if you have at least basic knoledge in Win32 API. MFC is not a very deep abstraction of the API, e.g. many funcions like adding an entry into a combobox AddString() do nothing else but directly calling Win32 API (SendMessage e.g.)
I have my own philosophy: I use MFC to create dialogs or MDI/SDI apps, but still use very much API calls directly.
Furthermore not every single API call is encapsulated by an MFC class, that's why you often must use API to get things to work.
reagards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks guys, you think Jeff Prosise "Programming MFC" is a good way to go?
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Yes, yes, YES! One of the best books - possibly THE best one. You will not be disappointed.
Cheap sex and sad films. Help me get where I belong.
|
|
|
|
|
It'll be a MASSIVE advantage as MFC is only a very thin wrapper for the Win32 API.
Stop sending letters. Letters always get burned.
|
|
|
|
|
Soliant wrote:
you must learn Win32 API before learning MFC, is this true ?
"Yes", if you want to fully understand MFC and program in it.
"No", if you're coming from an X/Motif/Mac/Qt/Tcl background and just want to create a one-off Windows app.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Not at all - I think it's better to learn MFC then learn what the Win32 API is doing for you, because you can learn incrementally instead of all at once.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
hi
how way to follow learn to mfc."programing windows jeff prosise" this book is very good.but other good books are which?
|
|
|
|