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


ADVERTISEMENT

Visual C++ :: How To Control Toolbar Dynamically

Sep 21, 2013

I want to control my toolbar dynamically.

First I added tool bar with style including TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_LIST.

Then added the tool bar to a rebar. I added tool tips by handling TTN_GETDISPINFO.

Everything works fine. But when I try to add text to right of the button, the text
gets added but button size is not automatically changing.

The following code is not working .

void SetToolbarText(HWND& hwndToolbar,LPTSTR szText)
{
ATLASSERT(::IsWindow(hwndToolbar));
TBBUTTONINFO tbbi = { 0 };
tbbi.cbSize = sizeof(TBBUTTONINFO);
tbbi.dwMask = TBIF_TEXT;// | TBIF_SIZE;//if I add TBIF_SIZE code will work!
tbbi.cchText = 0;
tbbi.cx = 200;

[Code]...

View 1 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++ :: 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# :: 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# :: Create GUI Application That Can Resize Also Control Buttons?

May 23, 2012

how can I create a GUI application that can resize also the control buttons. If the user decide to make the windows bigger or smaller I would like my textbox, buttons, etc.. to follow. Like in Java they use a layout manager, but I can't seem to find the answer for c#. I though to use table layout panel, but it doesn't expand when expanding the windows, unless i miss something

View 3 Replies View Related

C++ :: Parse TXT File - How To Get X And Y Coordinates Of Each Control Points From 2 Images

Jan 30, 2013

I have a text file with the following format

//MAIN OBJECT
Object = ControlNetwork
Created = 2013-01-28T12:26:17

//FIRST CONTROL POINT OBJECT
Object = ControlPoint
PointId = 1

[Code] ....

I want to get the X and Y coordinates of the each control points from 2 images.

For example, from the above file i want to retrieve such information:

-PointID=1 and point coordinates are 802,725(from image1) and 480,708 (from image2)

-PointID=2 and point coordinates are 317,130(from image1) and 128,116 (from image2)

There can be millions of points in such a text file. So what is the best way to parse these files?

View 1 Replies View Related

Visual C++ :: Create A New Toolbar With Icons?

May 23, 2013

how to create a new toolbar with my icons in vc++?

View 3 Replies View Related

Visual C++ :: Toolbar Position Tracking

Apr 19, 2013

How to detect when mouse pointer entering on toolbar .

View 2 Replies View Related

Visual C++ :: CMFC ToolBar - Can't Change Title?

May 1, 2014

Visual Studio 2013. C++.

Created a blank, SDI MFC app.

I added a new CMFCToolBar (by hand, didn't use a wizard)

It docks OK. The commands work OK. It renders OK. No problems there.

In the code, attempting to set the window text of this toolbar has no effect. The title bar text is always "Standard". I triple triple triple checked to make sure I don't have any resource ID conflicts. In a small app as this, it was pretty easy to verify this.

The toolbar also does not show in the menu illustrated in the screenshot. (The bottom, undocked toolbar should be titled "My Page Bar" and I think it should show up in the popup menu.)

I know I'm probably missing a simple step somewhere, but I haven't seen it. It looks like its getting mixed up with the Standard Toolbar resource ID somewhere but I could see nothing in the .rc or resource.h files.

View 9 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++ :: Tool Tips Not Showing - Toolbar Menu Items Disabled / Inactive

Jan 8, 2014

My problem is ToolTips are not shown if any of the tool-bar menu items is disabled/inactive.

They are shown when all tool bar menus are active/enabled.

I am using TTS_ALWAYSTIP while creating Tool-Bar.

What to do to enable/display tool-tips always.

View 5 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++ :: 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++ :: 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++ :: Create A Column Of Buttons In A ListView?

Mar 26, 2013

Is there an easy way to create a column of buttons ina listView?

I need that every file of the listView has a button in the first cell. Is that possible?

View 2 Replies View Related

Visual C++ :: How To Increase Font Size In Buttons

Jan 15, 2014

How to increase font size for a specific button? I tried to change the nHeight but it doesn't seems to change the font size.

Code:

CFont font;
font.CreateFont(
12, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_REGULAR, // nWeight

[Code] ....

View 3 Replies View Related

Visual C++ :: Can Overlapped Buttons Both Receive Notification

Oct 17, 2013

I have multiple bitmap buttons of non-square shape. Because of their odd shape I can overlap them and they will still look good on screen, which is what I want - that certain layout.

The problem is that because underlying button in reality is square (which I am subclassing), the bitmap of one button may overlay with the non-bitmap area of the other button (in the underlying square). This means that 2nd bitmap button will not receive notification because the press is registered with top level window only.

Is there a way that both windows can receive the notification and check if they are in the hot spot, they will respond? I know this is against windows design.

View 10 Replies View Related

Visual C++ :: Array Of Buttons - Click Event?

Oct 15, 2012

I have successfully compiled a code where I created an array of buttons. I have added a click event to it like this :

Code:
buttons[indexofhashis2]->Click += gcnew System::EventHandler(this, &Execute::GOBUT_Click);

I have a standard event like this

Code:
private: System::Void GOBUT_Click(System::Object^ sender, System::EventArgs^ e) {
int x;
x = sender->Location.X;
}

Returns error saying Location is not a member of Object^.

I'm trying to create an array of button (user/runtime created buttons) and get different interpretations of the click event depending of wich button is clicked.

For example, if we create buttons[0] I wish to get the 0 or something relevant into the GOBUT_Click event.

View 4 Replies View Related

Visual C++ :: How To Read Images In GDI Or GDI+

Jul 3, 2014

I am working on application to work with images. How to open/read images, whether it is jpeg, png, bmp or tiff and get it to bitmap. Is there some universal command for this or I will need more commands, every time testing the extension or format and then to use different method to read the image? Best would be to do it automatically, but I don't know such command.

View 8 Replies View Related

Visual C++ :: Average Of Voxel Value Of Two Images (same Size)

May 17, 2013

How to generate code for calculating average of voxel value of two images with same sizes

(E.g. voxel1(image1)+voxel1(image2)/2)?

View 1 Replies View Related

Visual C++ :: MFC Dialog / Changing Images (JPG / PNG) Dynamically In HTML Page?

Sep 6, 2013

I created a MFC dialog using CDHtmlDialog and added a HTML page with many controls and one of them is a IMAGE tag. I got a default image loaded from the hard drive displayed in the HTML page. Up to this part, everything works fine.

Now what i want to do is, dynamically change the image based on the user click on one of the HTML buttons. I don't want this image source to be hard coded in the HTML nor the image source send from the MFC app.

What i want is for the MFC app to send the image data to the HTML in some (binary) format and then the page to display the image.

The possible option i was thinking of was to read the image file which is already in my hard drive as a binary file and send the binary data across to the HTML as a memory buffer, and then use JavaScript to decrypt this binary data and display the image.

Basically what i want is for the HTML page to display a image from the memory. how to do this?

View 5 Replies View Related

Visual C++ :: Customize Control Scrollbar

Jan 16, 2015

I get a task: to color the control scrollbar (a gridctrl scrollbar, whatever). In the first attempting I didn't succeded ... So, I started to trying coloring a CListBox scrollbar ... I developed a derived CListBox where I override OnCtlColor:

Code:
HBRUSH CMyListBox::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) {
HBRUSH hbr = CListBox::OnCtlColor(pDC, pWnd, nCtlColor);

// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired

if(CTLCOLOR_STATIC == nCtlColor) {
pDC->SetTextColor(RGB(200, 34, 0));

[Code] ....

I colored everything, except scrollbars ) ... I attached the app demo ...

I already tried this solution: [URL] ....

but in my case, didn't worked ...

My question is, how can I color the control scrollbar ? It is possible ? If yes, how ?

View 14 Replies View Related

Visual C++ :: MFC List Control Position?

Feb 4, 2015

I have a mfc project with a List Control (Report View).

When I run the project, the list control appears in the middle of the window instead of appearing where I placed it.

Is there a qay to make it stay where I need it?

View 2 Replies View Related







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