|
inline float FastCosF(float value)<br />
{<br />
#ifdef Im_In_VisualStudio<br />
<br />
__asm<br />
{<br />
fld value;<br />
fcos;<br />
fstp value;<br />
}<br />
<br />
#else //in GNU compiler<br />
<br />
<br />
#endif<br />
<br />
return value;<br />
}<br />
Through googling i got this: asm ("fsin" : "=t" (value) : "0" (value));
but i don't think it works
|
|
|
|
|
which CPU are you targeting?
i think the author of that bit is assuming anyone using Visual Studio compiler is going to be making EXEs for use on Pentium (and compatible) processors. but since gcc is used on many different architectures, not just Pentiums, you can't make the same assumption - and you'll have to pick a processor(s) to write for.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hmm i didn't consider that...shows how much i know about asm. Looks like for sake of multiplatform im just gonna have to use the built in math functions.
|
|
|
|
|
Please help me in writing a code to know whether a webcam is attached to any USB port or not? This is very urgent
Thanking you
anukampa
|
|
|
|
|
The easiest way would probably be to use the driver for that device to check it's status.
Elaine
The tigress is here
|
|
|
|
|
If the webcam has a valid driver installed you just
need to enumerate connected video devices and look
for a "friendlyname" that matches that of your webcam.
Look at AMCAP source code (in the DirectShow SDK samples)
for details of how to do that. AMCAP enumerates all
connected video devices and lists their "friendlyname"s
in a menu from which the user can select one.
Steve T
|
|
|
|
|
I need to know the Combobox selection that was before the user changed the selection.
If I use
OnChangeCbXXX() {<br />
int selection = m_cbXXX.GetCurSel()<br />
}
then selection holds the new value. How to get the value before the change???
|
|
|
|
|
Just create another member variable that defaults to -1. On the CBN_SELCHANGE handler, do something like:
OnChangeCbXXX()
{
int selection = m_cbXXX.GetCurSel();
TRACE("Previous selection = %d\n", m_prevsel);
TRACE(" Current selection = %d\n", selection);
m_prevsel = selection;
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
How can I find out opened files on LAN ? I would like to use it in my app. I mean this Computer management->System tools->Shared folders->Open files
|
|
|
|
|
See here and here for possibilities.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have a window with a standard title bar (or caption bar) with the standard trio of Minimize, Max/Restore, and Close(SYSMENU) pushbuttons. Specifically, I have this window start maximized by sending myself a WM_SIZE message or by using the WS_MAXIMIZE style on creation. It looks great, but it isn't maximized. It can be moved by dragging the title bar, and I want the maximize button to be the restore button. More generally, I would like to know more about how to interact with a windows default title bar. I am not currently using MFCs in an effort to better understand the effort required to program for windows without MFCs. Any references to better references on the subject of title bar "maintenance" are also helpful.
|
|
|
|
|
Hi all!
How could I stop flickering in a list view control?
|
|
|
|
|
I assume the flickering is happening while items are being added to the control. If so, try calling SetRedraw(FALSE) beforehand.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
No!, it's happening when I resize the window.
|
|
|
|
|
Hello people,
I'm having a very weird problem at the moment and I can't figure it out. Here's the situation;
- I have a normal dialog (CDialog class) with a groupbox on it.
- Inside the groupbox, I create a CPropertySheet like this:
CWnd* pWnd = GetDlgItem(IDC_ST_TAB);
m_propSheet.Create(pWnd, WS_CHILD | WS_VISIBLE);
m_propSheet.SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
where IDC_ST_TAB is the ID of the groupbox and m_propSheet is a CPropertySheet object.
- Before I call create, I add several pages. All pages show fine.
- On one of the pages contains a custom listbox, this listbox has a popup menu on right click. The popup menu shows fine.
- When an item in the popup menu is clicked, it SHOULD pop up another dialog (again a CDialog class). It does seem to load the dialog, but never shows it! It hangs on DoModal().
Now here's the weird thing; when I change the m_propSheet.Create to say WS_POPUP or just nothing instead of WS_CHILD, I get a floating property sheet and then the dialogs DO pop up properly...
What am I missing here? All property sheets are also set as child in the resource (but I don't think it matters).
|
|
|
|
|
I have used a "Forms 2.0 ActiveX control" in my first piece of software created with VC++ 6.0. Unfortunalty my software will not run on a system unless MS Office is installed. What have I done wrong!!!
Can I include the nessesary files in my application to make my software run on a system without MS Office.
Thanxs
|
|
|
|
|
Normally what you should do is supply the ActiveX with your program (but check for license and everything cause that's not my field, I'm just a programmer that don't care about licenses ). Then you will need to register it using regsvr32.
Probably that this ActiveX is used by Office thus it is already installed with Office..
|
|
|
|
|
I thought I had!!!
The component is fm20.dll normally found in Windows\System32. It came from the Registered ActiveX Controls gallery found under "Add to project, Components and controls, ".
How should I supply the control with my program?
Thanxs, for your help. Sorry for the questions but I am new to this!
|
|
|
|
|
avs4 wrote:
How should I supply the control with my program?
You will need to make an installation programm that will check if the ActiveX is already there or not. If not it has to copy it in Window\System32 and register it. For installation program, you can use InstallShield but I don't have a lot of knowledge there. Or of course you can also copy and register it manually but I don't know if this is a good solution
By the way, fm20.dll, is not an ActiveX but a dll. ActiveX have the .ocx extention. So maybe you are looking at the wrong file...
[EDIT] Also, do you say that your application won't run. But what is happening ? Simply nothing when you start your application or do you get an error message ? [\EDIT]
|
|
|
|
|
When I click my icon to start the program, nothing happens, no error message, nothing. If fm20.dll is installed in the system32 directory the program runs.
It is the correct file, the control is in the VC6.0 gallery under registered ActiveX controls. The path to the control indicates "System32\FM20.DLL".
Is there no easy way to include this .DLL in my project?
Thanxs for your help.
|
|
|
|
|
this might help...
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224305
|
|
|
|
|
Need algorithm 3d triangulation...
Tender_Nail
|
|
|
|
|
Tender_Nail wrote:
Need algorithm 3d triangulation...
cool
just ask this the way you do, it will fall down from the sky...
-> me, i need an algorithm for taylor-young development expands...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Here[^]. You can really choose what you want...
Seriously, you really think that people here will supply a full code of 3D triangulation algorithm without even knowing what you are speaking about ?
If you want some help, at leat have the respect to format your question correctly.
|
|
|
|
|
who's the F******g guy that voted me down ?!
GRRRRRRRRRRR
hum well, don't care about me, i just have to say that, and i didn't know where to write it... so i decided to say it to my new friend, mista cedric...
sorry for the "nuisance" (and for my bad english)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|