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


ADVERTISEMENT

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++ :: Making A Text Editor

Oct 24, 2013

when making a text editor do you have to create a parser for it or are parsers just used in compilers and interpreters?

View 6 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++ :: SDI CView Covered With Bitmap Resource?

Feb 10, 2013

I have an SDI / CView app (VS 2010). All works well until I minimize the app using the minimize button or drag it partially off of the screen. In the former instance, any attempt to restore the app results in an appcrash with a tight freeze up of the machine. In the later instance the same happens immediately.

In building the app, I scoured the web for code to accomplish the loading and display of the bitmap. After some experimentation I settled on overriding the OnPaint. Below is the code. Note that m_Map is a CBitmap member and IDB_BITMAP1 is a loaded bitmap resource.

Code:

void CMyDragViewView::OnPaint()
{
// CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CView::OnPaint() for painting messages
// http://msgroups.net/microsoft.public.vc.mfc/loading-bitmaps-into-main-window/563285
int x = m_Map.LoadBitmap(IDB_BITMAP1);
TRACE1(" x = %d
", x);
CPaintDC* dc = new CPaintDC(this);

[code]....

I suspect that the problem is OnPaint trying to repaint the bitmap which requires reloading it, but I don't know how to work around this.

View 3 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++ :: Generating Dynamic Resource File?

Jan 3, 2014

We want to generate dynamic resource file for VC++ where the data will come from database (Oracle).

For an example, When a user log in the system, at that time if User is an English User, then some data in english language needs to be loaded in vc++ resource file. If the user is French then French data will be loaded into the resource file.

Right now all the data are hard-coded in the resource file but we want to load it dynamically from database, based on the login-user language.

How to do this dynamic implementation as I am not able to find any such concept in google.

View 8 Replies View Related

Visual C++ :: How To Call A Dialog From Win32 Resource DLL

Jan 16, 2013

How can I call a dialog , which is present in a seperate Win32 resource DLL .

View 4 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 Call Dialog Window (formed As Resource) From DLL

Jan 19, 2013

Is there some document, that describe the sequence of actions, that result in displaying of a Dialog Window from a .DLL.

One important detail - the Dialog Window is created via resource/toolbox inteface.

Below is code from some example (which works), that displays simple window (with client area inside it).

In this code the window class is ctreated inside of application class.

Here is extract from application class:

Code:
class CMyWindow : public CFrameWnd {
CStatic* cs;
public:
CMyWindow();
};
CMyWindow::CMyWindow() {
Create(NULL, L"MyWindow", WS_VISIBLE, CRect(0,0,200,200));

[code].....

Where is my mistake ?

View 14 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 View Takes Hangs When Trying To Edit Rc File

Mar 15, 2013

Found an online suggestion of using an rc2 file and cut and paste stuff from .rc file to .rc2 file to see which line causes the problem but don't know how to create a blank .rc2 file. Problem started after I ported from VC++ 6 to VS2010.

View 5 Replies View Related

Visual C++ :: Set Background Color For Controls And Dialog - Resource Exception

Jan 5, 2013

I used onctlcolor() method to set the background color for the controls & Dialog. I run my application, working good but after 15 mins the below error occured,

Application Error:

The Required Resource Was --------> Shown message box

Program Error:

First-chance exception at 0x7c81eb33 in XRay.exe: Microsoft C++ exception: CResourceException @ 0x001274f8.
First-chance exception at 0x7c81eb33 in XRay.exe: Microsoft C++ exception: CResourceException @ 0x001259d0.
First-chance exception at 0x7c81eb33 in XRay.exe: Microsoft C++ exception: CResourceException @ 0x00123ea8.
First-chance exception at 0x7c81eb33 in XRay.exe: Microsoft C++ exception: CResourceException @ 0x00122380.
First-chance exception at 0x7c81eb33 in XRay.exe: Microsoft C++ exception: CResourceException @ 0x00120858.
Warning: Uncaught exception in WindowProc (returning 0).

what is the reason for that? How can i prevent my project from this problem.

View 12 Replies View Related

Visual C++ :: Doubly Linked List And Basic Text Editor

Sep 23, 2014

I'm supposed to make a basic text editor using a doubly linked list, I have pretty much written most of it but keep coming across several problems. In certain places,all marked in the code, I get the error "expected a declaration" ive looked online and nothing ive found works. And secondly I also get the error" declaration has no storage class or type specifier" but i havent been able to find anything that works either.

Code:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <assert.h>
#include <string>

[Code] ....

View 6 Replies View Related

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 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++ :: Debug Assertion Failed With MessageBox

Mar 22, 2014

I am trying to use MessageBox in OnInitialUpdate function but its giving me "Debug Assertion Failed Message"

File: f:ddvctoolscrt_bldself_x86crtsrcvsprintf.c
Line:244

I am using the following code:

Code:
void CRotateImageView::OnInitialUpdate() {
int k;char str[2];
CView::OnInitialUpdate();
CString szStr,szstr1;

[Code] .....

However when i am using the same code in OnDraw its working.

Code:
void Csprintf_sEGView::OnDraw(CDC* /*pDC*/) {
Csprintf_sEGDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;

[Code] ....

View 3 Replies View Related

Visual C++ :: Debug Assertion Failed Due To Use Of Ifstream

Mar 11, 2014

I am trying to run the code below but I receive the following error message :

Debug Assertion Failed!
Program: C:TestDebugTest.exe
File: c:program filesmicrosoft visual studio 10.0vcincludevector
Line:932

Expression:vector subscript out of range

Code:
#include <fstream>
#include <cstdlib>
#include <iostream>
#include <strstream>
#include <cstring>
#include <cmath>
#include <map>
#include "Swap.h"
#define SIZE_X 100

[Code] .....

View 14 Replies View Related

Visual C++ :: Error / M4 Failed With Exit Code 255

Dec 8, 2013

Basically, I'm moving a VC project from my Windows 7 build machine to a new build machine that's running Windows 8.1. One of the pre-build steps (for a particular project) runs a script which needs to call the M4 macro processor (which is installed on my C: drive). I've been pretty careful to set everything up the same on both machines (including my PATH) but when I try to build the project on my Windows 8 box, MSVC's IDE shows me this error output when running the script:-

m4 failed with exit code 255

View 5 Replies View Related

Visual C++ :: MFC- Receiving Button Click Message Failed

Oct 2, 2014

I've created a new dialog in my MFC dialog based application. the new dialog contains 5 control buttons. The following happens and I don't understand why?

1. click on buttonX. (result ok, OnBnClicked message is sent)
2. click on on any place of the application, but not on the dialog.(removing focus from dialog)
3. click again on buttonX (FAILED, OnBnClicked message is NOT sent). but if instead I click on any other button in the dialog (result ok, OnBnClicked message is sent).

And when I do:

1. ...
2. ...
3. click on the dialog area just to set focus on the dialog again
4. click again on buttonX. (result ok, OnBnClicked message is sent)
**I need to do step 3 only if I want to click again on the buttonX! why?? I think it related to SetFocus() but I m not sure how.

I've tried different style like, tool windows, overlapped, popup. it happens in all the cases.

Code:
class CToolsDlg : public CBDialog {
DECLARE_DYNAMIC(CToolsDlg)
public:
CToolsDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CToolsDlg();
CToolTipCtrl m_ToolsTips;

[Code] .....

View 6 Replies View Related

Visual C++ :: Opening A File From Local Path - GetStatus Failed?

Aug 1, 2013

I am trying to open a file from local Path by the follwing code

CString csRegExtractFileRemote;
CFileException ef;
CFileStatuscfsStatus;
CFile cfSAP;
csRegExtractFileRemote = "c:SWRemoteFilesample.txt";

[Code] ....

Compilation is success full ,but i am observing that some junk value is there in the path variable. After Reaching If statement cursor went to final return statement ...

View 2 Replies View Related

Visual C++ :: Can't Initialize Struct With CString

Apr 7, 2013

I'm trying to compile the following and it doesn't work? How can I get the CString to initialize.

Code:

struct print {
int x; //row
int y; //col
int fid;
CString *data;
char *format;

[Code] .....

the char *format is not a problem, but compiler doesn't like CString *data;

tried CSting data and that also doesn't work, typecasting didn't work either?

View 14 Replies View Related

Visual C++ :: Initialize Constructor In Array Of Objects?

Oct 28, 2012

What the best way to initialize a constructor in an array of objects?

Usually I declare an array of objects like so:

Code:
Car toyota[100];

Is this the only way I know to initialize a constructor of an array:

Code:
for (int i = 0; i < 100; i++)
{
toyota[i] = Car(x, y);
}

Is this the proper way?

View 1 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

C# :: Simple Map Editor In Winforms

Mar 20, 2014

I want to create a simple map editor in winforms. I would like for it to use a tile sheet from the user which they then can click on tiles from it and place it on the specified grid. Then export this as a binary file. Or perhaps it would be easier for the user to chose the grid size then have each grid space's number be able to be changed like 01,02,03 to represent an image. Then export this as a binary.

View 1 Replies View Related







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