<?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[Text an Cursorposition kopieren]]></title><description><![CDATA[<p>Hi, ich arbeite zurzeit an einem Editor für ein PC Spiel, und will da diese Funktion einbauen : Oben im Menu gibt es ein Rollout. Dort kann man dann Schaltflächen anklicken. Soweit hab ich's schon. Jetzt soll allerdings Button A den Text xy an die aktuelle Cursorposition im Schreibfeld kopieren.</p>
<p>Ich habe angefangen, eine Structur mit x und y Variablen zu schreiben, welche die Coordinaten des Cursors sein sollen.</p>
<p>Wie kann ich den ganzen Plan umsetzen?</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/153336/text-an-cursorposition-kopieren</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Jul 2026 19:45:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/153336.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Jul 2006 12:19:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sat, 15 Jul 2006 12:19:35 GMT]]></title><description><![CDATA[<p>Hi, ich arbeite zurzeit an einem Editor für ein PC Spiel, und will da diese Funktion einbauen : Oben im Menu gibt es ein Rollout. Dort kann man dann Schaltflächen anklicken. Soweit hab ich's schon. Jetzt soll allerdings Button A den Text xy an die aktuelle Cursorposition im Schreibfeld kopieren.</p>
<p>Ich habe angefangen, eine Structur mit x und y Variablen zu schreiben, welche die Coordinaten des Cursors sein sollen.</p>
<p>Wie kann ich den ganzen Plan umsetzen?</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098167</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Sat, 15 Jul 2006 12:19:35 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sat, 15 Jul 2006 15:31:47 GMT]]></title><description><![CDATA[<p>Hm, TextOut() MoveWindow() WM_MOUSEMOVE BS_CLICKED BS_NOTIFY BS_DBLCLK</p>
<p>oder meinst Du den erscheinenden gelben Erklärungstext &quot;speichern&quot; oder so?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098262</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Sat, 15 Jul 2006 15:31:47 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 16 Jul 2006 11:54:30 GMT]]></title><description><![CDATA[<p>Also, oben im Menu klickt man auf Button A. Dann soll Text xy an die Stelle geschrieben werden, wo man gerade am schreiben wasr. Also das soll vom PC dahin geschrieben werden.</p>
<p>Edit : Bin ab morgen, den 17.07.06 für 2 Wochen weg</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098290</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098290</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Sun, 16 Jul 2006 11:54:30 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Mon, 17 Jul 2006 08:30:41 GMT]]></title><description><![CDATA[<p>Was verwendest du denn zum Text darstellen? Ne Edit-Control oder was selbst programmiertes mit Api-Caret? oder sonst irgendwas was mir grad nicht einfällt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098970</guid><dc:creator><![CDATA[DeX3]]></dc:creator><pubDate>Mon, 17 Jul 2006 08:30:41 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Thu, 27 Jul 2006 19:04:53 GMT]]></title><description><![CDATA[<p>Ich verstehe deine Frage nicht. Was ist dieses Edit-Control?</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105622</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105622</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Thu, 27 Jul 2006 19:04:53 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Thu, 27 Jul 2006 19:42:17 GMT]]></title><description><![CDATA[<p>Das ist ein Edit-Control:</p>
<p>Guckst du <a href="http://www.essco.co.uk/technology/parsed_edit/parsed_edit5.gif" rel="nofollow">Hier!</a></p>
<p>EDIT: Genau genommen sind es viele Edit-Controls^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105651</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105651</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 27 Jul 2006 19:42:17 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 08:09:09 GMT]]></title><description><![CDATA[<p>Hi. Du versteht imo einfach nicht mein Problem ;). Ich brauche solche Edit-Boxes garnicht.</p>
<pre><code>POPUP &quot;&amp;Gothic-Funktionen&quot;
 {
       MENUITEM &quot;Npc_KnowsInfo&quot;, CM_FUNC_NPC_KNOWSINFO
       MENUITEM &quot;Npc_HasItems&quot; , CM_FUNC_NPC_HASITEMS
       MENUITEM SEPARATOR
       MENUITEM &quot;B_GiveInvItems&quot;, CM_FUNC_B_GIVEINVITEMS
       MENUITEM &quot;AI_StopProcessInfos&quot;, CM_FUNC_AI_STOPPROCESS
 }
</code></pre>
<p>So. Und wenn man auf einen dieser Einträge klickt, dann soll im Editor-Feld, dieses weiße wie zB bei Word wo man seinen Text reinschreiben kann, dort hin, soll ein bestimmter Text automatisch reingeschriben werden. Wenn man auf eine der Schaltflächen klickt. Und der Text soll an die Cursor Position hingeschrieben werden, also dort wo grad das | steht.</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105902</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 08:09:09 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 08:45:42 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_replacesel.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_replacesel.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105942</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 28 Jul 2006 08:45:42 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 08:54:26 GMT]]></title><description><![CDATA[<blockquote>
<p>Hi. Du versteht imo einfach nicht mein Problem . Ich brauche solche Edit-Boxes garnicht.</p>
</blockquote>
<p>Und was glaubst du ist dann dein Editor-Feld?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105946</guid><dc:creator><![CDATA[eas]]></dc:creator><pubDate>Fri, 28 Jul 2006 08:54:26 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 09:23:31 GMT]]></title><description><![CDATA[<p>Sorry. Ich hatte wohl einen Denkfehler. Also braucht man auch Edit-Boxes, wenn der Benutzer garnichts eingeben soll?</p>
<p>Wie kann ich den Code aus der MSDN benutzen? Ich bekomme folgende Meldungen :</p>
<pre><code>Main.c:274: error: `hWndControl' undeclared here (not in a function)
Main.c:278: error: `wParam' undeclared here (not in a function)
Main.c:283: error: `lParam' undeclared here (not in a function)
Main.c:283: error: initializer element is not constant
Main.c:283: warning: data definition has no type or storage class
</code></pre>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105972</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 09:23:31 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 09:43:48 GMT]]></title><description><![CDATA[<p>das sind nur beispiel parameter du musst diese natürlich gegen deine variablen ersetzten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1105991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1105991</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 28 Jul 2006 09:43:48 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 11:17:11 GMT]]></title><description><![CDATA[<p>C++Progger schrieb:</p>
<blockquote>
<p>Wie kann ich den Code aus der MSDN benutzen? Ich bekomme folgende Meldungen:</p>
<pre><code>Main.c:274: error: `hWndControl' undeclared here (not in a function)
Main.c:278: error: `wParam' undeclared here (not in a function)
Main.c:283: error: `lParam' undeclared here (not in a function)
Main.c:283: error: initializer element is not constant
Main.c:283: warning: data definition has no type or storage class
</code></pre>
</blockquote>
<p>OMG</p>
<p>Du willst doch sicher mal ein Buch über C oder C++ lesen?</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106058</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 28 Jul 2006 11:17:11 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 11:44:37 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/8250">@Swordfish</a></p>
<p>Bisher nur PDF Tutorials.</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106082</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 11:44:37 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 14:52:10 GMT]]></title><description><![CDATA[<p>C++Progger schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/8250">@Swordfish</a></p>
<p>Bisher nur PDF Tutorials.</p>
<p>MfG, C++Progger</p>
</blockquote>
<p>Kann mich Swordfish nur anschließen...das Problem bei Tutorials aus dem Netz ist, dass meistens der Zusammenhanh fehlt...Ich würd dir empfehlen, ein richtiges Buch zu erwerben, dann fällt dir auch schnell auf, wie 'offentsichtlich' deine Fehler sind. <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/1106215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106215</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 28 Jul 2006 14:52:10 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 15:36:13 GMT]]></title><description><![CDATA[<p>Okay, werde mir bei Gelegenheit ein Buch kaufen, versprochen :).<br />
Kannst du mich aber derweilen bitte ein wenig schlauer machen, und mir meinen offensichtlichen Fehler bitte erklären? <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="🙂"
    /><br />
Wäre dir sehr dankbar.</p>
<p>MfG, C++Progger(noch nicht :D)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106236</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 15:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 15:48:21 GMT]]></title><description><![CDATA[<p>[Falls du das Lied kennst:]<br />
&quot;Johana give me code, Johana give me...&quot;</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106247</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 28 Jul 2006 15:48:21 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 16:03:43 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/8250">@Swordfish</a><br />
Ist das jetzt ne Herabmache weil ich den Eindruck eines Noobs mache, der sich den Code zusammenpastet?<br />
Wenn du jemandem das Fahrradfahren beibringst, dann sagst du auch nicht zu ihm :<br />
&quot;Leih dir ein Buch aus, damit du's lernst&quot;. Das sagst du höchstens später, wenn er fahren kann, und besser werden will. Er muss ein Grundwissen haben, um selber lernen zu können und besser zu werden.</p>
<p>Um das bitte ich dich hier. Erklär mir bitte das Grundprinzip der WinApi.</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106260</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 16:03:43 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 16:36:13 GMT]]></title><description><![CDATA[<p>C++Progger schrieb:</p>
<blockquote>
<p>Ist das jetzt ne Herabmache, weil [...]</p>
</blockquote>
<p>Nein!</p>
<p>Ich habe auf</p>
<p>C++Progger schrieb:</p>
<blockquote>
<p>Kannst du mich aber derweilen bitte ein wenig schlauer machen, und mir meinen offensichtlichen Fehler bitte erklären?</p>
</blockquote>
<p>mit</p>
<p>Swordfish schrieb:</p>
<blockquote>
<p>&quot;Johana give me code, Johana give me...&quot;</p>
</blockquote>
<p>geantwortet, was soviel bedeutet, wie: &quot;Zeig uns deinen Quellcode, mit dem du Probleme hast.&quot;</p>
<p>Ich bin kein Mensch, der andere aufgrund nicht vorhandenem (Fach-)Wissen runtermacht.</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106289</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106289</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 28 Jul 2006 16:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 17:20:03 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> Alles klar :).</p>
<p>Hier der gesamte Code :<br />
Die Main.c:</p>
<pre><code>#include &lt;windows.h&gt;

#include &quot;Main.h&quot;

static char g_szClassName[] = &quot;MyWindowClass&quot;;
static HINSTANCE g_hInst = NULL;

#define IDC_MAIN_TEXT   1001

BOOL LoadFile(HWND hEdit, LPSTR pszFileName)
{
   HANDLE hFile;
   BOOL bSuccess = FALSE;

   hFile = CreateFile(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
      OPEN_EXISTING, 0, 0);
   if(hFile != INVALID_HANDLE_VALUE)
   {
      DWORD dwFileSize;
      dwFileSize = GetFileSize(hFile, NULL);
      if(dwFileSize != 0xFFFFFFFF)
      {
         LPSTR pszFileText;
         pszFileText = (LPSTR)GlobalAlloc(GPTR, dwFileSize + 1);
         if(pszFileText != NULL)
         {
            DWORD dwRead;
            if(ReadFile(hFile, pszFileText, dwFileSize, &amp;dwRead, NULL))
            {
               pszFileText[dwFileSize] = 0; // Null terminator
               if(SetWindowText(hEdit, pszFileText))
                  bSuccess = TRUE; // It worked!
            }
            GlobalFree(pszFileText);
         }
      }
      CloseHandle(hFile);
   }
   return bSuccess;
}

BOOL SaveFile(HWND hEdit, LPSTR pszFileName)
{
   HANDLE hFile;
   BOOL bSuccess = FALSE;

   hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, 0,
      CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
   if(hFile != INVALID_HANDLE_VALUE)
   {
      DWORD dwTextLength;
      dwTextLength = GetWindowTextLength(hEdit);
      if(dwTextLength &gt; 0)// No need to bother if there's no text.
      {
         LPSTR pszText;
         pszText = (LPSTR)GlobalAlloc(GPTR, dwTextLength + 1);
         if(pszText != NULL)
         {
            if(GetWindowText(hEdit, pszText, dwTextLength + 1))
            {
               DWORD dwWritten;
               if(WriteFile(hFile, pszText, dwTextLength, &amp;dwWritten, NULL))
                  bSuccess = TRUE;
            }
            GlobalFree(pszText);
         }
      }
      CloseHandle(hFile);
   }
   return bSuccess;
}

BOOL DoFileOpenSave(HWND hwnd, BOOL bSave)
{
   OPENFILENAME ofn;
   char szFileName[MAX_PATH];

   ZeroMemory(&amp;ofn, sizeof(ofn));
   szFileName[0] = 0;

   ofn.lStructSize = sizeof(ofn);
   ofn.hwndOwner = hwnd;
   ofn.lpstrFilter = &quot;Gothic Script Files (*.d)\0*.d\0Save Files\0*.sav\0Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0&quot;;
   ofn.lpstrFile = szFileName;
   ofn.nMaxFile = MAX_PATH;
   ofn.lpstrDefExt = &quot;txt&quot;;

   if(bSave)
   {
      ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY |
         OFN_OVERWRITEPROMPT;

      if(GetSaveFileName(&amp;ofn))
      {
         if(!SaveFile(GetDlgItem(hwnd, IDC_MAIN_TEXT), szFileName))
         {
            MessageBox(hwnd, &quot;Save file failed&quot;, &quot;Error&quot;,
               MB_OK | MB_ICONEXCLAMATION);
            return FALSE;
         }
         if(SaveFile(GetDlgItem(hwnd, IDC_MAIN_TEXT), szFileName))
         {
            MessageBox(hwnd, &quot;File saved successfully&quot;, &quot;Succes&quot;,
            MB_OK | MB_ICONEXCLAMATION);
            return TRUE;
         }
      }
   }
   else
   {
      ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
      if(GetOpenFileName(&amp;ofn))
      {
         if(!LoadFile(GetDlgItem(hwnd, IDC_MAIN_TEXT), szFileName))
         {
            MessageBox(hwnd, &quot;Load of file failed&quot;, &quot;Error&quot;,
               MB_OK | MB_ICONEXCLAMATION);
            return FALSE;
         }
         if(LoadFile(GetDlgItem(hwnd, IDC_MAIN_TEXT), szFileName))
         {
            MessageBox(hwnd, &quot;File loaded successfully&quot;, &quot;Succes&quot;,
               MB_OK | MB_ICONEXCLAMATION);
            return FALSE;
         }
      }
   }
   return TRUE;
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{

        HDC hdc ;
        PAINTSTRUCT ps;
        RECT rect ;
   switch(Message)
   {
      case WM_CREATE:
         CreateWindow(&quot;EDIT&quot;, &quot;&quot;,
            WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE |
               ES_WANTRETURN,
            CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
            hwnd, (HMENU)IDC_MAIN_TEXT, g_hInst, NULL);

         SendDlgItemMessage(hwnd, IDC_MAIN_TEXT, WM_SETFONT,
            (WPARAM)GetStockObject(DEFAULT_GUI_FONT), MAKELPARAM(TRUE, 0));
      break;
      case WM_SIZE:
         if(wParam != SIZE_MINIMIZED)
            MoveWindow(GetDlgItem(hwnd, IDC_MAIN_TEXT), 0, 0, LOWORD(lParam),
               HIWORD(lParam), TRUE);
      break;
      case WM_SETFOCUS:
         SetFocus(GetDlgItem(hwnd, IDC_MAIN_TEXT));
      break;
      case WM_COMMAND:
         switch(LOWORD(wParam))
         {
            case CM_FILE_OPEN:
               DoFileOpenSave(hwnd, FALSE);
            break;
            case CM_FILE_SAVEAS:
               DoFileOpenSave(hwnd, TRUE);
            break;
            case CM_FILE_EXIT:
                 /*MessageBox (NULL, &quot;Wirklich beenden?&quot;,&quot;ENDE&quot;,4);  //JA/NEIN
                 if (IDYES)
                 {*/
                 PostMessage(hwnd, WM_CLOSE, 0, 0);
                 /*}*/
            break;
            case CM_ABOUT:
               MessageBox (NULL, &quot;Morpheus Gothic File Editor\nCopyright:\nDieser Editor darf nicht-kommerziel unverändert weitergegeben werden&quot;, &quot;About...&quot;, 0);
            break;
            case CM_FUNC_NPC_KNOWSINFO:

            break;
            case CM_HELP :
                 MessageBox (NULL, &quot;Wähle aus dem Rollout \&quot;Gothic-Optionen\&quot; die passende Option heraus&quot;, &quot;HELP&quot;,0);        
            break;
            case CM_FILE_NEW :
                 MessageBox (hwnd, &quot;Not yet implemented&quot;,&quot;Sorry&quot; , MB_ICONINFORMATION | MB_OK);
            break;
            case CM_FILE_SAVE :
                 MessageBox (NULL, &quot;Not yet implemented&quot;,&quot;Sorry&quot; , MB_ICONINFORMATION | MB_OK);
            break;
         }
      break;
      case WM_CLOSE:
         DestroyWindow(hwnd);
      break;
      case WM_DESTROY:
         PostQuitMessage(0);
      break;
      default:
         return DefWindowProc(hwnd, Message, wParam, lParam);
   }
   return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
   LPSTR lpCmdLine, int nCmdShow)
{
   WNDCLASSEX WndClass;
   HWND hwnd;
   MSG Msg;

   HWND nwnd;

   g_hInst = hInstance;

   WndClass.cbSize        = sizeof(WNDCLASSEX);
   WndClass.style         = 0;
   WndClass.lpfnWndProc   = WndProc;
   WndClass.cbClsExtra    = 0;
   WndClass.cbWndExtra    = 0;
   WndClass.hInstance     = g_hInst;
   WndClass.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
   WndClass.hCursor       = LoadCursor(NULL, IDC_ARROW);
   WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
   WndClass.lpszMenuName  = &quot;MAINMENU&quot;;
   WndClass.lpszClassName = g_szClassName;
   WndClass.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

   if(!RegisterClassEx(&amp;WndClass))
   {
      MessageBox(0, &quot;Window Registration Failed!&quot;, &quot;Error!&quot;,
         MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
      return 0;
   }

   hwnd = CreateWindowEx(
      WS_EX_CLIENTEDGE,
      g_szClassName,
      &quot;Morpheus' File Editor für Gothic&quot;,
      WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, CW_USEDEFAULT, 800, 600,  
      NULL, NULL, g_hInst, NULL);

   if(hwnd == NULL)
   {
      MessageBox(0, &quot;Window Creation Failed!&quot;, &quot;Error!&quot;,
         MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
      return 0;
   }

   ShowWindow(hwnd, nCmdShow);
   UpdateWindow(hwnd);

   while(GetMessage(&amp;Msg, NULL, 0, 0))
   {
      TranslateMessage(&amp;Msg);
      DispatchMessage(&amp;Msg);
   }
   return Msg.wParam;
}
</code></pre>
<p>Die Main.h:</p>
<pre><code>#define CM_FILE_SAVEAS	9072
#define CM_FILE_EXIT	9071
#define CM_FILE_OPEN	9070
#define CM_ABOUT        9069
#define CM_HELP         9077
#define CM_FILE_NEW     9078
#define CM_FILE_SAVE    9079

#define CM_FUNC_NPC_KNOWSINFO 9073
#define CM_FUNC_NPC_HASITEMS 9074
#define CM_FUNC_B_GIVEINVITEMS 9075
#define CM_FUNC_AI_STOPPROCESS 9076
</code></pre>
<p>Die menu.rc:</p>
<pre><code>#include &quot;Main.h&quot;

MAINMENU MENU
{
 POPUP &quot;&amp;File&quot;
 {
  MENUITEM &quot;&amp;New&quot;, CM_FILE_NEW
  MENUITEM &quot;&amp;Open...&quot;, CM_FILE_OPEN
  MENUITEM &quot;&amp;Save&quot;    , CM_FILE_SAVE
  MENUITEM &quot;Save &amp;As...&quot;, CM_FILE_SAVEAS
  MENUITEM SEPARATOR
  MENUITEM &quot;&amp;Exit&quot;, CM_FILE_EXIT
 }

POPUP &quot;&amp;Gothic-Funktionen&quot;
 {
       MENUITEM &quot;Npc_KnowsInfo&quot;, CM_FUNC_NPC_KNOWSINFO
       MENUITEM &quot;Npc_HasItems&quot; , CM_FUNC_NPC_HASITEMS
       MENUITEM SEPARATOR
       MENUITEM &quot;B_GiveInvItems&quot;, CM_FUNC_B_GIVEINVITEMS
       MENUITEM &quot;AI_StopProcessInfos&quot;, CM_FUNC_AI_STOPPROCESS
 }

 POPUP &quot;&amp;Help&quot;
 {
       MENUITEM &quot;H&amp;ilfe&quot;, CM_HELP
       MENUITEM &quot;&amp;About&quot;, CM_ABOUT
 }

}
</code></pre>
<p>Die Msdn Funktion habe ich wieder rausgelöscht.</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106307</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 17:20:03 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 17:34:29 GMT]]></title><description><![CDATA[<p>Entschuldige, ich muss jetzt weg und kann erst morgen deinen Code durchsehen.<br />
BTW: Wo willst du was wofür machen?</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106314</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 28 Jul 2006 17:34:29 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Fri, 28 Jul 2006 17:38:48 GMT]]></title><description><![CDATA[<p>Swordfish schrieb:</p>
<blockquote>
<p>Entschuldige, ich muss jetzt weg und kann erst morgen deinen Code durchsehen.<br />
<strong>BTW: Wo willst du was wofür machen?</strong></p>
<p>Greetz, Swordfish</p>
</blockquote>
<p>Die Frage verstehe ich jetzt nicht...</p>
<p>Bis morgen denne ;).</p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1106316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1106316</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Fri, 28 Jul 2006 17:38:48 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 30 Jul 2006 10:14:36 GMT]]></title><description><![CDATA[<p>Hallo? Es ist schon übermorgen ;). Ich will was lernen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>MfG, C++Progger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107032</guid><dc:creator><![CDATA[C++Progger 0]]></dc:creator><pubDate>Sun, 30 Jul 2006 10:14:36 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 30 Jul 2006 10:30:48 GMT]]></title><description><![CDATA[<p>Ja, entschuldige ich hatte gestern 39.8°C Fieber. Heute sind's noch um die 38°C. Sprich: Denken tut mir im moment ein bisschen weh... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>C++Progger schrieb:</p>
<blockquote>
<p>Swordfish schrieb:</p>
<blockquote>
<p>Entschuldige, ich muss jetzt weg und kann erst morgen deinen Code durchsehen.<br />
BTW: Wo willst du was wofür machen?</p>
</blockquote>
<p>Die Frage verstehe ich jetzt nicht...</p>
</blockquote>
<p>Du hast doch versucht, irgendwo eine Funktion zu verwenden, die du in der MSDN gefunden hast!? Was wolltest du mit dieser Funktion bezwecken?</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107036</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 30 Jul 2006 10:30:48 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 30 Jul 2006 11:26:50 GMT]]></title><description><![CDATA[<p>Swordfish schrieb:</p>
<blockquote>
<p>Ja, entschuldige ich hatte gestern 39.8°C Fieber. Heute sind's noch um die 38°C. Sprich: Denken tut mir im moment ein bisschen weh... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
</blockquote>
<p><em>[Thread-Hijacking-Begin]</em><br />
Oha, na dann mal gute Besserung! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /><br />
<em>[Thread-Hijacking-End]</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107071</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 30 Jul 2006 11:26:50 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 30 Jul 2006 11:30:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/12048">@CodeFinder</a>: Danke! Ich hoff' wirklich, dass ich am Abend wieder halbwegs fitt bin (meine Freundin kommt <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>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107075</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 30 Jul 2006 11:30:21 GMT</pubDate></item><item><title><![CDATA[Reply to Text an Cursorposition kopieren on Sun, 30 Jul 2006 11:37:31 GMT]]></title><description><![CDATA[<p>Sagstmal, hassu ICQ o.ä., habsch disch schonmal gefrägt, aber da hast nix zu gesagt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107081</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107081</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 30 Jul 2006 11:37:31 GMT</pubDate></item></channel></rss>