|
I'm developing a game as a win32 project.
I now need to add some simple windows forms to the game. When I try to do that, VS asks me
"you are adding a CLR component to a native project. Your project will be converted to have Common Language Runtime support. Do you wish to continue?"
What should I consider (portability, efficiency) before choosing yes?
|
|
|
|
|
Hanan888 wrote: I now need to add some simple windows forms to the game.
You know about the difference between Windows Dialogs and .Net-Forms, do you?
You want to write a game using C++, right?
And you are positively sure that you want to add a .NET-Form to that game?
If you answer any of above questions with "No." of "Hmm - maybe..." or even "Huh?", you need to rethink what you really want to do.
If you answered all questions with "Yes!", you will need to have your project converted to Managed C++. And that is what the dialog offers.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Thank you very much.
I think I know the difference. I guess it's very hard to acheive functionalities of a .NET form with a Windows Dialog.
And I need about ten different designed forms, some are pop-ups, some are complicated forms.
I do write a game using c++.
I'm not sure about adding .NET component. I want to because it will make like a lot easier.
There is ofcourse the question of portability - I'm demanding my players to have .NET 2.
The question is how terrible is that ?
out of the users that have directX9, how many have .NET 2 ?
Is it really a big deal to install it (.NET) during installation ?
efficiency considerations ?
|
|
|
|
|
Hanan888 wrote: I guess it's very hard to acheive functionalities of a .NET form with a Windows Dialog.
What is it you want to achieve? We here are happy to help you.
Hanan888 wrote: I'm not sure about adding .NET component.
If you are adding .NT anyway, why do you want C++ in the first place? You seem to know .Net already.
You could use .NET as your main target (C#, VB.NET, IronPython, Boo...whatever) and code things where you have to have access to Win32-routines using a C++/CLI to unmanaged C++ bridge.
Hanan888 wrote: Is it really a big deal to install it (.NET) during installation ?
No.
But AFAIK you are not allowed to ship the framework with your product.
The customer would have to get it directly from Microsoft.
But the time to install is about a quarter of an hour.
IIRC, Net 2.0 is limited to W2K and newer. You would exclude the Win95-based platforms. Probably not a real problem.
Hanan888 wrote: efficiency considerations ?
.NET, like Java, tends to eat a lot of memory.
The Quake engine was ported to managed C++ and ran fine. Only a little slower.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
IMHO, just say 'no'. .NET is for business applications, not games.
You can make great GUIs without it - look at WTL, for instance.
|
|
|
|
|
Hello All
I am using MFC with OpenGL to code multimedia application, I am using SDI architecture, and I found that when I open any menu item and select it, windows sometimes don’t erase the menu area immediately, and it appears like a shadow over the OpenGL window, until I do any repaint action it disappears
It seems to me that it is windows issue, but I am not sure!
|
|
|
|
|
A-M-S-S wrote: It seems to me that it is windows issue
I would say the opposite . Whenever windows need to refresh a window (like for example in your case because something went in front of it), it will send a WM_PAINT message to it. So it is up to you to repaint the window whenever you receive that message.
|
|
|
|
|
The action that done with my menu item is to set some flags and variables then call
InvalidateRect(NULL,FALSE);
To repaint the entire client area, so the menu drawing area should disappear, and this the normal situation that happen in any windows application -the menu disappear, if you just click outside it-
|
|
|
|
|
A-M-S-S wrote: The action that done with my menu item is to set some flags and variables then call
InvalidateRect(NULL,FALSE);
InvalidateRect will simply have as an result to send a WM_PAINT message to your window. If you don't handle that message or you don't repaint your window correctly, then it's logical that the menu doesn't disappear.
A-M-S-S wrote: To repaint the entire client area, so the menu drawing area should disappear, and this the normal situation that happen in any windows application -the menu disappear, if you just click outside it-
Sorry, I don't understand what you are trying to say . What you call a normal situation (the menu "just"disappear when you click outside it) is simply because that window reacts on the WM_PAINT message and repaints itself.
What you have to understand is that Windows doesn't keep the 'image' of your window. So it means that if something is drawn over it (like with the menu), there is no way to recreate the image unless it asks the window to repaint itself.
|
|
|
|
|
For sure I am doing handling for my paint message, this is where I am call my OpenGL render function and I didn't do any thing else,
So every thing should be ok
And as I told before, this phenomena doesn’t appear every time I open the menu
I was trying to send a screen shot of what I got
If you are interested write your mail in a private message and I will send you the screenshot
|
|
|
|
|
A snippet of code would be more usefull I think. Could you post what you do on the WM_PAINT message ?
|
|
|
|
|
here it is
void CChildView::OnPaint()
{
CPaintDC dc(this);
glClear(GL_COLOR_BUFFER_BIT);
RenderScene(); //calling my OpenGL drawing function
glFlush();
SwapBuffers(m_pDC->GetSafeHdc());
}
|
|
|
|
|
Hi, does anyone know what header files/libraries to use to use ppm file formats?
I'm trying to parse a ppm format file in c++.
|
|
|
|
|
|
Hello friends...can anyone guide me how to start programming for USB Interface in VC++ since iam new to VC++ as well USB Port.
Thanks
prav
prav
|
|
|
|
|
You never access the USB port directly like you would do for a serial port. Instead, you work with a device driver that interract with your hardware.
Now, it depends a lot of the device with which you want to communicate, as the drivers are very specific. So, which kind of hardware are you using ?
|
|
|
|
|
Thanks for posting a wonderful topic...
Even i have the same qustion to ask to all..
I have finger print sensor and i have to access the finger print data using the vc++ code, Drivers for the device is installed in my machine
with regards
||SnAkeBed||
|
|
|
|
|
I already answered your question. Did you read that? Because I have no memory of you responding.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Hi ,
I have an xyz.dll ,when i was trying to register that dll i am getting error message like below
error message: xyz.dll was loadable,but dllregisterserver not find entry point for that dll.
but i want to register that dll and need to get classid for xyz.dll.
could u plz help me that how can i register and get classid for that particular dll.
Thanks-
|
|
|
|
|
Are you sure that is really a COM DLL?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Probably your DLL is not a COM one (registration applies only to COM components), see [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Is it possible to use custom baud rates on a regular PC (Windows XP) with a built-in standard RS-232 com port?
|
|
|
|
|
I've just done a bit of reading, and you can get windows to give you the information.
Open a handle to the com port (CreateFile etc), and then use GetCommProperties on it.
One of the COMMPROP structure members is called dwMaxBaud and also dwSettableBaud - these are bit masks, and one of the flags is BAUD_USER. I'd assume that's the one you want.
So, the answer is "maybe - it depends on your 'standard' RS-232 com port."
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
MSDN [^] states:
BaudRate
The baud rate at which the communications device operates. This member can be an actual baud rate value, or one of the following indexes.
hence, have a try.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks a lot! By trying different values of the dcb.BaudRate parameter in the call to SetCommState I was able to find all the supported baud rates on my PC.
|
|
|
|