Visual C++ :: Creating DLL With Web Browser Embedded?

Sep 17, 2013

My earlier attempt to get an answer didn't work, so i want to make my question more straight forward.

Is it possible to create a C++ DLL with Web Browser like CDHtmlDialog embedded in it?

View 1 Replies


ADVERTISEMENT

Visual C++ :: Create Web-browser With ATL?

Aug 11, 2013

I'm trying to create a simple webbrowser at my app.

code sample:
....
ATL::CAxWindow m_wndContainer;
ATL::CComPtr<IWebBrowser2> m_spWebBrowser;
HWND hWnd = m_wndContainer.Create(NULL,
CRect(0,0,200,100),
(LPCTSTR)0,
WS_CAPTION|WS_THICKFRAME|WS_OVERLAPPED|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
CoCreateInstance(CLSID_WebBrowser,NULL,CLSCTX_INPROC,IID_IWebBrowser2,(void**) &m_spWebBrowser);
...

everything is work fine except the fact the it seems that it create an IE version 7.0 and my machine have IE 8 installed.

it not suppose to create the IE according to my installed version?how do i suppose to do it?

View 1 Replies View Related

Visual C++ :: Windows 8 Title Bars Inconsistent In Embedded Dialogs?

Nov 13, 2013

I have an SDI app created with VC2012. Main view is a CFormView and it's the parent to four embedded dialogs. All four dialogs have title bars. On three of them, the title bars looks as I'd expect. Normal size, text left justified. On the fourth, the title bar is noticeably thicker and the text is centered. All styles are the same as far as I can tell. The main difference is the one that's acting up has a browser control on it, the others just standard controls. It looks normal on Windows 7.

View 8 Replies View Related

Visual C++ :: Iterating Through Web Browser Controls?

Jan 31, 2013

there is a way to iterate through the controls on a webpage. For instance, I tried EnumChildWindows using the parent window of the browser, but I haven't had any luck - it returns nothing. s where I can start researching how to find the child controls?

I'm using Visual Studio 2010, programming in C++.

View 6 Replies View Related

Visual C++ :: JSON Undefined In Web-browser Container

May 19, 2013

I create an IWebBrowser2* object and attached it to new window.

I create also a simple html page containing JScript alert(JSON) command.

when i load the page from IE the page works fine.but when i load the page from my object i get JSON undefined.

do i need to set my object with some setting?

View 1 Replies View Related

Visual C++ :: Display CDialog App Inside A Web Browser Like IE

Dec 16, 2013

I am making a dialog app using CDHtmlDialog and all the controls are done using HTML.

Now i want to call/display this dialog inside a web browser like IE.

How can i do that?

If i could generelaize this question -

Is it possible to display a dialog app that is derived from CDialog inside IE?

If possible, how to do that?

View 7 Replies View Related

Visual C++ :: Calling ATL COM DLL Method (that Opens A Dialog) From Browser?

Oct 11, 2013

I have a COM Object created using ATL (without MFC Support)

The Object has 1 method that opens a Dialog (that does all the rest) and when finish - returns 2 values back (1 is enough)

Currently I call it from another EXE:

hr = CoCreateInstance(
CLSID_MyControl,
NULL,
CLSCTX_INPROC_SERVER,
IID_IMyControl,
(void**) &pMyControl
);

and then:

hr = pMyControl->MyMethod (ATL::CComBSTR(InputString1), ATL::CComBSTR(InputString2), &IntReturned, &IntReturned);

Is it possible to call it as is from a browser ?

How can I Instantiate the object and invoke my method (with params) from the browser ?

will it open the dialog ?

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

C# :: Ordering Of Embedded Resources

Oct 14, 2014

I have 10 or so .sql scripts (the number is likely to rise) which are required to be kept with a C# application.

For the most part the embedded resources seem to work fine , however I require a way in which to guarantee the ordering in which the files are run.

What I do currently:

Retrieve the details of the embedded resources using : Assembly.GetManifestResourceNames()

(and a bit of linq to filter based upon my requirements) which I pass to a list, I then later on use the list to grab the physical resource when its needed.

The files are named such as:

1_ScriptDescription.sql
2_ScriptDescription.sql
3_ScriptDescription.sql
10_ScriptDescription.sql <--- Here's my problem! This will come after 1_ScriptDescription.sql

Ideally I need a way in which to order the list or some kind of ordering when I pull from

Assembly.GetManifestResourceNames()

But I'm not really sure of a practical way to do this, I did consider manipulating the string .....

View 3 Replies View Related

C++ :: Modelling Device In Embedded System?

Oct 13, 2013

What I want to do is abstract and model a device (more specifically in this case, an IMU) in an embedded system.

Now, there are a couple of gotchas:

- It is basically a framework, which means that it should work with any device, any platform and any bus.

- It is an embedded system, so power consumption and memory consumption must be reduced. It is not a PC.

- It cannot be too complex, because I fear that will just make people scrap it and rewrite it from scratch :P

- It should aim for as little code as possible to write the whole model, of course. Adding 100 lines of code for each register would be a bummer.

That said, I must also model the current system, which means that the current platform, the current bus (which is I2C) and the specific IMU model (I have a datasheet).
So the model I am thinking of currently is this:

First, I have a platform. It will know what bus a device is connected on and contains the buses (or specifically, the instances of the buses). It consists of a specific class for each platform and a base. Here are the two I have now:

Code:
namespace Sensors
{
template<typename Platform_t> class GPS;
}
namespace Platforms
{
class RaspberryPi: public PlatformBase

[Code]....

Currently I am making the assumption that all platforms will have an I2c bus and UART bus, but I'm not sure about that. We have only one platform ATM, though, so for now this holds. I'm guessing I might have to move it to the specific platforms later and get rid of PlatformBase.GetI2CBus is a problematic one related to registers, but I'll get back to that.

UART is simple to model since it's just a block read and write, so:

Code:
namespace Buses
{
class UART
{
public:
UART(const std::string& UARTPath): m_Open(false), m_PathToUART(UARTPath) {}

[Code]....

I'm probably going to handle all errors through exceptions. So if I can't open the UART bus, I'll throw an exception.

The I2C bus is a problem. I have a model which deals with it on a register-based level, but ideally I'd like to be able to model and use the devices on the I2C bus on a flag-based level (ie, I have names for each individual flag in the registers which I can read or write to directly instead of writing a hexadecimal value directly to each register).

Here is code:

Code:
namespace Buses {
template<unsigned int Id>
class I2CDevice {
public:
I2CDevice(I2C& Bus): m_Bus(Bus) {}
template<typename T>

[Code]....

So I2CDevice does some checks to see that the data to write to a register is either 8 or 16 bits. It does not check that the size to write matches the register's size, but another class does not.

The idea is also that it checks which device is currently active on the bus, and if it's not the current I2CDevice, then it simply selects that before attempting to read or write (the Open call).

This is not meant for multi-threaded environments. Yet, anyway.

The Impl2::Read/Write just dispatches the call so it calls the correct function for writing and reading the correct size, depending on the size of the data.

This is all well and good, but I2C works with registers, so of course I want a class to model a register which I can read and write to directly. It must tie into the bus class since the bus class is the one that abstracts reads and writes on the bus.

The register class looks like:

Code:
template<unsigned int Bits, unsigned int RegisterId, typename Bus_t>
class Register {
public:
typedef typename Impl::RegisterBase<Bits>::Storage_t Storage_t;
static_assert(!std::is_same<Bus_t, Buses::UART>::value, "Cannot read and write registers on the UART bus.");
static_assert(Bits == 8 || Bits == 16 || Bits == 32 || Bits == 64, "Number of bits must be 8, 16, 32 or 64.");
auto Write(Storage_t Data) -> void

[Code]....

I think this explains itself, except for the Regs struct, which is an experiment by me to enable myself to access registers via Regs.Config, etc.

What is missing is the ability to access and read/write the individual bits inside the registers. I am thinking a two-way access, where you can write to individual bits, but must call .Write() to commit the write to the register for efficiency.

I haven't actually written this. I don't know a good way ATM. I don't want to add a lot of variables and a write function because that would use 1 byte for every bit which is unacceptable.

I don't want to add a lot of code to make it work, either. A good get/set class would be nice, but I can't see that working. The register must store all state and any subsequent classes must not store any state or overhead will increase.

Finally, yes, I know a lot is incomplete and untested. It probably won't even compile. But that is for later. First is finishing the model.

It would be nice if things such as the platform and buses could be made static because there will only be one instance at any time, and that would save overhead if I don't have to store objects or references to them, but I haven't figured out how to achieve this.

View 13 Replies View Related

C :: Pages Handling In Embedded Source

Jul 9, 2013

I'ma firmware writing, and usually use only C language (not my decision, unfortunately!).In many application we've only a text display (2 rows 16 columns ascii char, or 4x20 or something else). But the question can be used also for semi graphics panel and so on.

I'm looking for an example / library / sourcecode to handling all the pages in the project. When the program start you've a 1st page (wth info abt release, hallo screen and so on), then with a arrows buttons you can navigate throught many pages. Some of these can be called by SW (or HW) events. (Button, alarm, end of job ...) In abt 20 year of experience3 I?ve seen many type of different code.

View 1 Replies View Related

C :: How To Import CSV File To Embedded MySQL

Jun 6, 2014

I am trying to write a C code with embedded MySQL with server and client options. I am trying to important a csv data file for MySQL server and client.

I saw on internet like: LOAD DATA LOCAL INFILE 'data.csv' INTO TABLE test FIELDS TERMINATED BY',' LINES TERMINTED BY' ';

But I think that line is for SQL workspace. How to write in C format?

Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "/usr/include/mysql/mysql.h"

MYSQL *mysql;
MYSQL_RES *results;
MYSQL_ROW record;

static char *server_options[] = { "data.csv", "--defaults-file=my.cnf" };
int num_elements = sizeof(server_options)/ sizeof(char *);

[Code] ......

View 3 Replies View Related

C :: Data Handling And Structure For Embedded UAV Project

Apr 16, 2014

Data handling for a UAV project I am trying. My background is in Microcontrollers but I have never had exposure to "sound" programming practice...

I have got 2 microcontrollers to drive a UAV craft I've made. One "firmware" micro collects all the sensor data and then passes it to the other "application" micro for control processing. Once decisions have been made this is sent back to the "firmware" micro so that actions are taken.

So in essence I am sharing a raw data chunk periodically between the 2 processors that has outputs and feedback data. For the moment this is captured as one big buffer array on either micro after receiving. For easier structure I thought of bouncing this buffer that contains all sensor information and control variables between the 2 processors (visualize a ping pong game with all the possible variables from both micros - bandwidth between the micros is not a limitation) There are quite a few modules that want to access information from this buffer and write control actions back to it.

I was thinking of constructing a struct on both micros to access this "raw data" from the buffer and set it up with variable names so that it is easier for functions to read info and write controls back.

But this would mean that the data is accessible to every function, and there is the fear that some functions will write to the input data or write to control variables that they should not have access to. I also need to reduce memory copies and the like due to limited memory on each micro.

View 4 Replies View Related

C/C++ :: How To Convert From HEX To ASCII Conversion In Embedded Project

Dec 1, 2012

i am doing an embedded project on avr microcontroller ATmega8515.actually my project is smart card based electricity billing using UART interfacing..so in this module HEX to ASCII conversion is not possible for me...

how to convert from hex to ascii.

View 3 Replies View Related

C++ :: Open Text File From Embedded Resource?

Apr 19, 2014

I have the following complete code in c++

Code:
void GetMapData () {
MapPair NewMap;
string TempString;
BOOL SkipReadLine = FALSE;
//------
char buffer[MAX_PATH];
std::fstream File;

[code].....

The problem is that I do not want to have an external MapData.txt, rather I access it through a embedded text resource, which in this case I have no knowledge on doing so.

I have the following snippet which demonstrates to my knowledge on how to access a text resource; however, I do not know hot to modify the code above to implant this, but to still have the same functionality as the original code above.

Code:
HRSRC hRes = FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_TEXT1), _T("TEXT"));
DWORD dwSize = SizeofResource(GetModuleHandle(NULL), hRes);
HGLOBAL hGlob = LoadResource(GetModuleHandle(NULL), hRes);
const BYTE* pData = reinterpret_cast<const BYTE*>(::LockResource(hGlob));

note that I am compiling with a MBCS.

View 2 Replies View Related

C++ :: How To Create Member Function To Represent Embedded Task

Jun 17, 2014

The following code is an example of how task are created with micro cos III in c. I am trying to figure how to create similliar code in C++. My problem is how do I instantiate objects and how to use member functions to represent task. Within the create task routine the address of function is passed as argument. How do I do this in C++? Will I need more than one class? New to embedded C++.

/*!
* @brief LED Flasher Task
*/
void
led5_task (void * p_arg)
{
OS_ERR err;
(void)p_arg; // NOTE: Silence compiler warning about unused param.

[Code]...

View 2 Replies View Related

C++ :: Embedded Micro Controller - Pointer To Class Member

Sep 19, 2014

This project is for an embedded micro controller. In the project i wrote a class that generically services uarts. then i declare 6 objects of that class and hand them configurations for each specific uart.

internally all the objects have a send buffer of data that is still to be sent that gets populated by the object member function.

how can i make an array of function pointers that can point to the same member but of six different objects.

for example (not a working one)

class uart {
private:
struct myData {
unsigned char data[20]
int head
int tail
int count;

[Code] ....

View 9 Replies View Related

Visual C++ :: Creating DLL From Program

Jan 15, 2013

I wanna create a DLL from my C++ program. My output of my C++ program is a text file called Centre_Cartouche.txt My output is two text files called brd.txt and sym.txt

At the beginning my program was just a main which contains all development (Main.cpp). Now I created function (in _Cartouche.h and _Cartouche.cpp).

My debugger tell me that the simulation works. But my file Centre_Cartouche.txt is not create.

_Cartouche.cpp_Cartou.hbrd.txtsym.txt

View 1 Replies View Related

Visual C++ :: Creating PHP Array?

Oct 10, 2012

How could I create an array that would in PHP look like this:

PHP Code:

$something['argument1']['argument2'] = "some data to store"; 

View 14 Replies View Related

C/C++ :: Creating / Using GUI With Visual Studio 2013

Jan 24, 2015

How to create/use a graphical interface. Especially since Microsoft has removed Windows Form Application support from Visual Studio 2012 and 2013.

I know that Windows Form Application is still supported with C#, but C# is definitely not an option as the program I am developing is heavily depended on some of C++'s more advanced features not present in C#.

Is there an alternative to Windows Form Application? I would definitely prefer one, as I doubt that some workarounds would work for long. What are common ways to create a GUI application in C++? There certainly must be some ways. In Java one would use something like JFrame.

Crossplattformcompatibility: The program I am creating is a Microsoft Windows program only. So I don't care if it runs on Linux or Mac. It only has to run from Windows 7 onward. So if there are more than one standard ways to create a GUI, I would prefer the one working best for Windows.

By the way, I am using Visual Studio 2013.

View 11 Replies View Related

Visual C++ :: Creating DialogBar With Own Controls (MFC)

May 27, 2013

I'm turning mad with a little problem with Visual Studio 2008 and MFC. I'm working on a project actually and I'm trying to create an SDI Application. Right, now I want to add a dockable DialogBar. Well, the first time I added it with the resource view, I can create the bar without problems. But... I want to add some controls like a couple of ListBox, buttons and so on. The program doesn't allows me to create member variables for these controls. The option appears in grey.

Searching a little, I found that it's mandatory to create a new class derived from CDialogBar and "enhance" it with the Message handler and so on. I've been reading some tutorials and it didn't work for me.

View 14 Replies View Related

C++ :: Plugin For All Browser

Jan 11, 2013

I want to create a plugin with c++ which will be supported by all Browser,i am stuck how to start.

View 2 Replies View Related

Visual C++ :: Creating A Virtual Mini Server?

Jul 28, 2014

Is it possible to create a virtual mini server (like IIS) that takes http request? I have a toolbar that queries an DLL using http request, and then that DLL stores some arguments in some XML file, which is read by an anti-malware.

Now every customer can't have an IIS server installed. Most of the end users uses Windows XP home edition. So is there a way i can create a virtual mini server that can be used in these PCs for placing http request?

View 14 Replies View Related

Visual C++ :: Creating Matrix / Map For Topological Sort?

May 10, 2014

I am trying to simulate the logical circuits having NAND gates. I am reading the structure from .bench file. The structure of a circuit looks like below:

Code:
INPUT(1)
INPUT(2)
INPUT(3)
INPUT(6)
INPUT(7)
10 = NAND(1, 3)
11 = NAND(3, 6)
16 = NAND(2, 11)
19 = NAND(11, 7)
22 = NAND(10, 16)
23 = NAND(16, 19)

It can be seen that the inputs for Gate 22 are 10 and 16 which are also NAND gates. On the other hand, for gate 10, the inputs are 1 and 3 which are simple inputs. So, i need to sort the gates topologically. Although topological sort will not affect the output for this particular example but i have big circuits also in which topological sort is required. But we can use this simple example to do the topological sort.

My effort:I thought to create a map which will keep the information about the gate name and its indegree. But i am unable to proceed further.

Code:
void Circuit::topologicalSort()//topological sorting (for the mixed circuits) {
int counter = 0;
std::map<string, int> unsortTopoList; //this list keeps a track of gate name and its Indegree
for(int i=0; i<gates.size(); i++) {

[code].....

View 4 Replies View Related

Visual C++ :: Creating MAPI Property With CreateIProp

Apr 17, 2013

I have a problem creating a MAPI property. I have code like this:

Code:
intSetProperty( LPPROFSECT lpProfileSection, LPSPropValue lpPropValue) {
HRESULT hr;
LPPROPDATA lpPropData;
SPropValue spvEID;

[Code] .....

I want to create the choose_directory_Automatically property if its not exists. But I don't know how. If the CreateIProp method returns me a pointer in lpPropData how can I put the PropTag and the Value in it?

I have already implemented change the property if it exists already but the Outlook Addressbook stays on automatically until I or the user creates this property. I took a look with OutlookSpy at this property but I could not come any further.

View 1 Replies View Related

Visual C++ :: Creating DLL That Will Be Used As Plugin In External Program Using MFC

Jan 30, 2013

This is the problem in detail:

I have a VC++ project to create a DLL that will be used as a Plug-in in an external programm. This DLL uses some MFC functions. The initial configuration of the project was:

-Use of MFC: Use MFC in a Static Library

-Common Language Runtime support: No Common Language Runtime support

-Runtime Library: Multi-threaded Debug (/MTd)

This configuration worked fine, there were no compilation errors and the resulting DLL worked correctly.

The problem came when it was necessary to add to the DLL some functions of .NET, using the namespace System and similar. To do that, I had to change the Common Language Runtime support, to Common Language Runtime Support (/clr). Then, when I tried to compile, I got this message:

'/MTd' and '/clr' command-line options are incompatible

So I changed the Runtime Library to Multi-threaded Debug DLL (/MDd). Then I got this error message:

Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version

So I also changed the Use of MFC to Use MFC in a Shared DLL.

After this, the compilation was correct. Then logically the size of the generated DLL is smaller, but this new DLL does not work correctly, the external program in which this DLL is used crashes.

I don't know what to do to fix the problem. Maybe I need to add some other DLLs or files to the directory where the DLL is located, where the external program uses it. But I would prefer to include a single DLL file, but this seems to be incompatible with the use of .NET functionality.

View 11 Replies View Related







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