|
i'm missing some dlls to run in debug config and having problems installing sp6. so i don't have any choice.
|
|
|
|
|
So how about an alternative:
if (m_Dialog[0]->m_Listl.InsertColumn(0,_T("Item Name"), LVCFMT_LEFT, 110) == -1)
AfxMessageBox("InsertColumn() returned -1");
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I may be wrong on this, I'm just not sure, but I think you cannot create then insert. You may have to let the create function execute first.
The best solution would be to move the insertcolumn function to the init dialog function of the tab control dialog box (m_DialogID[0])
Alternatively, move the create function to the constructor for the main dialog, and the insertcolumn to the initdialog function.
|
|
|
|
|
thnx for the reply. here's something weird. i am calling the insertColumn function from the .cpp file of my tab control. after i insert the line "UpdateData(false)" in the ::OnInitDialog of the page displayed by the tab the columns do appear. however i get a message box before executing the program that an 'unsuported' operation was attempted. but if i place the "UpdateData(false)" function anywhere else other than in OnInitDialog it doesn't work anymore at all. any idea what's going on here?
|
|
|
|
|
tims81 wrote: any idea what's going on here?
I would remove the calls to UpdateData() . It is rarely, if ever, needed.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok, i just found out - apparently i have to call UpdateData(false) BEFORE I add the columns...
|
|
|
|
|
please guide me for a windows program that neatly displays a circle, a square, and an equilateral triangle in a window.
1) When the user presses an arrow key the square and only the square will move slightly in the direction of the arrow.
2) When the user presses page-up the triangle will grow in size. (It will remain an equilateral triangle, and it's center will not move. )
3) When the user presses page-down the triangle will shrink in size. (It will remain an equilateral triangle, and it's center will not move. )
4) When the space bar is pressed all three graphic objects will change to a new random color.
i wil appreciate if anyone can e-mail me at dearchinar@gmail.com
Chinar shah
-- modified at 2:16 Thursday 18th January, 2007
|
|
|
|
|
cshah2 wrote: dearchinar@gmail.com
Guess what?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Dont need to email we say to you here;)
Do you want to move shapes see CRectTracker class
|
|
|
|
|
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
|
|
|
|