|
I know it wasn't one of your questions but over the last 6 years I've never encountered picking to not work. I wish I had, and could help you out.
I have not personally tried the application on a branded machine, but it has been tested on a wide variety of cards by a number of people, right from the intel OEM chip (8152 maybe, I can't remember) of a few years ago, to the Radeon 9800 pro. None of them needed any special adjustment to make them work.
In response to your third question, I've not seen an OpenGL framework that I was happy with yet, so you are not alone in using direct OpenGL programming
Phil
|
|
|
|
|
Thank you for your interesting answer. There must be something really wrong with the way I code. What is really surprising me is that I have tried various ways to initialize OpenGL using some functions/classes found on this site (and others) but up to now I have never found something really satisfactory:
- picking would not work in fully accelerated mode,
- application would become very unstable (e.g. windows 2000 would reboot when picking althought we were working on a brand new installation),
- application would not display anything in the OpenGL window at all...
Could you give a link to the OpenGL initialization code you are using or a sample?
pmartin wrote:
so you are not alone in using direct OpenGL programming
Thanks. I have been speaking of my problems with picking with some professionnal of the CAD/CAM industry and most told me that I should not be surprised to meet many problems and I felt as if I did not knew the real world at all...
|
|
|
|
|
There are problems with many open gl drivers, without a doubt. Picking is not one of them I think. Most of the hardware around, except for maybe the higher end workstations do their picks with with the software fallbacks. So even on the crummiest implementation, they should have it right.
However, one thing I have found is that up to date drivers are a must. A number of people have tried the software, (http://aztec.sourceforge.net) and it just wouldn't start because he didn't have the most recent drivers for his video card.
You can checkout or download the most recent code, and the relvant opengl initialisation code is in
aztec\source\AztecGUICommon\src\gui\win32\MGLCanvasImpl.cpp
and I can show you the picking code if you want.
And I wouldn't try to build the project unless you are VERY patient. Requires finding and downloaded a number of 3rd party libs, and it gets pretty annoying very fast
Phil
|
|
|
|
|
Thank you very much for your efficient help!
The picking in my application now works fine however the hardware acceleration is set.
In fact it was not because of an error in my OpenGL initializing code which is pretty similar to the one you use for aztech. While comparing your picking code and mine I found out that I forgot to save the projection matrix and to call glInitNames() before drawing. I added those few lines and now it works.
This bug has been a pain for 2 years and people doing support will be greateful not to have to tell their customers they need to have their system administrator change hardware acceleration level in order to have the application work properly.
Thank you! I wish I could help you althought I have not reached your expertise yet.
|
|
|
|
|
You are very welcome. I'm extremely pleased it worked out for you!
And don't sell yourself short, I think you are doing well. Its a fairly easy thing to overlook, and once you found a solution (change hardware acceleration) it is very easy to not continue looking.
Anyway, have fun, ad feel free to contact me on the aztec forums, mailings lists, here, or via email.
Phil
|
|
|
|
|
hi all:
That's too strange.
What variable type should I put into the function's parameter(2nd and 3rd).
By the MFC manual. I should write like that: GetColumnInfo(0, &i1, &i2);?
But that can't pass the compiler's check.
If I write like that: GetColumnInfo(0, i1, i2);?
It goes out the memory access error!.
I wrote a few line code:
----------------------------
CSPlitterWnd my_splitterWnd;
...
{
int cxCur, cxMin;
my_splitterWnd.GetColumnInfo(0, &cxCur, &cxMin);
.....
}
----------------------------
The MFC menual about this function:
void GetColumnInfo(
int col,
int& cxCur,
int& cxMin
) const;
|
|
|
|
|
|
void CSplitterWnd::GetColumnInfo(int col, int& cxCur, int& cxMin) const
{
ASSERT_VALID(this);
ASSERT(col >= 0 && col < m_nMaxCols);
cxCur = m_pColInfo[col].nCurSize;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cxMin = m_pColInfo[col].nMinSize;
}
I trace into the CSplitterWnd's source. Access error occur at the upper line I marked.
|
|
|
|
|
Sorry !
I found!.. Error is at m_pColInfo[col].nCurSize.
Not cxCur.
Thank you michael
|
|
|
|
|
|
Hi Guys,
How to handle large string greater than what CString Handle's.
Thanks in Advance
Hussain
|
|
|
|
|
From the Visual C++ 6 help:
"A CString object can store up to INT_MAX (2,147,483,647) characters..."
Maybe you need something different? When did you find limits?
|
|
|
|
|
Some times I heared that CDoub... Some class with this type of name can store more charchters than CString. I Forgot its name.
Hussain
|
|
|
|
|
MOHAMMED AZGHAR HUSSAIN wrote:
I Forgot its name.
When/if you remember it, post again and we'll discuss it.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi All
Can anyone please let me know how can I create a shared directory using Win32 APIs.
Thanks and Regards
Ram
|
|
|
|
|
call net.exe share <share name="">=<path>
Don't try it, just do it!
|
|
|
|
|
The function I believe you are interested in is NetShareAdd() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The Create function of the MFC CWnd class has a parameter for the ID of window/control. (Almost) all CWnd derived classes have such a parameter.
When I create a control dynamically, do I have to specify a correct ID or can I just fill in any value (e.g. 0 or -1)? Is this ID actually used? and if so, for what is it used and how do I obtain the next available ID?
|
|
|
|
|
You can specify any ID you want to. The normal ID used for 'don't care' is IDC_STATIC (-1).
The ID will be used if you want to retrieve the control by its ID, such as when calling GetDlgItem , GetDlgItemText , SetDlgItemText , etc.
The only way you could get the 'next available ID' would be to walk the window's child controls using GetWindow (get the first with GW_CHILD, then use GW_HWNDNEXT to get subsequent children) calling GetDlgCtrlID on each one.
|
|
|
|
|
Dear All,
I am developing an application in MFC VC++ Version 6.0 for Windows 2000. I start my application as soon as the system logs on, by giving the path of my exe in Run field i.e.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
I want to run my program in safe mode also. But unfortunately my program doesnot starts in the safe mode automatically because Run entry in registy doesnot work in this case.
Please suggest any way to run my application in safe mode also.
Feel free to ask any further queries in this regards,
Thanks
Rohit Dhamija
|
|
|
|
|
I would say that what you're trying to achieve is impossible. You'd need to re-create your application as a service, then rebuild the Windows Kernel to start up your service when it boots to safe mode.
And actually, I am happy that this is the way it works. Think for a moment what would happen if a virus got to your Windows and made itself start no matter where you booted ? In Windows XP/2000, this problem would be pretty sh*tty indeed
Greets,
Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi,
I am developing an application where i need to serialize the XML files, which I have on my local hard disk with the XML files at my server. I am also using Rijndael algorithm to encrypt the files. Please suggest me how to go ahead with it as i don't have any idea on serializing data.. I want to mirror all the changes st server XML files to the local ones. If i can do it when the files are encrypted is the best. If not then I have to decrypt and then modify it..by serializing..and then encrypt it..again.. Please help me out..
Any help or pointers are highly apprecaited..I am using MFC..for doing the same..
Thanks a lot in advance..
Regards,
Himanshu
|
|
|
|
|
i am one project where i have to transfer controls data between two dialog.
i can manage to send the data from ist dialog to second
like this...
CMyDialog2 m_mydlg2;
m_mydlg2.myvariable2=myvariable1;
m_mydialog2.DoModal();
this works correctly
but now i need to get the data of second dialog in first one
after closing the second dialog
can anyone help me for that
thax
|
|
|
|
|
CMyDialog2 m_mydlg2;
m_mydlg2.myvariable2=myvariable1;
int nRet = m_mydialog2.DoModal();
if(nRet == IDOK) // if okay was clicked get the data from the dialog
{
myvariable1 = m_mydialog2.myvariable2; // get the variable back out of the dialog
}
Michael
|
|
|
|
|
Use Michaels's suggestion, or pass a pointer to the second dialog, as in:
m_mydlg2.myptrvariable2 = &myvariable1; Now when myptrvariable2 is modified in the second dialog, the first dialog will automatically "see" the change(s).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|