Visual C++ :: Is It Worthwhile To Write ActiveX Module Dedicated To Drawing Charts

Oct 22, 2014

I know the user installation must involve some registry manipulations and some other trickery. But the ActiveX way seems to be more modular.

Is it worthwhile to separate the charting modules from the exe and make an activex dll for this purpose?

View 5 Replies


ADVERTISEMENT

Visual C++ :: Convert C# Module Into Unmanaged DLL?

Oct 21, 2014

I am in need to convert some C# code into C++ equivalences. But I don't want to spend the efforts to do so. Is there an handy way to convert an existing code of C# into C++ (unmanaged code)?

View 7 Replies View Related

Visual C++ :: ActiveX For Video Server

Jan 13, 2015

I would like to know in which way is the best to make ActiveX control for video. ActiveX control will need at least show picture and be able to go back in past, change resulation of picture and similar. How complex it is to do something like that? Is MFC best way to make it? Is there somewhere similar code?

View 2 Replies View Related

Visual C++ :: Adobe ActiveX Integration

Mar 17, 2014

I'm trying to open PDF file in my MFC application. For this I have installed Adobe Reader 10 and added the ActiveX from resource editor to my dialog.

Created a variable of that type and trying to use that. Class wizard has generated "class CPdf1 : public CWnd" for me and that's added to project.

Now when I'm trying to create the control window getting Assertion failure. Using the below code in my OnInitDialog / some button clicks.

Code:
m_PDF.Create(_T("Reader Window"), WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 300), this, 2009);

Am I missing some steps ?

View 4 Replies View Related

Visual C++ :: Passing Pointer Into ActiveX Control?

Oct 21, 2012

I'm writing an ActiveX control. In one of the functions I'd like the user to be able to pass me a pointer to a buffer that they created which I can then fill with data and return a success/error code. What's the appropriate way to do this? I was thinking about just using an OLE_HANDLE type for the parameter and then casting that to pointer inside the OCX but I'm not sure if that's safe or the right way to do it.

View 2 Replies View Related

Visual C++ :: Debug Assertion On ActiveX Create

Oct 10, 2013

I have a MFC Com Dll that has a CDialog. In the OnCreate event I create an ActiveX control. The dll is hosted inside an executable of mine. In this scenario everything works fine!

The dll is also called from an external executable and then a Debug Assertion in OCCSITE.cpp occurs when I create the ActiveX control. I suspect that in the executable there is no AfxOleInit. I spend some time with this problem and tried to CoInitialize, OleInitialize, AfxOleInitModule and even AfxOleInit in the dll. But all that does not change a thing. If I understand the mechanics then this is an intended behaviour and should be done in the host exe.

What I observed in the OCCSITE.cpp:

Code:
_AFX_THREAD_STATE* pState = AfxGetThreadState();
if (!pState->m_bNeedTerm && !AfxOleInit())
return hr;

In my executable m_bNeedTerm is 0 and in the external one (where the ActiveX does not work) it is -1. In AfxOleInit this is explained as a special flag to prevent the dll from doing an unnecessary OleInitialize. But as I said even if I call OleInitialize myself I get the Debug Assertion and the ActiveX is not visible.

Is there anything I can do to make the ActiveX control work in the external application? Obviously I cannot Change anything in the application...

View 1 Replies View Related

Visual C++ :: Automation MS Word In ActiveX Container

Jan 20, 2014

I`m working with MS Visual Studio 6. Trying to connect Word server with my window. This is call server in my class CXContainerView, inherit from CScrollView:

Code:
void CXContainerView::CreateWord() {
::CoInitialize(NULL);
_Document doc;
_Application m_app;
LPDISPATCH lpDisp;
CLSID clsid;

[Code] ....

It works in debug version but falls in release. Feels my fifth point, what I call it in the wrong way.

View 6 Replies View Related

Visual C++ :: How To Add Images To Toolbar Buttons For Activex Control

Aug 8, 2013

//#import "c:windowsSysWow64mscomctl.ocx" raw_interfaces_only //in window7

using namespace MSComctlLib;
CComPtr<IButtons> pButtons;
CComPtr<IButton> pButton;
CComPtr<IImages> pImages;

[Code] ....

View 11 Replies View Related

Visual C++ :: Resource Editor Failed To Initialize ActiveX

Feb 27, 2014

I'm working on a project which consists of several ocx loaded by one exe. The platform is WinCE. Now I'm on a process to create a new ocx. I do have a copy of those ocx projects in Win32 platform. These Win32 versions were only used to register ocx in local system and then put those on to application dialog by 'Insert ActiveX'.

Now the problem is those Win32 projects are so outdated, and unable to build. Getting too many linking errors to be solved.

I have build the new ocx and link that with exe manually by editing .rc file and all. But still no luck. New ocx is getting registered in WinCE device but failing to start application.

View 6 Replies View Related

Visual C++ :: ActiveX Web Browser Control Not Deleting Session Cookies Even After Closing

Aug 9, 2013

I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application. The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.

But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.

So, Do I need to delete the cookies explicitly? If Yes, How to do that?

View 2 Replies View Related

Visual C++ :: Drawing Text On A Bitmap?

Oct 5, 2012

I wrote a simple clock that shows the time over bitmap as follows:

Code:
void CMyClock::OnPaint()
{
CRect rect;
GetClientRect(&rect);

[Code]....

Now I got rid off the white border but everytime I draw a text it write on top of the previous text so after few seconds everything is a mess and the time is no longer readable.

View 5 Replies View Related

C++ :: Using One (dedicated) Vector Per Thread (OpenMP)

Apr 11, 2013

I recently picked up multithreading with OpenMP, so it is still new to me. While processing data, I would like to store it in a vector, as shown here:

vector<int> vect;
#pragma omp parallel for
for(int c=0; c<500; ++c) {
vect.push_back(c)
}

However, since it is multithreaded, I would like (and need!) to have one dedicated vector per thread. I haven't been able to find an example of how to do this online. Is it even possible?

View 1 Replies View Related

Visual C++ :: MFC Coordinate System - Drawing Of Angles?

Oct 11, 2013

I am drawing in a simple (square) MFC window. I realize that (0,0) starts in the upper left hand corner. I wanted to see how MFC handled drawing of angles, so I use this code:

Code:
double CompassDegreesToRadians(double compassDegrees) {
return((PI / 2.0f) - (compassDegrees * PI / 180.0f));
}
// Make pen
CPen penRed;
penRed.CreatePen(PS_SOLID | PS_COSMETIC, 1, RGB(255, 0, 0));
// Test Angles

[Code] .....

Using this code, and changing the value of angle1 to these values (0, 90, 180, 270) I think MFC uses the coordinate system:

Code:
180 -y
|
|
-x 270---------------- 90 +x
|
|
0 +y

This seems like a strange coordinate system to use. Am I doing something wrong? If this is correct, how can I convert my calculations to this coordinate system? (compass degrees):

Code:
0 +y
|
|
-x 270---------------- 90 +x
|
|
180 -y

View 4 Replies View Related

Visual C++ :: Drawing A Rubber Band Rectangle

Jan 23, 2015

I am trying to draw a rubber band rectangle. I have got a following code from a site but its giving an error:

Code:
class CSampleView: Public CView{
...
public:
CrectTracker m_tracker;//Changed to CRectTracker
...
};

Secondly, in the constructor to initialize the object CRectTracker document class:

CSampleDoc :: CSampleDOC () {
// Initialize tracker position, size and style.
m_tracker.m_rect.SetRect (0, 0, 10, 10);
m_tracker.m_nStyle = CRectTracker :: resizeInside |
CRectTracker :: dottedLine;
}

The error is:

error C2065: 'm_tracker' : undeclared identifier

How to get rid of this error??

View 4 Replies View Related

Visual C++ :: Custom Pyramid Drawing Program

Jul 6, 2014

I am trying to figure out how to create a program that will draw a triangle using *'s with a base the has a user-inputted number of *'s like so:

*
***
*****

It needs to take a user inputted number and draw a pyramid like the above pyramid with the number of *'s in the base matching the user inputted number (i.e., user enters 10, so the triangle has 10 *'s in the base). I figured it would be best to first create a loop to draw out the correct number of *'s before trying to create another loop to draw out the correct number of spaces, to properly align the *'s into a triangle shape.

int width = 0;
int height = 0;
int i = 0;
int leafWidth = 0;

[Code] .....

View 7 Replies View Related

C++ :: Writing Pseudo Code And Flow Charts

Apr 15, 2013

I have finished writing the code for the following program. I have concerns with the pseudo-code that I have written and the flow chart seems really complicated. I dont know how to build it. Here is the question:

An Internet service provider has three different subscription packages for its customers:
Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.
Package B: For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month unlimited access is provided.

Write a program that calculates a customer s monthly bill. It should ask which package the customer has purchased and how many hours were used. It should then display the total amount due.

Input Validation: Be sure the user only selects package A, B, or C. Also, the number of hours used in a month cannot exceed 744

Here is my program:
#include <iostream>
using namespace std;
int main() {
char package;
int hours;

[code]....

What should be my pseudocode and flowchart ? Can i copy and paste my pseudocode here ?

View 2 Replies View Related

Visual C++ :: Control For Owner-drawing Items With 1 Or 2 Columns?

Jan 22, 2014

I want to show a list of graphical items in 1 or 2 columns (user selected). I will draw the items (owner-draw). I tried many hours today to find a solution with clistctrl. Is it possible to make it with clistctrl?

View 14 Replies View Related

Visual C++ :: Drawing Analog Clock - Sleep Function

Jan 19, 2015

The question says: Make an "analog clock" that is, a clock with hands that move. You get the time of day from the operating system through a library call. A major part of this exercise is to find the functions that give you the time of day and a way of waiting for a short period of time (e.g., a second for a clock tick) and to learn to use them based on the documentation you found. Hint: clock(), sleep().

OK, I wrote below code. It is in its primary stages and has not been completed yet.

Code:
#include <GUI.h>
#include <time.h>
#include <iostream>
using namespace Graph_lib;
//---------------------------------
class Dynamic_clock : public Window {

[Code] .....

I expect the system in void clock_hands() (line 38) attaches hour1 (line 41) then waits for 1000 ms (using Sleep(1000)) then detaches hour1 and attaches hour2 this time. But it doesn't occur in practice. When the system reaches Sleep(1000); it seems to go into a comma! It doesn't show the hour1 so seeing the movement of clock ticks by the clock's hands will not be possible.

[URL] ....

View 14 Replies View Related

Visual C++ :: Drawing (radius Sized) Lines From Center To Boundary Of Circle

Feb 3, 2014

I am facing a programming logic problem. I want to draw radius sized lines from centre of circle to the circle boundary.

My code is:

int x1, y1, x2, y2, i, r, old_xc,old_yc, x,y;
int xc, yc;
x1=170;
y1=300;
x2=70;
y2=400;
pDC->Ellipse(x1,y1,x2,y2);

[Code] .....

The lines are touching the circle boudary at only start while the rest of lines are smaller and the shape is a triangle instead of a pie slice.

View 8 Replies View Related

C :: Using Timer Module In PIC Microcontroller

Feb 28, 2013

how to produce a period signal that lasts 0.100 ms that is 35% red and 65% green using a bi-colour LED and the timer module?

while(ReadTimer0() < (unsigned int)165)

Its using this: OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32);

So does that mean that the period signal is 165 * 32 * 4/32 = 660 = 66%? I really just need to know how to calculate the period signal to produce 35% red and 65% green..

View 1 Replies View Related

C :: Currency Conversion Control Module

Nov 3, 2013

Code:
/*Currency Conv Control Module*/
#include <stdio.h>
#include "currencyconv.h" /* defines constants, declares functions */
int main(void) {

float us_dollars;
float currency;
int user_input;

[Code] ....

This is $$ converter program I created that is split up over 3 files. It takes the users input in US Dollars and converts it to the currency selected. When executing the program I am encountering a small problem. It actually isn't converting anything and returns 0.00 dollars.

I would like for it to convert the amount entered into the currency selected. I would also like to add in the print statement the type of currency the user has selected.

View 3 Replies View Related

C++ :: Adding Large Numbers And Calculate Module

Sep 7, 2013

Exmaple:
112121276783621784678236478236478623784672364782367846237846782364782367846238 + 783627846782364786237846782364782367846237846782364782367846237846237864782367846238

It should be efficient and fast. It is useful to calculate the Factorial 100000, and then I calculate the number of the module.

Example:
132142344564378657834657834657863785634786578346578346785634785678653478 % 124623874

View 2 Replies View Related

C++ :: Unload A DLL Module And Leave All Critical Section On It

Jul 9, 2013

I am facing an issue with re entrance of one of my dll module. I had MLClient.dll which load in to program using LoadLibrary(MLClient.dll)

boost:: shared_ptr will add a lock() on this Load & initialization of library.

Due some of my requirements I want to un initialize this library and unload.?

How can i do the same with windows functions.?

How can i leave the lock on library using boost::shared_ptr.?

un load if there is a lock() on it ?

View 1 Replies View Related

C++ :: File Save Routine - Blank Records In Module

Jul 10, 2013

I have faced a strange problem in File Save Routine. I have written a module to save data to binary file . I have designed a structure and put information in that and save it to file . I save multiple such records one after other. I use fwrite , fflush instructions.

The module is working fine. I have saved near about 35 such files. But in one file , the module has saved Blank Records. The file size if perfect but the file is totally blank. It has happened for only one file but need to know the reason.

View 14 Replies View Related

C# :: ActiveX Control In Separate Thread

Jun 19, 2014

I have a method that does some extensive work (retrieves a list of emails from an imap server). What i wanted was to add a flash movie that would start playing when the method is entered and will stop when the method finishes. Something like this:

private void RetrieveMails() {
PlayFlashMovie();
RetrieveMailsFromServer{};
StopFlashMovie();
}

The flash movie plays, but the speed is horrible, almoust frame by frame (it actually matches the stepping of the foreach method that fetches the mails from the server as i can see it retrieving one mail - the movie plays one frame and stops; retrieves another mail - the movie plays another frame and stops.).

In the loop that retrieves the messages, i added Application.DoEvents(); so that is not the problem.

Now i am thinking of somehow playing that flash movie on a separate thread that will not hang synchronous with the retrieving mails loop but i don't know how would i do that...

View 2 Replies View Related

Visual C++ :: Read And Write XML?

Sep 8, 2013

I receive a telegram in XML format and I need to parse it and send my data in the same format back. My main problem is that I'm not allowed to use any open source software or other 3rd party software except VS2010. I have to write it in C++.

Now my question: is there any good tutorial for such a parser? I was hoping that I could write something which can be used similar to the GEtPrivateProfil-functions which are handy for ini-files.

My XML telegram looks like hat:

Code:
<Tag0 cmdId=“254“ version=“1“ ID=“87951“ action=“doing1“>
<!—comment1 -->
<Tag1 lId=“31“ type=“12“ index=“100“ state=“open“ />
<Tag1 lId=“31“ type=“12“ index=“135“ state=“open" />
<!—comment2 -->
<Tag2 lId=“42“ type=“32“ index=“2“ state=“open" >
<param key=“pos“ value=“center“ />
<param key=“car“ />
</epr>
</Tag0>

I was hoping to find a way to get to know how many tag1 and tag2 are in tag0 and then get for each tag the attributes and sub-tags like param in tag2

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved