|
I already asked you this question but I will ask again (maybe you will stop flooding the forums): what do you want to achieve exactly by mixing MFC (which not at all the case in your example) and SDL ? I already worked with SDL so I know how it works and how to use it. Basically, mixing SDL and MFC doesn't sound like a good idea. If you want to use it to manage events, then forget about it, because MFC won't let you easily manage that. If the purpose is only to paint a SDL surface in a MFC window, maybe this link[^] could be usefull.
But from what I see, you don't have any experience with MFC or win32 (this code looks like cut and paste). I strongly suggest you to learn that first (which could be time consuming).
Now, if you want to have a GUI system to work in cooperation with SDL, then I suggest you that you take a look at CEGUI[^] (as I already said previously, but without success).
And please, stop flooding the forums with the same question over and over again, unless you provide more information about what you are trying to achieve exactly.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Can i get any sample code for GUI system to work in cooperation with SDL...
It helps me a lot
Thanking you
Manjunath S
|
|
|
|
|
Geez, can't you simply read what I've posted ? It's incredible !!
I also asked you for more information, if you don't want to spend some time in describing your problem, then, there is no solution for you.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi,
well,What i need is a SDL screen in MFC/Win32 application ,with button beside that screen , so that by pressing button(like play,pause,stop) i can call sdl function to act according on sdl screen...This screen display images captured by cam. we have Back end code of SDL.But i need one Window with GUI interface ....
Thanking you
Manjunath S
GESL
Bangalore
|
|
|
|
|
Manjunath S wrote: This screen display images captured by cam
This is ridiculous. You use SDL just to display images from a camera ? Why don't you use another technique (don't know which one but this looks like a very bad solution to me).
Manjunath S wrote: well,What i need is a SDL screen in MFC/Win32 application ,with button beside that screen , so that by pressing button(like play,pause,stop) i can call sdl function to act according on sdl screen
Did you even bother to follow the links I gave you ? One of the link describes how to render SDL surfaces in a win32 environment.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi,
Can I get any other solution for this(i.e SDL in MFC/Win32).If there please inform me.
Can i get link once again, Please explain me how to create buttons beside that screen.
Thanking you
Manjunath S
GESL
Bangalore
|
|
|
|
|
Manjunath S wrote: Can i get link once again
that's stupid... scroll the page up and reach Cedric previous posts to see the links
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I am trying to get the Microsoft Windows installation key (the serial number) in my VC6 C++ program. The key can be found from XP->Control Panel->System->General. For example, the key on my computer is "55276-OEM-0011901-00102". Does anybody know how to get the string in C++ program?
Thanks in advance
|
|
|
|
|
//how about using GetVolumeInformation() .
Viorel is correct.I checked it with MSDN
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 9:54 Tuesday 6th June, 2006
|
|
|
|
|
I think GetVolumeInformation actually returns another kind of information -- the disk's serial number (the same which is shown by the vol command).
|
|
|
|
|
If you are familiar with Windows Management Instrumentation (WMI), then you can obtain the Serial Number through the Win32_OperatingSystem WMI class, which has the SerialNumber data member as a string.
See Win32_OperatingSystem class and WMI-related information.
|
|
|
|
|
ytsau wrote: Does anybody know how to get the string in C++ program?
Just read it from the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for all the replies!
How do I read the registry? Can you show me the actual C code?
Thanks again!
|
|
|
|
|
ytsau wrote: How do I read the registry?
Use RegQueryValueEx() .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks a lot!
Here is the actual code I figured out to access the ProductID:
UCHAR buf[256];
ULONG size = 256;
ULONG type = REG_SZ;
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &hKey);
RegQueryValueEx(hKey, L"ProductId", NULL, &type, buf, &size );
RegCloseKey(hKey);
|
|
|
|
|
Great. The only change I would suggest is:
ULONG size = sizeof(buf); That way if you need to change the size of buf , you only have to do it in one spot.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Just read it from the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId
It should be considered that another sibling key path -- "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductId" -- seems to be more version-independent.
|
|
|
|
|
Viorel. wrote: It should be considered that another sibling key path -- "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductId" -- seems to be more version-independent.
The General tab of the System Properties dialog does not look at that key.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I am working with dialog based application. Below is the snapshot of first part of dialog class of my project.
class CFileSenderDlg : public CDialog<br />
{<br />
public:<br />
CFileSenderDlg(CWnd* pParent = NULL);
void setStatus(CString);
enum { IDD = IDD_FILESENDER_DIALOG };<br />
CString filePath;<br />
CString status;<br />
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX);
and so on.
But i am recieving an error on
enum { IDD = IDD_FILESENDER_DIALOG };
And that is
error C2065: 'IDD_FILESENDER_DIALOG' : undeclared identifier
error C2057: expected constant expression
Can anyone please tell me why this error occurs.
Thank you
We Believe in Excellence
www.aqueelmirza.cjb.net
-- modified at 8:34 Tuesday 6th June, 2006
|
|
|
|
|
wrote:
error C2065: 'IDD_FILESENDER_DIALOG' : undeclared identifier
Can anyone please tell me why this error occurs.
include "resource.h" file
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Thanks for responding. I tried it but now it is displaying "Debug Assertion Failed" dialog. and when i try to debug it, it is at following line in afxwin1.inl
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()<br />
{ ASSERT(afxCurrentResourceHandle != NULL);
Can you please tell me why it is.
Thank you
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
This is just a guess, but are you trying to create the dialog in some other class's constructor? (My guess is the CWinApp-derived one). If that is the case, then put it elsewhere.
this is this.
|
|
|
|
|
how to create your class?
whitesky
|
|
|
|
|
Aqueel wrote: AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
Can you please tell me why it is.
This may due to incorrect sequence of including of headers
Include the resource.h into application's class Header...
This may resolve the problem.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have made my project using MFC AppWizard so resource.h was automatically included.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|