There's some evil inconsistency ...

In function.h, you declare:

void input(int* &pi, int& n, ifstream &fin);

whereas, in function.cpp you have:

void input(int* &pi,int& n, fstream &fin)

i.e., ifstream vs. fstream.

I would start by verifying that your function calls succeed. I.e., does ImageList_Create(...) succeed? How about the ImageList_AddIcon(...) calls and so on and so forth.

Mostly guessing .. your filename DirectX8.cpp somewhat suggests that the code might actually be originally for DirectX 8 - if that's so, you should check whether CreateVertexBuffer()'s signature has changed in-between the 8 vs. 9 versions (i.e., has DirectX 9 CreateVertexBuffer() dropped a parameter?).

How about using the LPARAM lp? (MSDN: An application-defined value to be passed to the callback function.)

I think you need to have a virtual destructor (currently you are observing undefined behaviour).

I believe your problem(s) have already been pointed out, but ..

anyone know what is this error

Microsoft has documented their compiler/linker error/warning codes, so, you can always look those up on MSDN, for example Compiler Error C2780.

Then again, are you still trying to select a folder using GetOpenFileName() (which is intended for selecting files)?
...
Yes, because the UI is better than any other specific folder dialog, so it would be very nifty to be able to use it.

I was implying that it is highly unlikely that you'd find any kind of solution using GetOpenFileName(), strictly because it is not intended for selecting folders.

I ran the sample from the link you sent me, and it's exactly what it's doing: using the GetOpenFileName() GUI to selecte folders!

The GUI that you're seeing may be alike that of GetOpenFileName(), but the code does not invoke GetOpenFileName(), which (again) is a key point.

I'm still curious to know what I'm doing wrong with the hook function, but I will certainly use your sample instead.

You might post your exact code, maybe someone here might figure out what's wrong with it.

Any idea what I'm doing wrong that prevents pnmh->code from having the real code event?

Not really, except maybe you are still doing some wild stuff ( like say, PostMessage (hdlg, IDCANCEL, 0, lTime); ) and suffering because of it? Or is your switch/case missing a break and you are falling through to CDN_FOLDERCHANGE?

Then again, are you still trying to select a folder using GetOpenFileName() (which is intended for selecting files)?

If you are unhappy with the SHBrowseForFolder(), perhaps have a look at the Show Shell common file dialog sample from MSDN.

In your hook procedure, you need to use the parent of the hdlg in order to make CommDlg_OpenSave_GetFolderPath() work, i.e. CommDlg_OpenSave_GetFolderPath(GetParent(hdlg), ...);

PS. I think attempting to cancel the selection inside CDN_FOLDERCHANGE switch, is frankly a horrendous idea.

Uh-oh, the story goes on, i.e., after a Ctrl+F5 (and nothing else) the upload feature disappeared (as described above). Then again, after exiting this thread/article and coming back to it, without doing anything cache-related, the upload feature magically reappeared (in its plentifulness).

Moreover, after clearing the cache, I can confirm that the upload feature is still present (again, in its plentifulness).

PS. I could have sworn that once upon a time, Ctrl+F5 made FF clear the cache, but maybe I'm wrong.

We've seen that one before, and clearing the cache was one of the fixes that corrected it. If you haven't already tried clearing the cache, please do so and see if it helps.

We use a lot of scripting on Daniweb, and occasionally it conflicts with the straight HTML stuff in funky ways when the scripts are out of date. That's why if there's a problem related to scripts, the first suggestion we'll make is to clear your cache.

On FF 18.0.1 (release version) / Windows 7, clearing the cache (Ctrl+F5) resulted in not seeing any upload fields/buttons i.e., clicking on Files gives me the "Files will automatically be attached to the post upon upload. Optionally, you can embed uploaded images within your post." text without a possibility to upload anything -- dang(!)

Testing upload on Firefox 18.0.1 on Windows 7 ...

Hmm, after having pressed Files on the toolbar, I get to see two upload fields+buttons (pic #1).

Now, after having selected a file to be uploaded, I get to see no less than five upload fields+buttons (pic #2).

upload

upload2

EDIT: Just realized that Ancient Dragon already described this 'multitude of upload opportunities' .. duh.

what i missed from requiremnets

Something you certainly missed, the requirements seem to state that:
... For a given positive integer K of not more than 1000000 digits ...

Also, in general, you are not supposed to output anything which is not mentioned in the requirements (I'm referring to the line #45 (cout << "number must less ... )).

You might find people eligible for the chocolate eclair at the Visual C++ forum(s)

Regarding VS2010, i'm getting the following error "Intellisense 'Unavailable for C++/CLI" when using "->" or "::" anyone knows how to correct this error?

Microsoft did not provide the Intellisense feature for C++/CLI in VS 2010, in VS 2012 it is available though -- i.e., you may want to switch to VS 2012 altogether.

World famous lies? Hardly. Try
Trickle down economics works (Reagan)

Here's a picture to accompany your claim .. some Friday humour from Zerohedge ..

All registered members are well familiar with the Member Rules.

The Euro crisis is over.

According to the Wikipedia, the C++ is a programming language

At present there's no feature for marking a single post as being the solution, aside from voting and adding reputation to that post, of course. It's in the cards, just not implemented yet. ;)

In that case, would it be possible to have a feature so that only the reply/replies providing the solution would be displayed (i.e. a kind of new viewing mode)?

commented: Thank you :P +0

Phew, I got it made! I posted the code here, please study it carefully.

By the way, this is a C++ forum - the C forum is right next door.

Great, computer shop project sounds like something interesting. Here is a fully working starting point for you ..

//
// Computer shop program (skeleton).
//
// Should compile cleanly on modern compilers.
//

#include <iostream>

int main()
{
    //
    // The program begins, let's display a friendly title ..
    //
    std::cout << "Welcome to the computer shop!" << '\n';

    // Todo: ... 
}

I'd like to recommend reading about File and Registry Virtualization in Vista/Windows 7 in general - here's one link you could start from: User Account Control Data Redirection

Also, you might have a look at perror().

Thinking about my 92yo grandmother .. I'd add this one:

ITITAN = I think I'll take a nap.

.. and certainly ..

W! = WHAT!?

(She doesn't have a hearing aid yet, but definitely needs one)

Just in case anyone finds the topic interesting enough, somewhat detailed discussion pertaining to Microsoft's implementation can be found at: Mismatching scalar and vector new and delete

.. and Answers to exercises - mismatching new/delete

You want to make sure that you are NOT trying to execute the DEBUG version of your executable on machines not having Visual Studio (2008) installed, i.e. build and use the RELEASE version on such machines.

commented: good suggestion :) +14

Are you possibly ignoring (m)any compiler warnings?

I know this is solved, but a detail which should not go unnoticed, namely

// Allocate ...
b = new int[1000000];

// ... and delete
delete [] b;

//// instead of
// delete b;

A cast like (LPWSTR)Buffer only silences your compiler but does not correct the problem. I'd suggest reading some tutorials ..

The Complete Guide to C++ Strings, Part I - Win32 Character Encodings

The Complete Guide to C++ Strings, Part II - String Wrapper Classes