|
Hi,
Can anyone please let me know if we can rename a system dll ( dll presnt in c:\windows\system32 folder, when in use ?
I manually tried renaming, it even got renamed, but does it affect any OS operation in backend? or renaming just dont take effect?
If it can be renamed, can anyone let me know a suitable method for that (in vc6.0) ?
Thanks in advance,
Manasi
|
|
|
|
|
Manasi D wrote: Can anyone please let me know if we can rename a system dll ( dll presnt in c:\windows\system32 folder, when in use ?
Why under the sun will you want to do this?
Manasi D wrote: If it can be renamed, can anyone let me know a suitable method for that (in vc6.0) ?
Nothing special about the file being a DLL, you could just rename it like how you would rename any other file.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hi I am looking for a ANTS Profiler equivalent to profile MFC/desktop apps, any suggestion?
Thanks.
Norman Fung
|
|
|
|
|
norm wrote: profile MFC/desktop apps
BoundsChecker, AQTime.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
Wondering if there's any alternative, preferably free (well perhaps I'm asking too much)? I checked BoundsChecker [^]it's:
a. cost money (fair enuf, it's not like developers are making lots of it but ...)
b. Not sure if it works with VS6 (working on acient WIN32/MFC apps and VS6 environment)
Profiler user interface definitely looks good [^]though.
Thanks.
devy
|
|
|
|
|
heyhey,
hope this is the correct forum, cause actually it's a mixture of c++ and opengl question:
I used a 3ds-model-reader (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=506)
which reads out all vertices correct from the file.
then the normals are calculated and stored.
I want to try my skills with my own lighting calculations but the problem is I cannot read out the normals correctly.
The vertices are no problem, but here's some code:
<br />
{...}<br />
for (int i = 0; i < ModelToDraw.numObjects; i++)<br />
{<br />
if (ModelToDraw.Objects[i].textured)<br />
glEnableClientState(GL_TEXTURE_COORD_ARRAY);<br />
glEnableClientState(GL_VERTEX_ARRAY);<br />
if (ModelToDraw.Objects[i].textured)<br />
glTexCoordPointer(2, GL_FLOAT, 0, ModelToDraw.Objects[i].TexCoords);<br />
glVertexPointer(3, GL_FLOAT, 0, ModelToDraw.Objects[i].Vertexes);<br />
float *pVertex = ModelToDraw.Objects[i].Vertexes;<br />
float *pNormal = ModelToDraw.Objects[i].Normals;<br />
for (int j=0; j < ModelToDraw.Objects[i].numMatFaces; j++)<br />
{<br />
glPushMatrix();<br />
glTranslatef(ModelToDraw.Objects[i].pos.x, ModelToDraw.Objects[i].pos.y, ModelToDraw.Objects[i].pos.z);<br />
<br />
glRotatef(ModelToDraw.Objects[i].rot.z, 0.0f, 0.0f, 1.0f);<br />
glRotatef(ModelToDraw.Objects[i].rot.y, 0.0f, 1.0f, 0.0f);<br />
glRotatef(ModelToDraw.Objects[i].rot.x, 1.0f, 0.0f, 0.0f);<br />
<br />
myGetTriangles(ModelToDraw.Objects[i].MatFaces[j].numSubFaces, ModelToDraw.Objects[i].MatFaces[j].subFaces, pVertex, pNormal, ModelToDraw.shownormals);<br />
glPopMatrix();<br />
}<br />
{...}<br />
well this part of code works well with the glDrawElements-Call at the End but I want to use my own function "myGetTriangles", so here's a little snippet:
<br />
{...}<br />
void myGetTriangles(...)<br />
vector4 a,b,c,d;<br />
<br />
int i;<br />
unsigned short index;<br />
float* _tempArray; <br />
glDisable(GL_LIGHTING);<br />
<br />
for(i=0; i < numSubFaces; i+=3)<br />
{<br />
index = subFaces[i];
_tempArray=(float*)(((char*)k) + index * 12);
<br />
a.x = _tempArray[0];<br />
a.y = _tempArray[1];<br />
a.z = _tempArray[2];<br />
a.w = 1.0f;<br />
<br />
index = subFaces[i+1]; <br />
_tempArray=(float*)(((char*)k) + index * 12);
b.x = _tempArray[0];<br />
b.y = _tempArray[1];<br />
b.z = _tempArray[2];<br />
b.w = 1.0f;<br />
<br />
index = subFaces[i+2]; <br />
_tempArray=(float*)(((char*)k) + index * 12);
c.x = _tempArray[0];<br />
c.y = _tempArray[1];<br />
c.z = _tempArray[2];<br />
c.w = 1.0f;<br />
<br />
_tempArray=(float*)pNormals;
<br />
d.x = _tempArray[0];<br />
d.y = _tempArray[1];<br />
d.z = _tempArray[2];<br />
d.w = 1.0f;<br />
<br />
if (showNormal)<br />
{<br />
glColor3f(1.0, 0.0, 0.0);<br />
glBegin(GL_LINES);<br />
glVertex3f(a.x, a.y, a.z);<br />
glVertex3f(a.x + d.x, a.y + d.y, a.z + d.z);<br />
glEnd();<br />
}<br />
I marked the line which must be wrong! I tried several versions but couldn't fix it, any idea?
I think the problem is simply reading the normal from it's pointer but since the drawing method described at the top iterates through the materials I cannot simply alternate through the bunch of arrays.
This problem is nagging me for days, so any advice would be appreciated. thanx guys great forum!
|
|
|
|
|
Is there an easy way to port project from vc2005 to vc2003?
or at least resource file.
thanks in advance.
|
|
|
|
|
See here[^] if its helpfuls?
|
|
|
|
|
Upon installing Direct SDK I found a folder containing the documentation. Does anybody know how to add these documents to my local copy of MSDN? I'm unable to find any option within the document explorer to add new folders, so I tried copying the folder amongst the others that MSDN uses, but I am still unable to see the contents.
|
|
|
|
|
What version of VS?
DirectX SDKs add themselves automatically to my VS2003 help contents. Platform SDK soesn't
doesn't but I just searched help and found...
"Visual Studio .NET Combined Help Collection Manager" or "VSCC" and there's a page that searches
the available documentation and lets me select which ones I want. I'm about to add the PSDK
so if it brings my system down I may not be back for a while heh
|
|
|
|
|
I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain number of copies, page range etc.
My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) do not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display their Print dialogs and hence I cannot obtain the number of copies, page range etc.
Does anyone know which API Word is using to display the Print dialog ?
Thanks in advance
|
|
|
|
|
Hi Guys,
I want my application to do some series of operations for every 5 or 10 mins
and am facing a proble with setting the timer event in MFC.
This is the code that i am using.
<br />
wind::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />
{<br />
SetTimer(test,100000,NULL); <br />
PostMessage(WM_TIMER,0,0);<br />
<br />
}<br />
<br />
wind::OnTimer(UINT te)<br />
{<br />
AfxMessageBox("Timer",MB_OK,NULL);<br />
}<br />
The program exits immediately and i cannot see the message box which i intended to see it for some time elapse.
Pls give me some suggestion.
Thanks,
Suresh
|
|
|
|
|
Is there a ON_WM_TIMER() entry in the wind class' message map?
Why are you calling PostMessage after SetTimer()? The timer should post the message.
Maybe for testing remove one of the '0's from the millisecond value
What is causing "program exits immediately" ?
|
|
|
|
|
Hi Mark,
There is a ON_WM_TIMER entry in the message maps section.
The program dose a normal exit as there is no other code after settimer.
I tried to remove the 00's and made the timer interval to 100 but the program exits instead of waiting for the timer event.
I am posting the entire code .
<br />
BEGIN_MESSAGE_MAP(wind,CFrameWnd)<br />
<br />
ON_WM_CREATE()<br />
ON_WM_TIMER()<br />
<br />
END_MESSAGE_MAP()<br />
<br />
wind::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />
{<br />
SetTimer(test,1000,NULL); <br />
}<br />
<br />
wind::OnTimer(UINT te)<br />
{<br />
AfxMessageBox("Timer",MB_OK,NULL);<br />
}<br />
thanks,
suresh
|
|
|
|
|
If you remove the call to SetTimer() , does it behave normally?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I am posting a wm_destroy immediately after creation.
Thanks for that.
It works fine now.
Regards,
suresh
|
|
|
|
|
suresh0009 wrote: The program dose a normal exit as there is no other code after settimer.
Noooooooooo, this is not true. MFC application keeps running but you have to return 0:
wind::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
SetTimer(test,1000,NULL);
return 0;
}
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.
|
|
|
|
|
Hi,
If i place a messagebox after the settimer the application works as desired.
<br />
wind::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />
{<br />
SetTimer(test,10,NULL); <br />
AfxMessageBox("HI........timer is set",MB_OK,NULL);<br />
}<br />
here the messagebox is making sure that the program dosent exit.
can u give some suggestion.
thanks,
Ramachandra raju KK
|
|
|
|
|
i am posting a wm_destroy.
thanks for the support.
it works fine after i remove the destroy message.
regards,
suresh
|
|
|
|
|
suresh0009 wrote: PostMessage(WM_TIMER,0,0);
Don't make that.
Do you know why your application exits immediately?
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.
|
|
|
|
|
Hi,
I am posting a wm_destroy immediately after creation.
thanks for the support.
timer workd as desired now.
regards,
suresh
|
|
|
|
|
You can't receive a timer notification if you exit your application!
|
|
|
|
|
Don't use WM_TIMER. Create a thread that posts a custom message at the desired interval. WM_TIMER is the lowest priority message in Windows and you're not guaranteed to get the message.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I have defined my own list control based on MFC's CListCtrl. When I select items in the list with mouse click, everything works fine, the onItemChanged even has been correctly fired. But when I walk through the list items with arrow keys (up and down), the selected item in the list hasn't been changed.
Does anybody know why?
Maruko
|
|
|
|
|
I finally decided to move an ancient MFC app from VC6 to VS2005. I've had no problems building, but the app (which happens to be dialog based) doesn't seem to honor XP themes. The VC6 version (in which I'd inserted an XML manifest) honors themes and renders buttons correctly[^].
Under VS2005, I started by letting the project wizard generate a minimal dialog based app and selected "manifest support" with the default options. Yet, the app displays buttons like this[^]. I have the usual InitCommonControls() code in the app's InitInstance() but am unable to get it to render controls using the current theme.
I'm probably doing something stupid. A nudge in the right direction would be much appreciated.
Thanks,
/ravi
-- Modified at 13:53 Wednesday 17th January, 2007
Turns out my version of VS2005 is omitting the "Microsoft.Windows.Common-Controls" version="6.0.0.0" entry from the manifest. Manually injecting this into the embedded manifest fixed the problem.
-- End modification
|
|
|
|
|