|
I"m not sure I understand what you mewan by "visual" aspects...but
I use visual C++ ide for writting code in PHP/JScript/HTML/ASP and anything else with c syntax style code. Just cuz I know it really well and I use it all the time...
I've used visual ide for writting code in plain jane c and c++ and compiled under different compilers no problem...Bloodshed C++ editor is no friend of mine, but I have the learning edition of VC++ so compiled exe's always have a warning of sorts compiled into the final output, so I often use third party compilers to avoid such problems...
If you mean can you write games in VC++ without using the windows visual aspects like windows and such...sure just don't include the MFC library and use windows native SDK function calls...
HTH
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Depends what you need.
Basically depends of the platform in which will run the game....
For example I wrote game for XBOX and used VC++, with directX SDK.... (I had no problems). Now I am rewriten that game for PC, and also We are using VC++...
Best Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You can produce games with VC++. You just have to forget about MFC as a framework. If you use the application wizard to produce a Win32 application for you. You'll then have a starting point for writing a game. Have a look at the DirectX tutorials on the platform SDK.
Lots of "real" game developers use VC++.
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
I have a dialog-based application with a few buttons on it, by default, if I press "enter" or "space" key, the button which has focus on it gets triggered, if I press "ESC", the dialog closes. But I don't want those, I need my application only respond to mouse clicks, I want it completely ignore any keyboard event. How can it be done? Thank you.
|
|
|
|
|
Read the FAQ.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
If I override OnCancel() then I cannot close the dialog by clicking the [x] on system menu. Is there a way so that it ignores all keyboard events, but it does respond to any appropriate mouse click. Thanks in advance.
|
|
|
|
|
I very much doubt that is what the FAQ says. You should override OnKeyDown OR if you override OnCancel you should use GetAsyncKeyState to continue only of escape is not being pressed at the time.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
I have searched the FAQ and all it says is to override OnOK() and OnCancel(), could you please point me to the correct URL? And I tried to handle the dialog's WM_KEYDOWN and WM_CHAR events, didn't work, dialog went ahead and closed without those events even being triggered.
|
|
|
|
|
I've always done it in OnCancel and OnOK as I described, but I thought OnKeyDown would work. If not, the you'll need to override PreTranslateMessage and supress the keyboard messages altogether.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Yeah overriding PrepTranslateMessage() is exactly the way that solves my problem. Thanks alot for your enlightenment.
|
|
|
|
|
you can overload the dialog member function OnOk() and OnCancel().then i think you will deal with your problem.
Mr.Whelk
Zhuhai City ,Guangdong ,China
|
|
|
|
|
Hello,
I am getting two linker warnings when I compile my dialog based program written in VStudio 6.0. I am using DAO connectivity in my program.
The warnings that I am getting are --
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF
In my project settings under Link Tab, I have following information --
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ddao35.lib ddao35D.lib ddao35U.lib ddao35UD.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/TDMS2000.pdb" /machine:I386 /out:"Release/TDMS2000.exe"
Please advise how and if I need to change my project settings. Thanks !
Anjum.
|
|
|
|
|
aren't ddao35.lib and ddao35D.lib the release and debug versions of the same lib? you should only link to one of them, depending on the debug/release configuration of your project.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
I created a project using a CEditView .. If I press any key ( writing a text in CEditView) when I finish the application appear a Box asking if I want to save this text ( I think that this is because Serialization is actived ) .. Do you know how can I desactive this function ?
Tks a lot
|
|
|
|
|
Hello,
I am getting the strangest error. I have a VC++ Dialog-based
application using VC++ 6.0. At one point in my
application, if I press "Enter" the application just
quits. If I press anything else of click the button to go
on a next screen etc. .. it works fine. IF I press the "X"
on top corner to quit, it asks me if I want to quit and
quits normally. But if I press Enter on that screen it
just suddenly terminates, completely blimps out!!
I doesn't happen if I press space. If I press Esc then a messagebox comes and and asks me if I want to quit the application. ...
I do have OnOk() function over ridden. and when I press Enter, the application quits before it even enters the over ridden OnOk() function. I have changed the declaration of OnOk in my .h file in many different ways. I do not have an event handler explicitly declared for OnOk function.
It doesn't happen if the focus is on one of the buttons. Then that buttons click event gets executed. It doesn't happen if I set one of the buttons to be Default Ok .. then by pressing Enter that button gets executed.
But if I have focus on any text or combo box .. and press Enter .. it just terminates the application with no warning or message.
Please help. I will really appreciate any insight into
this. Thanks
Sincerely,
anjum Gupta.
|
|
|
|
|
You should override OnOK() not OnOk() (capitalization matters). This is covered in the VC forum FAQ.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hey Mike,
I feel a little ebarassed .. but more glad that you could really help me with this problem. I looked into it .. but completely missed the capitalization of "K" !!!
Thanks once again!
Anjum.
|
|
|
|
|
Hi,
With a locally defined buffer, the following works fine: but I want to use doc variable to fill my list with, and it crashes:
if(NULL != m_list1.GetSafeHwnd())
{
CTrain1Doc* pDoc = (CTrain1Doc*) GetDocument();
char* pc;
CString string;
int nListIndex = 0;
for (pc = pDoc->m_buffer ; *pc ; pc = strchr(pc,0) + 1) //////crashes here in debug...
{
char* pc1 = strchr(pc,','); // search for a comma, returns a null pointer if not found
if (pc1) *pc1 = 0; // if we find a comma we replace it with a null character, if we didn't find a comma then the word is already null-terminated
string = pc;
int nItem = m_list1.InsertItem(nListIndex,string);
nListIndex ++;
}
}
|
|
|
|
|
You should call GetBuffer on a CString before accessing it like this.
Overall I would discourage you from using char * like this, you're better off using the member functions of CString ( if you must ) or std::string.
If you use std::string, I reckon you could write a function object to do this more nicely.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Hi.
I began to start MFC Windows programming via Jeff Prosise close to seven months ago. I believe it is an excellent MFC reference for beginner MFC Windows programmers.
I am to the point where I have ideas about upcoming projects, but there are some uncertainties including MFC issues. I would like to know whether there is an intermiate to pro level MFC book? Please post recommendation only if are believe the book and author present information that are more advanced than that from Jess Prosise book. Information could including overriding key MFC classes and functions. So basically, I am looking at a look that could help you begin modifiying MFC to whatever you want.
Thanks,
Kuphryn
|
|
|
|
|
MFC Internals is a good book, if a little dated. You should probably just download some MFC extensions from a web site, if you can find one that offers such a thing :P. Have a look at some code on CP and read some articles here, is my advice. Although MFC's days are most certainly numbered IMO.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Got to agree with Christian's recommendations.
MFC Internals is a good book for finding out what's going on inside MFC. Also reading the MFC source code will give you an excellent starting point.
Downloading code from CodeProject will also help to give you an understanding about what is and isn't possible.
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
Thanks.
I have read reviews of MFC Internals at Amazon. I many reviewers recommend Programming Windows with MFC before going with MFC Internals. I think it is just about right to study from MFC Internals.
Kuphryn
|
|
|
|
|
In my view class I did GetClientRect and got a height of 334.
I went over to my mainframe class, got a pointer to the activeview and did
pView->GetClientRect(&rect);
This was so bizzare, but I got 504 instead!!! FRom looking at the view, 504 is more accurate, but why did I get two different heights? The view I'm looking at is active, so I have the right pointer.ANy ideas why?
Thank you very much,
Very puzzled,
ns
|
|
|
|
|
It's not wierd at all - one is the size of the view, the other the size of the frame. The frame includes the non client area of the view, the menu, the toolbars, etc.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|