Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hi,

ich hab mit dem Resourceneditor in MSVC++6 einen Dialog erstellt und will diesen

als Hauptfenster benutzen. Seltsamerweise funktioniert das nicht.

Hier mein ansatz:


APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG Msg;

hMainWindow = CreateDialog(hInstance,MAKEINTRESOURCE IDD_DOWNLOAD),
0,MainProc);
if (hMainWindow = NULL)
int i = GetLastError();
ShowWindow(hMainWindow,nCmdShow);


while(GetMessage(&Msg,0,0,0))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}
[/PHP]

Es tritt kein Fehler auf, aber es wird auch kein Dialog angezeigt.

Gruß

Guybrush

Hi,

versuch mal bei der WM_INITDIALOG eine 1 oder TRUE zurückzugeben.

Also, das hier läuft:

#include <windows.h>
#include "resource.h"

HWND hMainWindow;

INT_PTR CALLBACK MainProc( HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam )
{
switch( uMsg ) {
case WM_COMMAND:
switch( wParam ) {
case IDCANCEL:
PostQuitMessage( 0 );
break;
default:
break;
}
break;
default:
break;
}
return 0;
}

APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG Msg;

hMainWindow = CreateDialog(hInstance,
MAKEINTRESOURCE(IDD_DIALOG1 ),
0,
MainProc);

ShowWindow(hMainWindow,nCmdShow);

while(GetMessage(&Msg,0,0,0))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}
[/CODE]

  • Autor

Ich hab mal deinen Code ausprobiert Klotzkopp und es hat auch nicht geklappt, bis

ich einen anderen Dialog erstellt habe. Mit dem gings dann.

In meinem IDD_DOWNLOAD befindet sich eine Progress Bar und wenn ich die weg mache,

dann gehts, sobald ich sie wieder rein gehts nicht mehr:confused:

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.