<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Embedded Browser -&amp;gt; copy to clipboard fails]]></title><description><![CDATA[<p>Guten Tag zusammen.</p>
<p>Mit diesem Programm wird eine URL in einem embedded Browser (IE) geöffnet, auf der der Benutzer Daten eingeben kann und diese mittels Javascript in die Zwischenablage kopieren kann.</p>
<p>Leider funktioniert das kopieren in die Zwischenablage nicht.<br />
Auch ein normales Copy &amp; Paste irgendwelcher Zeichen aus dem embedded Browser geht nicht.</p>
<p>Wenn die URL direkt über einen Browser (IE) geöffnet wird, so klappt alles tadellos.<br />
Auch wenn ich eine MFC Projekt erstelle und darauf das WebBrowser Control platziere geht alles wunderbar.</p>
<p>Ich vermute mal, das diese Funktion im IWebBrowser2 vorhanden sein müsste?!</p>
<p>Vielen Dank für die Hilfe,<br />
Sotares</p>
<pre><code>#include &lt;windows.h&gt;
#include &lt;exdisp.h&gt;
#include &quot;resource.h&quot;

#define ID_ICON1 1
#define WM_ICONCLICK (WM_APP+0)
#define HOTKEY_STRG_1 WM_USER

HWND container;
HICON hIcon;
HINSTANCE hInst, hInstance;

HINSTANCE hDLL = LoadLibrary(&quot;atl.dll&quot;);
typedef HRESULT (WINAPI *PAttachControl)(IUnknown*, HWND,IUnknown**);
PAttachControl AtlAxAttachControl = (PAttachControl) GetProcAddress(hDLL, &quot;AtlAxAttachControl&quot;);
RECT rect;
IWebBrowser2 *pIwb;

void SelectURL (char URL[100])
{
char cURL[100];
strcpy(cURL, URL);
WCHAR strBuffer[100];
MultiByteToWideChar(CP_ACP, 0, cURL, -1, strBuffer, sizeof(strBuffer));
pIwb-&gt;Navigate(strBuffer,0,0,0,0);
}

void Icon_in_Taskleiste (HWND hwnd, BOOL bAnzeigen); 

BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

	switch(message)
	{
	case WM_INITDIALOG:
		return TRUE;

	case WM_COMMAND:
		switch (LOWORD (wParam))
		{

		case IDOK_ABOUT: {
			EndDialog(hDlg,0);
			return TRUE; }

		case IDOK_EXIT: { 
			EndDialog(hDlg,(wParam));
			return TRUE; }

		case IDCANCEL_EXIT: {
			EndDialog(hDlg,(wParam));
			return TRUE; }
		}
		break;

	}

	return FALSE;
}
 /***************************************************************************/
 LRESULT CALLBACK WndProc( HWND hWnd, UINT messg, WPARAM wParam, LPARAM lParam )
 {  

     HMENU hMenu;

	 PAINTSTRUCT ps;
	 HDC hdc;
	 static UINT s_uTaskbarRestart;

     switch(messg)
     {

		case WM_CREATE:
			{
			hInstance = ((LPCREATESTRUCT)lParam) -&gt; hInstance; 

			if(!RegisterHotKey(hWnd, HOTKEY_STRG_1, 2,VK_F1))    
			MessageBox(hWnd, &quot;Fehler beim registrieren des Hotkeys!&quot;, &quot;Error&quot;, MB_OK);

			// Die Message, die das System bei Neustart der Taskleiste schickt registrieren 
			// Damit wir den Neustart bei evtl. Absturz des Explorers mitbekommen.
			s_uTaskbarRestart = RegisterWindowMessage (TEXT(&quot;TaskbarCreated&quot;));

			// Im Verzeichnis der EXE muss sich die Icondatei &quot;icon.ico&quot; befinden
			// Wir laden es jetzt in den Speicher
			hIcon = (HICON)LoadImage (hInst, &quot;icon.ico&quot;, IMAGE_ICON, 0, 0, LR_LOADFROMFILE);

			// Aus der Resource ginge so:
			//hIcon = (HICON) LoadImage (hInst, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 0, 0, LR_SHARED);

			Icon_in_Taskleiste (hWnd, TRUE);

			GetClientRect(hWnd,&amp;rect);
			container=CreateWindowEx(WS_EX_CLIENTEDGE,&quot;EDIT&quot;,&quot;&quot;,WS_CHILD | WS_VISIBLE,0,0,rect.right,rect.bottom,hWnd,0,0,0);
			CoInitialize(0);
			CoCreateInstance(CLSID_WebBrowser,0,CLSCTX_ALL,IID_IWebBrowser2,(void**)&amp;pIwb);
			AtlAxAttachControl(pIwb,container,0);
			SelectURL(&quot;http://localhost/notewriter/index.php&quot;);
			} return 0;

            case WM_COMMAND:
			hMenu = GetMenu (hWnd);

            switch(LOWORD (wParam))
            {
                case ID_FORUM: {
					SelectURL(&quot;www.someforum.cc&quot;);
					EnableMenuItem(hMenu,ID_FORUM,MF_GRAYED);
					EnableMenuItem(hMenu,ID_NOTE,MF_ENABLED);
					} break;

				case ID_NOTEWRITER: {
					SelectURL(&quot;http://localhost/notewriter/index.php&quot;);
					EnableMenuItem(hMenu,ID_FORUM,MF_ENABLED);
					EnableMenuItem(hMenu,ID_NOTE,MF_GRAYED);
					} break;

				case ID_ABOUT: {
					DialogBox(hInstance, TEXT(&quot;About&quot;), hWnd, AboutDlgProc);
					} break;

				case ID_EXIT: {
						if(DialogBox(hInst, TEXT(&quot;Exit&quot;), hWnd, AboutDlgProc)==IDOK_EXIT)
						{
						SendMessage(hWnd,WM_DESTROY,0,0);
						}
					}

            }             

		case WM_PAINT:
			{
			 hdc = BeginPaint (hWnd, &amp;ps);
			 EndPaint (hWnd, &amp;ps);
			 break;
			}

		case WM_SIZE:
             MoveWindow(container,0,0,LOWORD(lParam), HIWORD(lParam),1);
			 break;

		//Nachricht bei Mausaktionen auf dem Icon in der Taskbar
		case WM_ICONCLICK:
			switch(lParam)
			{
			case WM_LBUTTONUP: // linke Maustaste
			Icon_in_Taskleiste(hWnd,0);
			ShowWindow (hWnd, 1) ;
            break;
			}
        return 0;

		case WM_HOTKEY: 
			switch (wParam) 
			{ 
				case HOTKEY_STRG_1: 
				Icon_in_Taskleiste(hWnd,0);
				if(ShowWindow(hWnd, SW_SHOW))
				{
				Icon_in_Taskleiste(hWnd,1);
				ShowWindow (hWnd, SW_HIDE);
				}
			}
			break;

		case WM_CLOSE:
             if(DialogBox(hInst, TEXT(&quot;Exit&quot;), hWnd, AboutDlgProc)==IDOK_EXIT)
						{
						SendMessage(hWnd,WM_DESTROY,0,0);
						}
             break;

		case WM_DESTROY:
			 DestroyWindow(hWnd);
			 Icon_in_Taskleiste (hWnd, FALSE); // Icon aus der Taskleiste entfernen
			 DestroyIcon (hIcon); // Speicher freigeben
             PostQuitMessage( 0 );
             break;

		case WM_SYSCOMMAND:
			if (wParam==SC_MINIMIZE)
			{
			Icon_in_Taskleiste(hWnd,1);
			ShowWindow (hWnd, SW_HIDE);
			return 0;
			}

        default:
			 // Wurde die Taskleiste zwischendurch neu gestartet?
			 if (messg == s_uTaskbarRestart)
			 Icon_in_Taskleiste (hWnd, TRUE); // Icon in die Taskleiste setzen
             return( DefWindowProc( hWnd, messg, wParam, lParam ) );
     }
     return 0;

 /***************************************************************************/
 }
 /********************* Funktion WinMain ************************************************/
 int WINAPI WinMain( HINSTANCE hInst,HINSTANCE hPreInst,LPSTR lpszCmdLine, int nCmdShow )
 {
	 char szAppName[]=TEXT(&quot;NoteWriter&quot;);
     WNDCLASS wc;
     char NomClasse[] = &quot;container&quot;;
     wc.style = CS_HREDRAW | CS_VREDRAW;
     wc.lpszClassName    = NomClasse;
     wc.hInstance        = hInst;
     wc.lpfnWndProc     = WndProc;
     wc.hCursor            = LoadCursor( 0, IDC_ARROW );
     wc.hIcon            = LoadIcon( hInst, MAKEINTRESOURCE (IDI_ICON));
     wc.lpszMenuName    = MAKEINTRESOURCE(IDR_MENU1);
     wc.hbrBackground    = 0;
     wc.style            = 0;
     wc.cbClsExtra        = 0;
     wc.cbWndExtra        = 0;

     if (!RegisterClass(&amp;wc)) return 0;

     HWND hWnd = CreateWindow(
         NomClasse,
         szAppName,
         WS_SYSMENU|
         WS_THICKFRAME|
         WS_MINIMIZEBOX,
         0,0,800,700,0,NULL,hInst,0);

	 ShowWindow (hWnd, SW_HIDE) ;
     UpdateWindow( hWnd );

     MSG Msg;
     while( GetMessage(&amp;Msg, 0, 0, 0))
     {
         TranslateMessage( &amp;Msg );
         DispatchMessage( &amp;Msg );
     }

     pIwb-&gt;Release();
     CoUninitialize();        
     FreeLibrary(hDLL);
     return( Msg.wParam);
 }

//Hier ist die Funktion zum Anzeigen und Entfernen des Icons.
void Icon_in_Taskleiste (HWND hwnd, BOOL bAnzeigen)
{
    NOTIFYICONDATA tsym; // in diese Struktur kommen die Daten des Icons

    ZeroMemory (&amp;tsym, sizeof (NOTIFYICONDATA));

    if (bAnzeigen)
    {
        tsym.cbSize = sizeof (NOTIFYICONDATA);
        tsym.hWnd   = hwnd;
        tsym.uID    = ID_ICON1;
        tsym.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
        tsym.uCallbackMessage = WM_ICONCLICK;
        tsym.hIcon  = hIcon;
        strcpy (tsym.szTip, &quot;NoteWriter&quot;);
        Shell_NotifyIcon (NIM_ADD, &amp;tsym);
    }

    else
    {
        tsym.cbSize = sizeof (NOTIFYICONDATA);
        tsym.hWnd   = hwnd;
        tsym.uID    = ID_ICON1;
        tsym.uFlags = 0;
        Shell_NotifyIcon (NIM_DELETE, &amp;tsym);
    }
        return;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/166690/embedded-browser-gt-copy-to-clipboard-fails</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 16:49:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166690.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Dec 2006 15:14:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Fri, 01 Dec 2006 15:14:49 GMT]]></title><description><![CDATA[<p>Guten Tag zusammen.</p>
<p>Mit diesem Programm wird eine URL in einem embedded Browser (IE) geöffnet, auf der der Benutzer Daten eingeben kann und diese mittels Javascript in die Zwischenablage kopieren kann.</p>
<p>Leider funktioniert das kopieren in die Zwischenablage nicht.<br />
Auch ein normales Copy &amp; Paste irgendwelcher Zeichen aus dem embedded Browser geht nicht.</p>
<p>Wenn die URL direkt über einen Browser (IE) geöffnet wird, so klappt alles tadellos.<br />
Auch wenn ich eine MFC Projekt erstelle und darauf das WebBrowser Control platziere geht alles wunderbar.</p>
<p>Ich vermute mal, das diese Funktion im IWebBrowser2 vorhanden sein müsste?!</p>
<p>Vielen Dank für die Hilfe,<br />
Sotares</p>
<pre><code>#include &lt;windows.h&gt;
#include &lt;exdisp.h&gt;
#include &quot;resource.h&quot;

#define ID_ICON1 1
#define WM_ICONCLICK (WM_APP+0)
#define HOTKEY_STRG_1 WM_USER

HWND container;
HICON hIcon;
HINSTANCE hInst, hInstance;

HINSTANCE hDLL = LoadLibrary(&quot;atl.dll&quot;);
typedef HRESULT (WINAPI *PAttachControl)(IUnknown*, HWND,IUnknown**);
PAttachControl AtlAxAttachControl = (PAttachControl) GetProcAddress(hDLL, &quot;AtlAxAttachControl&quot;);
RECT rect;
IWebBrowser2 *pIwb;

void SelectURL (char URL[100])
{
char cURL[100];
strcpy(cURL, URL);
WCHAR strBuffer[100];
MultiByteToWideChar(CP_ACP, 0, cURL, -1, strBuffer, sizeof(strBuffer));
pIwb-&gt;Navigate(strBuffer,0,0,0,0);
}

void Icon_in_Taskleiste (HWND hwnd, BOOL bAnzeigen); 

BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

	switch(message)
	{
	case WM_INITDIALOG:
		return TRUE;

	case WM_COMMAND:
		switch (LOWORD (wParam))
		{

		case IDOK_ABOUT: {
			EndDialog(hDlg,0);
			return TRUE; }

		case IDOK_EXIT: { 
			EndDialog(hDlg,(wParam));
			return TRUE; }

		case IDCANCEL_EXIT: {
			EndDialog(hDlg,(wParam));
			return TRUE; }
		}
		break;

	}

	return FALSE;
}
 /***************************************************************************/
 LRESULT CALLBACK WndProc( HWND hWnd, UINT messg, WPARAM wParam, LPARAM lParam )
 {  

     HMENU hMenu;

	 PAINTSTRUCT ps;
	 HDC hdc;
	 static UINT s_uTaskbarRestart;

     switch(messg)
     {

		case WM_CREATE:
			{
			hInstance = ((LPCREATESTRUCT)lParam) -&gt; hInstance; 

			if(!RegisterHotKey(hWnd, HOTKEY_STRG_1, 2,VK_F1))    
			MessageBox(hWnd, &quot;Fehler beim registrieren des Hotkeys!&quot;, &quot;Error&quot;, MB_OK);

			// Die Message, die das System bei Neustart der Taskleiste schickt registrieren 
			// Damit wir den Neustart bei evtl. Absturz des Explorers mitbekommen.
			s_uTaskbarRestart = RegisterWindowMessage (TEXT(&quot;TaskbarCreated&quot;));

			// Im Verzeichnis der EXE muss sich die Icondatei &quot;icon.ico&quot; befinden
			// Wir laden es jetzt in den Speicher
			hIcon = (HICON)LoadImage (hInst, &quot;icon.ico&quot;, IMAGE_ICON, 0, 0, LR_LOADFROMFILE);

			// Aus der Resource ginge so:
			//hIcon = (HICON) LoadImage (hInst, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 0, 0, LR_SHARED);

			Icon_in_Taskleiste (hWnd, TRUE);

			GetClientRect(hWnd,&amp;rect);
			container=CreateWindowEx(WS_EX_CLIENTEDGE,&quot;EDIT&quot;,&quot;&quot;,WS_CHILD | WS_VISIBLE,0,0,rect.right,rect.bottom,hWnd,0,0,0);
			CoInitialize(0);
			CoCreateInstance(CLSID_WebBrowser,0,CLSCTX_ALL,IID_IWebBrowser2,(void**)&amp;pIwb);
			AtlAxAttachControl(pIwb,container,0);
			SelectURL(&quot;http://localhost/notewriter/index.php&quot;);
			} return 0;

            case WM_COMMAND:
			hMenu = GetMenu (hWnd);

            switch(LOWORD (wParam))
            {
                case ID_FORUM: {
					SelectURL(&quot;www.someforum.cc&quot;);
					EnableMenuItem(hMenu,ID_FORUM,MF_GRAYED);
					EnableMenuItem(hMenu,ID_NOTE,MF_ENABLED);
					} break;

				case ID_NOTEWRITER: {
					SelectURL(&quot;http://localhost/notewriter/index.php&quot;);
					EnableMenuItem(hMenu,ID_FORUM,MF_ENABLED);
					EnableMenuItem(hMenu,ID_NOTE,MF_GRAYED);
					} break;

				case ID_ABOUT: {
					DialogBox(hInstance, TEXT(&quot;About&quot;), hWnd, AboutDlgProc);
					} break;

				case ID_EXIT: {
						if(DialogBox(hInst, TEXT(&quot;Exit&quot;), hWnd, AboutDlgProc)==IDOK_EXIT)
						{
						SendMessage(hWnd,WM_DESTROY,0,0);
						}
					}

            }             

		case WM_PAINT:
			{
			 hdc = BeginPaint (hWnd, &amp;ps);
			 EndPaint (hWnd, &amp;ps);
			 break;
			}

		case WM_SIZE:
             MoveWindow(container,0,0,LOWORD(lParam), HIWORD(lParam),1);
			 break;

		//Nachricht bei Mausaktionen auf dem Icon in der Taskbar
		case WM_ICONCLICK:
			switch(lParam)
			{
			case WM_LBUTTONUP: // linke Maustaste
			Icon_in_Taskleiste(hWnd,0);
			ShowWindow (hWnd, 1) ;
            break;
			}
        return 0;

		case WM_HOTKEY: 
			switch (wParam) 
			{ 
				case HOTKEY_STRG_1: 
				Icon_in_Taskleiste(hWnd,0);
				if(ShowWindow(hWnd, SW_SHOW))
				{
				Icon_in_Taskleiste(hWnd,1);
				ShowWindow (hWnd, SW_HIDE);
				}
			}
			break;

		case WM_CLOSE:
             if(DialogBox(hInst, TEXT(&quot;Exit&quot;), hWnd, AboutDlgProc)==IDOK_EXIT)
						{
						SendMessage(hWnd,WM_DESTROY,0,0);
						}
             break;

		case WM_DESTROY:
			 DestroyWindow(hWnd);
			 Icon_in_Taskleiste (hWnd, FALSE); // Icon aus der Taskleiste entfernen
			 DestroyIcon (hIcon); // Speicher freigeben
             PostQuitMessage( 0 );
             break;

		case WM_SYSCOMMAND:
			if (wParam==SC_MINIMIZE)
			{
			Icon_in_Taskleiste(hWnd,1);
			ShowWindow (hWnd, SW_HIDE);
			return 0;
			}

        default:
			 // Wurde die Taskleiste zwischendurch neu gestartet?
			 if (messg == s_uTaskbarRestart)
			 Icon_in_Taskleiste (hWnd, TRUE); // Icon in die Taskleiste setzen
             return( DefWindowProc( hWnd, messg, wParam, lParam ) );
     }
     return 0;

 /***************************************************************************/
 }
 /********************* Funktion WinMain ************************************************/
 int WINAPI WinMain( HINSTANCE hInst,HINSTANCE hPreInst,LPSTR lpszCmdLine, int nCmdShow )
 {
	 char szAppName[]=TEXT(&quot;NoteWriter&quot;);
     WNDCLASS wc;
     char NomClasse[] = &quot;container&quot;;
     wc.style = CS_HREDRAW | CS_VREDRAW;
     wc.lpszClassName    = NomClasse;
     wc.hInstance        = hInst;
     wc.lpfnWndProc     = WndProc;
     wc.hCursor            = LoadCursor( 0, IDC_ARROW );
     wc.hIcon            = LoadIcon( hInst, MAKEINTRESOURCE (IDI_ICON));
     wc.lpszMenuName    = MAKEINTRESOURCE(IDR_MENU1);
     wc.hbrBackground    = 0;
     wc.style            = 0;
     wc.cbClsExtra        = 0;
     wc.cbWndExtra        = 0;

     if (!RegisterClass(&amp;wc)) return 0;

     HWND hWnd = CreateWindow(
         NomClasse,
         szAppName,
         WS_SYSMENU|
         WS_THICKFRAME|
         WS_MINIMIZEBOX,
         0,0,800,700,0,NULL,hInst,0);

	 ShowWindow (hWnd, SW_HIDE) ;
     UpdateWindow( hWnd );

     MSG Msg;
     while( GetMessage(&amp;Msg, 0, 0, 0))
     {
         TranslateMessage( &amp;Msg );
         DispatchMessage( &amp;Msg );
     }

     pIwb-&gt;Release();
     CoUninitialize();        
     FreeLibrary(hDLL);
     return( Msg.wParam);
 }

//Hier ist die Funktion zum Anzeigen und Entfernen des Icons.
void Icon_in_Taskleiste (HWND hwnd, BOOL bAnzeigen)
{
    NOTIFYICONDATA tsym; // in diese Struktur kommen die Daten des Icons

    ZeroMemory (&amp;tsym, sizeof (NOTIFYICONDATA));

    if (bAnzeigen)
    {
        tsym.cbSize = sizeof (NOTIFYICONDATA);
        tsym.hWnd   = hwnd;
        tsym.uID    = ID_ICON1;
        tsym.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
        tsym.uCallbackMessage = WM_ICONCLICK;
        tsym.hIcon  = hIcon;
        strcpy (tsym.szTip, &quot;NoteWriter&quot;);
        Shell_NotifyIcon (NIM_ADD, &amp;tsym);
    }

    else
    {
        tsym.cbSize = sizeof (NOTIFYICONDATA);
        tsym.hWnd   = hwnd;
        tsym.uID    = ID_ICON1;
        tsym.uFlags = 0;
        Shell_NotifyIcon (NIM_DELETE, &amp;tsym);
    }
        return;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1185367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185367</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Fri, 01 Dec 2006 15:14:49 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Fri, 01 Dec 2006 18:50:39 GMT]]></title><description><![CDATA[<p>Kopierst du mit Maus oder mit Tastatur?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185496</guid><dc:creator><![CDATA[nachgefragt]]></dc:creator><pubDate>Fri, 01 Dec 2006 18:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Fri, 01 Dec 2006 19:15:21 GMT]]></title><description><![CDATA[<p>Ich kopiere es mit der Maus.<br />
Aber weder mit der Maus oder der Tastatur funktioniert das kopieren.<br />
Auf jeder Seite die ich bis jetzt aufgerufen habe funktioniert Copy &amp; Paste nicht.<br />
Auf Tastatur -und Mauseingaben reagiert der embedded Browser aber ohne Probleme.</p>
<p>freundlichst,<br />
Sotares</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185510</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Fri, 01 Dec 2006 19:15:21 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Sat, 02 Dec 2006 12:15:52 GMT]]></title><description><![CDATA[<p>wenns mit der tastatur gewesen wäre, dann hätte es daran liegen können, dass der ie so nicht alle Tastatur Events richtig bekommt (wahrscheinlich kannst du nicht mit Tab in andere Felder springen), aber so hab ich auch keine Idee. Musst halt mal googlen (am besten auf englisch)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185764</guid><dc:creator><![CDATA[nachgefragt]]></dc:creator><pubDate>Sat, 02 Dec 2006 12:15:52 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Sat, 02 Dec 2006 12:42:30 GMT]]></title><description><![CDATA[<p>Richtig, Tab funktioniert ebenfalls nicht.<br />
Google gehört zu meinem Hilfsmittel Nr. 1 <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Leider habe ich keine Ideen mehr, was ich noch tun könnte...</p>
<p>Sotares</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185773</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Sat, 02 Dec 2006 12:42:30 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Sat, 02 Dec 2006 13:30:56 GMT]]></title><description><![CDATA[<p>das mit Tab geht, wenn du dir das IOleInPlaceActiveObject Inteface vom bowser holst und dann TranslateAccelerator bie der Message verarbeitung aufrufst, ob das bei copy und paste auch hilft weiß ich nciht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185801</guid><dc:creator><![CDATA[nachgefragt]]></dc:creator><pubDate>Sat, 02 Dec 2006 13:30:56 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Sat, 02 Dec 2006 22:36:30 GMT]]></title><description><![CDATA[<p>Danke für den Hinweis mit dem IOleInPlaceActiveObject und dem TranslateAccelerator.</p>
<p>Irgendwie werde ich aber nicht schlau daraus. :xmas2:<br />
Hast Du mir dazu vielleicht ein Beispiel?</p>
<p>Ich habe in diesem Forum noch ein anderes Code Fragment gefunden, dass mich ein Stück weiter gebracht hat.</p>
<pre><code>void CopyData(HWND hwnd);
char pszData[]=&quot;Test&quot;;

LRESULT CALLBACK WndProc(....)
 {  

     switch(messg)
     {
        case WM_LBUTTONDOWN:
		{
		CopyData(hWnd); 
		}
     }
}

void CopyData(HWND hWnd)
 {

  HGLOBAL hData;
  LPVOID pData;

  OpenClipboard(hWnd);
  EmptyClipboard();
  hData = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE,strlen(pszData) + 1);
  pData = GlobalLock(hData);
  strcpy((LPSTR)pData, pszData);
  GlobalUnlock(hData);
  SetClipboardData(CF_TEXT, hData);
  CloseClipboard();
 }
</code></pre>
<p>Beim drücken der linken Maustaste im Menu, wird der Text &quot;Test&quot; in die Zwischenablage kopiert.</p>
<p>Wenn dies jetzt nur noch funktioniert, wenn ich im WebBrowser (container) etwas kopiere, dann ist für mich schon Weihnachten! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Sotares</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1186058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1186058</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Sat, 02 Dec 2006 22:36:30 GMT</pubDate></item><item><title><![CDATA[Reply to Embedded Browser -&amp;gt; copy to clipboard fails on Wed, 06 Dec 2006 15:25:29 GMT]]></title><description><![CDATA[<p>So, ich habs hingekriegt dass die Tabulator und Delete Taste soweit nun funktioniert. Die Copy &amp; Paste Funktion geht nachwievor nicht.</p>
<p>In der Message Routine:</p>
<pre><code>if(Msg.message == WM_KEYDOWN)
		 {
			IOleInPlaceActiveObject* pIOIPAO;
			HRESULT hr =  pIwb-&gt;QueryInterface (IID_IOleInPlaceActiveObject, (void**)&amp;pIOIPAO);
			hr = pIOIPAO-&gt;TranslateAccelerator(&amp;Msg);
			pIOIPAO-&gt;Release();
		 }
</code></pre>
<p>Grüsse,<br />
Sotares</p>
<p>Ist inzwischen ein Crossposting zu<br />
<a href="http://www.softgames.de/forum/viewtopic.php?p=698502#698502" rel="nofollow">http://www.softgames.de/forum/viewtopic.php?p=698502#698502</a><br />
Bitte keine Flames <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1187996</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187996</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Wed, 06 Dec 2006 15:25:29 GMT</pubDate></item></channel></rss>