|
Just build ocx in debug mode, insert it into VB Form, build VB EXE. In VC Project Settings, point executable for debug session to that exe file. F5 to debug.
|
|
|
|
|
Could anyone help me with Schewchuks method for automatic triangualtion? I've downloaded the C version but am having dificulty running it through Microsft Visual C++. Is there a C++ version out there or a guide to using it
TIA
|
|
|
|
|
Anonymous wrote:
I've downloaded the C version but am having dificulty running it through Microsft Visual C++.
Why? What difficulties are you experiencing? Without knowing any details, it's going to be hard to offer any useful advice.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
What did you try exactly ? I just opened a Visual Studio .Net command prompt and
typed "cl triangle.c". After uncommenting the #define NO_TIMER, it compiled for me.
Peter B.
|
|
|
|
|
I'm looking for algorithms / implementations for fast conversion between arrays of float, double and int. Array length can be up to 128K.
All I found was "a fast round()" float|double -> int, but also not optimized for arrays.
I did hope the Intel performance Libraries offer something, but I couldn't find anything.
Any takers?
we are here to help each other get through this thing, whatever it is Vonnegut jr. boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
This site contains a good reference to the issues, but no actual solution for arrays. However it's likely that if inlining is switched on the overhead of the loop should be minimal. http://mega-nerd.com/FPcast/[^]
however you might want to look at a full assembly using SSE/SSE2 instructions to do this in parallel or to prevent the repeated fld instructions. This isn't my area of expertise but perhaps this would be a good starting point: Conversion Operations[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
IoCreateDevice's third parameter is DeviceName, while IoCreateSymbolicLink's
first parameter is SymbolicLinkName. what is their full path name?
I don't known the difference between "\\Device\\DrvFltIp","\\DosDevices\\DrvFltIp" or "\\??\\DrvFltIp"
|
|
|
|
|
Not quite a full answer, but here's code I use to work with a FILE_DEVICE_UNKNOWN device that just needs simple start/open/read/close ops.
I use the following code to setup names for my device - "\\Device\\TestDriver4" is used to identify the device for the CreateService calls 'name of service' - (TestDriver4), while "\\DosDevices\\TDRV4" enables opening of the device with CreateFile as "\\.\TDRV4".
#define TDRV4_INTERNAL_NAME L"\\Device\\TestDriver4"
#define TDRV4_SYMBOLICLINK_NAME L"\\DosDevices\\TDRV4"
In my drivers TDrv4_CreateDevice0 fn, the internal name is used in IoCreateDevice, and the symbolic name (aka file name) is used in the call to IoCreateSymbolicLink.
RtlInitUnicodeString( &ustrInternalName, TDRV4_INTERNAL_NAME);
result = IoCreateDevice( pDriverObj,
sizeof(TDRV4_DEVICE_EXTENSION),
&ustrInternalName,
FILE_DEVICE_UNKNOWN,
0,
FALSE,
&pDevObj);
if(NT_SUCCESS(result)) {
pDevObj->NextDevice = NULL;
pDevObj->AttachedDevice = NULL;
pDevObj->DeviceObjectExtension->DeviceObject = pDevObj;
pDevExt = (PTDRV4_DEVICE_EXTENSION)(pDevObj->DeviceExtension);
if(NT_SUCCESS(result)) {
RtlInitUnicodeString( &ustrSymbolicLinkName, TDRV4_SYMBOLICLINK_NAME);
result = IoCreateSymbolicLink( &ustrSymbolicLinkName, &ustrInternalName);
}
yada
yada
yada
hth
|
|
|
|
|
how to add ActiveX control in a MDI application using VC7
i want to add the windows media player Component in my project to open it in a window inside my application .
|
|
|
|
|
On your menu, go to 'Tools', then 'Add/Remove Toolbox items...' Select the tab labeled 'COM Components' and find the control you're looking for in the list. It'll be added to your toolbox. It'll probably add some classes to your project also.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Hello,
I am working with the development of ActiveX controls in VC.NET
In my project I am using the following Classes.
1. App class (added by framework)
2. Ctrl Class (added by framework)
3. CMyclassFrameWnd class(added by me and derived from "CFrameWnd" class)
4. CMyclassView class(added by me and derived from "CView" class)
Now, I am creating a frame window in the control and connect a view created to this frame window.
coming to the matter, I want to add a mouse click event to the ActiveXcontrol.This event should fire upon clicking the View(View Class) area of the cotrol.
How can I do this?
With thanks in advance,
Jahfer,
eSoft.
|
|
|
|
|
In your ClassView pane, there should be an entry for whatever the name of your project is with 'Lib' on the end of it (something like MyControlLib). Under that node there should be a node that ends with 'Events' (something like _DMyControlEvents). Right-click on this node choose 'Add' from the popup menu, and select method. Specify the things you need for this event like any parameters. Then in your mouseclick handler, call this method before or after any default processing depending on what you want to allow the user to be able to do.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
I HAVE A FEW QUESTIONS......GLAD IF ANYONE U COULD GIVE ME A HAND....
1)what is the difference between WM_PAINT and WM_NCPAINT
2)IF MY DIALOG DRIVEN PROGRAM (Xyz)......HOW DO I CALL THE CXyzDlg::OnPaint()....FROM AN ANOTHER CLASS SAY CMYSTATIC???IS IT POSSIBLE TO CALL IT???
THANX....ALOT IN ADVANCE...
|
|
|
|
|
Easy on the caps lock .
WM_PAINT is sent to a window when the client area (i.e. the bit in the middle where your controls etc go) need to be repainted.
WM_NCPAINT is sent to a window when teh non-client (NC) area (e.g. the title-bar, and borders) need to be redrawn.
You can cause the OnPaint function to be called by invalidating part of the window (I believe, it may require slightly more than this, anyone?) - I believe the function you're looking for is CWnd::InvalidateRect().
HTH,
--
Andrew.
|
|
|
|
|
Andrew Peace wrote:
I believe, it may require slightly more than this, anyone?
Yes, you will need to call say UpdateWindow() .
I personnally like RedrawWindow() as you do not need to use Invalidate() or InvalidateRect() , the region is specified within the parameters to RedrawWindow()
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
wait a sec.....
what is the difference between Invalidate() and UpdateWindow()......arent they both used for repainting??
can u enlighten me on thiz plz!!!!!
thanx....for the prev answer!!!!!
|
|
|
|
|
Invalidate marks a region that it needs to be repainted but does not cause a WM_PAINT message to be sent.
On the next WM_PAINT message the region is repainted.
UpdateWindow will send the WM_PAINT message.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
easy on the caps....lol....ok....
thanx for ur reply.....
can u tell me how can i call the Onpaint() function of the dlg class from an another class say CMyClass??
thanx for ur help.....
|
|
|
|
|
Either call UpdateWindow() or RedrawWindow() from the CDialog based class.
or
Use SendMessage() to send a WM_PAINT message to the dialog window.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
just one more question.....;)
can u tell me how can i call the Onpaint() function of the dlg class from an another class say CMyClass??
right now i use the timer function which is defined in the dialog to update the dialog box......can u suggest an another method whereby which i am able to call the OnPaint() function of the dialog class from the CMyClass???
NOTE:actually the CMyClass being a derived calss ......i have put in message handlers such as 'mousemove()'...etc....and when such mouse action takes place......it is supposed to update the dialog box......
thanx a lot for ur prevoius replies.....
|
|
|
|
|
The easiest way to do this is to pass a pointer to the dialog into the CMyClass. We will call the dialog CMyDialog.
CMyClass header file
public:
void SetDialog(CMyDialog* pDialog);
<p></p>
private:
CMyDialog* m_pDialog;
CMyClass cpp file
void CMyClass::SetDialog(CMyDialog* pDialog)
{
m_pDialog = pDialog;
}
<p></p>
void CMyClass::SomeUpdateFunction
{
m_pDialog->Invalidate();
m_pDialog->UpdateWindow();
or
m_pDialog->SendMessage(WM_PAINT, NULL, NULL);
or
m_pDialog->RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
}
Notice that I have given you 3 alternative ways to do the update in the update function.
I have made the assumption that Within the CMyDialog class you have defined the CMyClass as follows
CMyDialog header file
CMyClass m_MyClass;
CMyDialog cpp file
BOOL CMyDialog::OnInitDialog()
{
:
m_MyClass.SetDialog(this);
:
return TRUE;
}
Hope that this is clear
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
:-Dyes....thanx for the reply.....
u c to do this.....i have to include CMyDialog.h file in the CMyClass.h file.....
but the CMyClass.h is included in the CMyDialog.h file.....so what happens.....
i get errors.....something like....."';'is missing" and meany unresolved errors.....
statements that didnt have errors before.....
but i like the idea.....
getting the address thru pointers .....never struck me.....
so what i did next was the that all the variables that i needed from the CMyDialog class I had made pointers to get their address and gave to to the CMyClass(using the SetDialog(*var1,*var2,,,,)).....
then what i did is that i BitBlt it in the CMyClass itslf rather than doing it in the CMyDialog.....
funny.....i didnt get any errors or warningz.....but it didnt work.....i meant the windows error box opened up asking whether to debug or sen or not to send the error report.....
any ideas???
thanx a lot.....u helped me lot.....i owe u.....
|
|
|
|
|
I have overloaded the CTreeCtrl::OnCustomdraw ( NMHDR* pNMHDR, LRESULT* pResult )
Function and would like to make the item texts Bold.
Can I use the NMLVCUSTOMDRAW struct. I have tried looking in MSDN.
I successfully have changed the text color with the following code:
<br />
void CSimpleTreeCtrl::OnCustomdraw ( NMHDR* pNMHDR, LRESULT* pResult )<br />
{<br />
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );<br />
pLVCD->clrText = RGB( 210, 65, 20 );
}<br />
Any suggestion how to change the font… ?
_____________________________
...and justice for all
APe
|
|
|
|
|
You just need to select the font into the NMLVCUSTOMDRAW's dc.
You will need to create a member font variable that will be used throughout the life of the control.
NMTVCUSTOMDRAW* pTVCD = (NMTVCUSTOMDRAW*)pNMHDR;
*pResult = CDRF_DODEFAULT;<br>
switch( pTVCD->nmcd.dwDrawStage )
{
case CDDS_ITEMPREPAINT:
{
SelectObject(pTVCD->nmcd.hdc, (HFONT)(*m_pFont));
*pResult = CDRF_NEWFONT;
}
break;
default:
break;
}
I Dream of Absolute Zero
|
|
|
|
|
OK It worked... but...
When making a bold font the text became wider an the last letters in is missing in the text-area... Do you have any cure for that?
_____________________________
...and justice for all
APe
|
|
|
|