Solved

Passing HWND as a parameter via constructor or function

Posted on 1998-07-02
2
338 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

734 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