Solved

Passing HWND as a parameter via constructor or function

Posted on 1998-07-02
2
331 Views
Last Modified: 2008-03-06
How can I pass the HWND of the main window via a constructor or function from the winmain to a class.  when I do I get the following error upon linking:

error LNK2001: unresolved external symbol "public: void __thiscall FileDialog::OpenTheFile(struct HWND__ *)" (?OpenTheFile@FileDialog@@QAEXPAUHWND__@@@Z)

thanks in advance.
0
Comment
Question by:rgrandid
2 Comments
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1167071
Can you please provide more info? Class declaration and function implementation would be most helpful.
0
 
LVL 23

Accepted Solution

by:
chensu earned 10 total points
ID: 1167072
It seems that you declare FileDialog::OpenTheFile member function in the header file but forget to specify FileDialog when you define OpenTheFile function in the source file.

Is your code like this?

void OpenTheFile(HWND)
{
    // your code here
    // ...
}

It should be like this.

void FileDialog::OpenTheFile(HWND)
{
    // your code here
    // ...
}

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now