|
|
Hi!
I've used the following code to load an Object(A 3D Model).
m_Obj = new Object("Car");
m_Obj->LoadFile("demoMap/StaticMeshes/Pajero.IVE", false);
During Debugging, if I hover over m_Obj and view it as a XML file, it shows me:
"A name contained an invalid character. Error processing resource 'file:///C:/Documents and Settings/RATHAKRISHNAN/Local Set...
<bad ptr="">"
I've to use this variable to apply some material to the 3D Object. There it shows exception. How to overcome this Bad Ptr situation and resolve this exception?
|
|
|
|
|
debug the the LoadFile.
|
|
|
|
|
No. I got an exception while running the project. So I planned to inspect each variable by Debugging. While hover over this m_Obj variable, it shows Bad Ptr.
|
|
|
|
|
What line causes the exception?
m_Obj is an invalid pointer until the "new" succeeds.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I am trying to provide the language support (chinese) to one of my sample application. I have translated the strings with the chinese equivalent strings. It is working fine. When I run the application, I am able to see my sample application GUI with the Chinese strings.
But one thing I would like to know is when I compile my chinese language dll, I am getting the warnings MySampleAppChinese.rc : Could not find the file.
Why are these warnings generated? What is the reason for this?
Thanks in advance.
Taruni
|
|
|
|
|
Hi,
How can initialize array of int with NULL after its declartion.
int a[5]={NULL};//Right?
int a[5];then later how can I do the same above
|
|
|
|
|
1. Declare and init
int array[5] = {0};
2. ReInit
(a) for (i=0; i<5; i++) array[i] = 0;
(b) memset(array, 0, 5*sizeof(int));
(c) ZeroMemory(array, 5*sizeof(int));
3. Dynamic declare and init
(a)int *array;
array = new int[5];
ZeroMemory(array, 5*sizeof(int));
(b)int *array;
array = (int*) calloc(5*sizeof(int));
modified on Monday, September 22, 2008 1:57 AM
|
|
|
|
|
hi...How to a webserver in VC++ ...
|
|
|
|
|
|
You have to know programming with socket
|
|
|
|
|
Hello guys,
I wanted to convert an HDC to a CBitmap object but I don't know how to.
How can I possibly manipulate HDC and probably create a CBitmap from it.
Hope you can help me with this one.
It will be a big help.
Thanks.
|
|
|
|
|
Can you more explain HDC is a handle to device context and HBITMPA is a handle to a bitmap,for make a bitmap you can use of CreateCompatibaleBitmap.
|
|
|
|
|
Here's some code that will retrieve the currently selected bitmap from a HDC.
It should be noted that GetCurrentObject will only return a valid BITMAP if the supplpied HDC is a memory DC.
If I tried to do dcBmp = (HBITMAP)GetCurrentObject(screenDC, OBJ_BITMAP), I'd get garbage results.
If the DC you're trying to copy is not a memory DC, the alternative you have is to determine the position on screen of the image, then do a BitBlt from the screenDC to a memoryDC that has already got a HBITMAP selected onto it.
Note that having a look into the BitBlt, SelectObject, & CreateCompatibleBitmap may be necessary.
HDC screenDC, memDC;
char buffer[200];
BITMAP bmInfo;
HBITMAP dcBmp;
screenDC = GetWindowDC(hwnd);
memDC = CreateCompatibleDC(screenDC);
HBITMAP myBmp = CreateCompatibleBitmap(memDC, 100, 100);
SelectObject(memDC, myBmp);
dcBmp = (HBITMAP)GetCurrentObject(memDC, OBJ_BITMAP);
if (dcBmp)
{
GetObject(dcBmp, sizeof(bmInfo), &bmInfo);
sprintf(buffer, "Bitmap is: %d x %d pixels.", bmInfo.bmWidth, bmInfo.bmHeight);
MessageBox(hwnd, buffer, "Title", MB_OK);
}
else
MessageBox(hwnd, "Error", "Title", MB_ICONEXCLAMATION);
|
|
|
|
|
i'm looking for subj sources. some plain realization but in plain C++, without classes.
i saw all realizations placed here.. they all MFC ((
Please, help with sources if You have! )
//wbr
|
|
|
|
|
|
thx for reply. i created own one "component" yesterday.
there was a lot of routine coding, thats why i was looking for some example code.
wbr
|
|
|
|
|
I am using Visual Studios 2005 version v8.0 (.NET framework v2.0)
Hi Getting at error about _TEMPLATE_MEMBER
typedef typename allocator<T>::_TEMPLATE_MEMBER rebind<T>::other _Alloc;
I think it's something to do with _TEMPLATE_MEMBER and it only being know in ealier versions of visual sudios
Anybody know anything about it???????????????
|
|
|
|
|
Hello,
Is there a simple statement to hide the mouse pointer?
thanks
Simon
|
|
|
|
|
simon alec smith wrote: Is there a simple statement to hide the mouse pointer?
::ShowCursor(FALSE);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi
How chanhe frame color style using CWnd::CreateEx ?
Thanks
|
|
|
|
|
You can draw the frame yourself in response to the WM_NCPAINT
message.
Maybe some info here to get you started:
Guide to WIN32 Paint for Intermediates[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello everyone,
For C++ template, it will be expanded at compile time other than runtime. So, I think in the code below for line "Abc<Foo>", it will be expanded to Abc : Foo at compile time, and for line "Abc<Goo> ", it will be expanded to Abc:Goo.
So, I think only one class named Abc exists in final binary after expansion, and it is the same as written Abc:Foo, Goo for the same effect?
class Foo
{
};
class Goo
{
};
template <class T>
class Abc : T
{
};
int main()
{
Abc<Foo> f;
Abc<Goo> g;
return 0;
}
regards,
George
|
|
|
|
|
George_George wrote: So, I think only one class named Abc exists in final binary after expansion, and it is the same as written Abc:Foo, Goo for the same effect?
Would you try to rephrase your question? For one thing there are no names in the final binary - machine code knows only about registers and memory, not types and variables.
|
|
|
|