C++ :: Run From Context Menu With Selected Text From Browser

Jan 5, 2014

I'm trying to build an app, but i don't know which is the best language choice. For starters, the app should be able to:

1. run from context menu
2. when selecting some text from a web browser (ff, ie), that text is captured (preferably not in clipboard) and sent as argument to the program via context menu and the program starts executing...

Is this possible?

e.g. [URL] ....

View 2 Replies


ADVERTISEMENT

C# :: How To Get The Selected Context Menu Item

Sep 7, 2014

how to create a context menu but none of them discuss how to actually fetch the selected menu item?

if (e.Button == MouseButtons.Right)
{
ContextMenu m = new ContextMenu();
m.MenuItems.Add(new MenuItem("Font Size 8"));
m.MenuItems.Add(new MenuItem("Font Size 9"));
m.MenuItems.Add(new MenuItem("Font Size 10"));
m.Show(listBoxChecklist, new Point(e.X, e.Y));
//tempString = m.?????
}

View 3 Replies View Related

C# :: Adding Program Into Context Menu

Feb 29, 2012

To add my program into the context menu (when the user right click on excel file). I used the following code:

Code:
public static bool AddContextMenuItem(string Extension, string MenuName, string MenuDescription, string MenuCommand)
{
bool ret = false;
RegistryKey rkey = Registry.ClassesRoot.OpenSubKey(Extension);

if (rkey != null)
{
string extstring = rkey.GetValue("").ToString();

[Code] .....

I used the following function to retrieve the excel file path has been rightclick choose to load the program:

Code:
public static void OpenExcelFileWithEasyForm(string filePath)
{
try
{
string excelFilePath = Path.Combine(Path.GetDirectoryName(filePath), string.Format("{0} (EasyForm){1}", Path.GetFileNameWithoutExtension(filePath), Path.GetExtension(filePath)));

[Code] .....

But I still do not load the excel file into my program by selecting the program from ContextMenu (right click on excel file and choose program). Although if select the path to excel file from the program, the data from excel file is loaded into the program.

I'm still missing something at function OpenExcelFileWithEasyForm(). How to complete this function to load the excel file into my program when selecting programs in ContextMenu.

View 1 Replies View Related

C# :: DataGridView - Context Menu To Show Up When User Right Clicks On Fifth Column

May 22, 2014

I have a datagridview with many columns. I want a context menu to show up when user right-clicks on the fifth column (column index = 4).

private void dgv_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
if (e.Button == MouseButtons.Right) {
DataGridView.HitTestInfo hit = dgv.HitTest(e.X, e.Y);
if (hit.ColumnIndex == 4) {
contextMenuStrip1.Show(Cursor.Position);
}
}
}

The problem is, the hit.ColumnIndex value is either 0, -1 or 1, no matter where I click. So the condition never met and the context menu never shows up. Why the values 0, -1 or 1?

View 3 Replies View Related

C/C++ :: How To Get Total Number Of Items Selected From Options Menu

Jul 28, 2014

My project is to make a options menu for the user to select a shape and than draw out the shape. That whole process is already done and ready to go. What i am having trouble on is totaling the number of selected shapes. For example, at the end of the program i need to prompt a message saying ("You have selected "shape" this many times "number").

View 1 Replies View Related

C :: Text Based Web Browser From Scratch

Sep 13, 2014

I have written a text based web browser from scratch. Meaning that I'm not using libcurl in any way to retrieve the web pages.Now I'd like to add HTTPS functionality to it, but I can't seem to find a guide like Beej's Guide to Network Programming related to HTTPS.

View 3 Replies View Related

C# :: Save Selected Text From A Popup

Apr 17, 2014

I want to select text entered in a popup and save it. I have a form that contains a text area and a button

<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="103px" Width="262px"></asp:TextBox>
<br />
<br />
<asp:button runat="server" text="Add" onclick="Unnamed1_Click" />

when we click on a line in text area I want to open a popup having all text from that line. I should be able to select some of its text then if I click on save button of popup then only selected text should be saved and displayed in original text area of form. I want to use this for multiple sentences of text area.

Add button will add new line.

View 8 Replies View Related

C++ :: How To Get Browse Directory Dialog To Update Text Box With Path Selected

Jan 8, 2013

I'm trying to get a Browse Directory dialog to update a text box with the path selected. I had it working fine in Unicode build but now using TCHAR - I see the variable contains the correct path, but the textbox only gets updated with a single weird character.

setting the text checking WM_COMMAND vars-

Code:
SetWindowText(textBox2,&buttonPush(hWnd));

browse function when Browse button is pressed -

Code:
TCHAR& buttonPush(HWND hWnd) {
BROWSEINFO bi;
TCHAR szDir[MAX_PATH];
LPITEMIDLIST pidl;
LPMALLOC pMalloc;
if (SUCCEEDED(SHGetMalloc(&pMalloc))) {

[Code] ....

View 7 Replies View Related

Visual C++ :: Basic Settings - How To Configure Color Of Selected Text

May 4, 2014

How to configurate color of selected text. I am not sure why, but in Visual C++ it is not displayed as in other programs like notepad, which should be harder color. So I cannot find the selected text. Where can I configurate it or where to search it in desktop theme settings?

View 3 Replies View Related

C Sharp :: Retrieve Records Between Dates Selected From Datetimepicker And Of Selected Date

Mar 4, 2013

I want to retrieve the records selected between from_dt and to_dt and also the records of the selected date should be retrieved...

SELECT ChallanDtl.chalID, ChallanDtl.chalTo, 
ChallanDtl.chalNo, ChallanDtl.chalDDate,
ChallanDtl.chalYourNo, ChallanDtl.chalPO_NO, 
ChallanDtl.chalPO_Date, 
ChallanSubDtl.chalsubdescription, 

[Code] ...

I am not getting all the records.... when i select the same date in both datetimepicker no record is displayed... i also want the record of the selected dates from both datetime picker..

View 2 Replies View Related

C++ :: Write Interactive Text Based Menu Interface (using A Loop)

Sep 27, 2013

Write an interactive text based menu interface (using a loop) that will allow the user to

Enter a task or assignment Display all of the tasks that are in the file Find a task by Course Quit For each task, you need to keep track of:

Course Name that it is for (e.g., CS162)
Description of the assignment (e.g., Finish Lab 2)
Due date (e.g., 9/26/2009)

Allow the program to keep looping until user wants to quit. When the program starts, it should load the tasks from external file ("tasks.txt") into memory. When user enters the three items of a task, the program needs to read them in, save them in memory and eventually write them to the external data file ("tasks.txt"). The file format could look like: (The ';' is used as a delimiter or field seperator.)

Some Implementation Requirements:

Write at least four functions WITH arguments for this assignment. Use struct named Task to model task Use array of structs to model the collection of tasks. Hint: In this assignment, the description and course name may have multiple words in it. Therefore, you now SHOULD read using the 3 argument version of get. Watch out. When using the 3 argument version of get you need to make sure to remove the delimiter or newline. Therefore, anytime you read (even a confirmation message), make sure to eat the newline! Make sure to have a delimiter written between each item in the file – like a newline. This will be important when you read the information back from the file.

This is my code so far:

#include <iostream>
int main()
{
char cname[25],desc[20];

[Code]....

View 1 Replies View Related

Visual C++ :: Member Function - Add Vertical Colour Text In Popup Menu

Jun 4, 2013

I was reading a c++ code written in embarcadero ide to add vertical colour text in popup menu.

While reading the code, I had seen following instructions.

private:

Code:
void __fastcall ExpandMenuItemWidth(TObject *Sender, TCanvas *ACanvas,int &Width, int &Height);

Code:
void __fastcall DrawNewItem(TObject *Sender, TCanvas *ACanvas, const TRect &ARect, bool Selected);

The above two methods used in the code like below:

Code:
PopupMenu1->Items->Items[i]->OnMeasureItem = ExpandMenuItemWidth;
PopupMenu1->Items->Items[i]->OnDrawItem = DrawNewItem;

What is happening when we are using member function without parameters like above?

I found above code at: [URL] ....

View 2 Replies View Related

C++ :: Menu Program Broken Down Into Series Of Calls To Function For Each Of Menu Items

Aug 19, 2013

I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.

I want two of the functions to run one of the two programs I am trying to include as items in the menu.

So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.

The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.

View 2 Replies View Related

C :: Program Based On Menu System - Option To Go Back To A Previous Menu

Apr 7, 2014

I'm creating a program that is based on a menu system. Basically each menu is its own user-defined function. The problem is at each menu you can input 'b' to go to the previous menu. I just have it call the function of that menu.

However, do the functions need to complete themselves eventually? If I just keep calling functions will I just keep going further and further deeper into ever running functions?

If so how do I avoid this and yet keep the option to go back to a previous menu/function?

View 2 Replies View Related

C# :: The Name Does Not Exist In Current Context?

Feb 27, 2015

I am new to GUI programming, I am using mono winforms

using System.Windows.Forms;
using System.Drawing;
using System.IO;

[Code]...

I tried sw.WriteLine(this.to.Text); but that did not work

View 4 Replies View Related

C# :: The Name (contentGrid) Does Not Exist In The Current Context

Sep 16, 2014

This is the code:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;

[code]....

I am using Visual Studio 2013.i was writing my first code for Windows in C#.I had got everything all right but Visual studio keeps showing me the problem that The name 'contentGrid' does not exist in the current context.I have tried Everything I could think of.I recentered the app to Windows 8.1.

View 2 Replies View Related

C/C++ :: Creating A Menu That Will Return The Menu After A Selection

Apr 7, 2014

This is what I have so far, it gives me a nice menu to select from and it all works but after I make a selection it closes the program. I tried to return to it but it won't work for me

#include <stdio.h>
int main() {
int choice;
int deposit;
int balance = 500; {
printf(" CHOOSE FROM THE FOLLOWING

[code]....

View 14 Replies View Related

Visual C++ :: Render Content Of CRichEditCtrl On Device Context Of Some CWnd?

Mar 4, 2013

I need to render content of CRichEditCtrl on device context of some CWnd. This code works ok:

Code:
CDC *dc = wnd->GetDC();
CRect cr;
wnd->GetClientRect( &cr );
dc->Rectangle(cr);
cr.right *= 15;
cr.bottom *= 15;

[Code] ...

The problem is that I want to scale the output. I was trying to send message to my control before blitting:

SendMessage( EM_SETZOOM, numer, denom ).

It scaled the control itself, but the blitted context was still the same size as original content CRichEditCtrl (befeoe scaling). Is there any way to blit/render scaled content of CRichEditCtrl to any device context (screen/paper) ?

View 3 Replies View Related

Visual C++ :: Enable / Disable Menu Item 2 In OnUpdate Handler Of Menu Item 1?

Sep 15, 2014

I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu = pCmdUI->m_pSubMenu;" and "t_pMenu = pCmdUI->m_pParentMenu;" but I always get NULL t_pMenu. How can I achieve this purpose?

Code:
void CDummyView::OnUpdateMenuItem1(CCmdUI* pCmdUI)
{
if(m_bShowMenuItem1) {
pCmdUI->Enable(TRUE);

[Code]....

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

C :: Check For Browser Inputs?

Oct 26, 2013

Any chances for a c program to check for browser inputs?

View 1 Replies View Related

C# :: Ignoring Last-of-type In Web Browser

Dec 8, 2014

I'm using a Windows.System.Forms.Webbrowser and the document text contains

...<style type="text/css">
Table {
page-break-after: always;
}
table:last-of-type {
page-break-after: auto
}
</style>...

As soon as call ShowPrintPreviewDialog() to show the print preview dialog, it appears to be ignoring

table:table:last-of-type

because the last page in the document is blank.

View 2 Replies View Related

C++ :: Web Browser - How To Run HTML Within Program

May 4, 2014

I am making a web browser and I have successfully made it so it shows the actual html but I want to know how to run the html within the program. I am using mac so it can't be the #include "windows.h" stuff and preferably I would like it to be cross-platform.

View 3 Replies View Related

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

C# :: WPF Browser Application Not Displaying Controls?

Nov 22, 2014

This is my very first attempt at running a wpf browser app... I've create the project and i can see controls when i add them to the entry page, here's the default for the page

<Page x:Class="SandBoxWeb.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

[Code].....

and i can see a nice bright green square with an orange outline. But when i debug, a new tab opens up in my browser and i can't see a single thing,it's just a white screen.

View 6 Replies View Related

C# :: Select Dynamic Web Browser From Tab Control

Sep 3, 2014

I have been working on my own custom web browser. If i insert a web browser in my tab control and name it i can easily just go webbrowser1.Navigate() in my button click to use the webbrowser methods.

I made a method CreateTab and it automatically adds a web browser to my tab along with a default web page.
My problem is selecting this webbrowser in other button clicks so i can call Home, Back, forward, etc.

Here is me method for creating a tab.

private void CreateTabItem()
{ //create a new tab
TabItem item = new TabItem();
item.Header = "Fitness" + i ;
WebBrowser browser = new WebBrowser();
//browser.Name = "Website";

[Code] ....

View 1 Replies View Related







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