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

Hallo erstmal,

ich habe nach langer zeit wieder eimal ein problem mit 'SHBrowseForFolder' und 'BIF_NEWDIALOGSTYLE'.

Das ist mein Code:

  

#include "stdafx.h"

#include "BrowseForFolder.h"

#include "BrowseForFolderDlg.h"


#include <shlobj.h> 

#include <ole2.h>

#include <objbase.h>


.

.

.


void CBrowseForFolderDlg::OnBrowse() 

{

	char szBuffer[MAX_PATH];


	CString csDir, csLable;

	CoInitialize(NULL);


	BROWSEINFO Bif;

	LPITEMIDLIST lpList;


	ZeroMemory(&Bif,sizeof(Bif));


	Bif.lpszTitle		= _T("text");

	Bif.ulFlags = BIF_NEWDIALOGSTYLE;


	lpList = SHBrowseForFolder(&Bif);


	if (lpList != NULL)

	{

		SHGetPathFromIDList(lpList,szBuffer);

		if (szBuffer[0] == '\0') 

			GetCurrentDirectory(sizeof(szBuffer),szBuffer);

	}

	else

	{

		GetCurrentDirectory(sizeof(szBuffer),szBuffer);

	}


}

und das der Fehler:
: error C2065: 'BIF_NEWDIALOGSTYLE' : nichtdeklarierter Bezeichner
Wenn ich die Zeile

Bif.ulFlags = BIF_NEWDIALOGSTYLE;

rausnehme funktioniert es.

BIF_NEWDIALOGSTYLE soll erst ab vers. 5.0 der shell32.dll unterstützt werden.

BIF_NEWDIALOGSTYLE

Version 5.0. Use the new user interface. Setting this flag provides the user with a larger dialog box that can be resized. The dialog box has several new capabilities including: drag-and-drop capability within the dialog box, reordering, shortcut menus, new folders, delete, and other shortcut menu commands. To use this flag, you must call OleInitialize or CoInitialize before calling

ich arbeite mit VC++ 6.0 unter win 2000 mit sp4.

Version shell32.dll:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/versions.asp

also sollte das passen.

und die Initialisierung hab ich auch gemacht.

wo liegt mein problem???

treffer ... versenkt.

ich habe zwar alle möglichen SDKs auf den Rechner aber das Plattform SDK

nicht. Hab den Code auf einem recner mit Plattform SDK ertellen lassen und, was

soll ich sagen, es geht.

Das SDK ist auch riesig gross, installiert über 500MB. Muss ich für das obige

Problem alles installieren?ich denke nicht. Die Frage ist, was brauche ich davon?

Ciao TinTin

ok, installiert habe ich. die 'shlobj.h' ist auch dabei.

was muss ich denn an den bei den includes und libs andern.

wenn ich das neue include verzeichnis hinzufüge kommt immer noch der gleich

fehler. nehme ich das alte include verzeichnis raus kommen neue fehler.

z.b. kann afxres.h nicht finden

TinTin

OK,

alles klar! Ich hab die Reihenfolge der Includes und der Libs geändert. Zuerst

die des SDKs und dann die alten. Jetzt funktioniert es. Danke für die Hilfe.

C:\Programme\Microsoft SDK\include

C:\PROGRAMME\MICROSOFT VISUAL STUDIO\VC98\INCLUDE

C:\PROGRAMME\MICROSOFT VISUAL STUDIO\VC98\MFC\INCLUDE

C:\PROGRAMME\MICROSOFT VISUAL STUDIO\VC98\ATL\INCLUDE

Ciao TinTin

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.