Tlink sample in MFC

I have the Tlink sample from the Platform SDK, I can get it to work in its own console project with no windows. I am trying to to get this code to compile in a Dialog Based App Wizard app. I have been playing with all the settings but to no avail, is it possible to run this code within MFC. or can I specify not to compile the tlink specific file not in MFC, I've tried many combinations but none seem to work. (not to mention the pulldown "how your program links to MFC is greyed out")

Should I do this in a DLL?

Anyway, If someone has any input let me know.
LVL 2
lucidityAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RONSLOWCommented:
Generate a dialog-based app.

The best place to put the code you want to test is in OnInitDialog.

I'll check out TLINK sample and give you further info.

0
RONSLOWCommented:
I cannot find a tlink example in the SDK.  What does it do?  What area of the SDK samples is it in?  Are you sure that is called Tlink?
0
lucidityAuthor Commented:
its in the Samples\SDKTool\Tlist directory, sorry... TList
Sorry I guess I misspelled it the first time

appologies

Jason
0
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

RONSLOWCommented:
First create a dialog that has a list box to hold the output and an OK button (don't need cancel).  Create a CListBox control variable with class wizard

In your OnInitDialog, do the code from main (without command arg checks)

Change the PrintTask function so that it adds the info to the list control instead of printing it.

That's about it.

Give it a go and I can help you further with other problems

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lucidityAuthor Commented:
its a little more complicated than that I'm afraid. but I did figure in out myself. I have to go in a specify not to use pre-compiled headers for the Tlink common.h and common.c then put in type conversions for all the (void *) conversions, like HANDEL to HMODULE blah blah, anyway, if anyone wants the code email jason@themediaco.com.
0
RONSLOWCommented:
Glad you worked it out .. it usually isn't to difficult to convert a console app to a dialog app - just time consuming.

0
lucidityAuthor Commented:
thats the stupidist answer I have ever heard. I have the same same I got it to work in MFC with only minor changes.
0
RONSLOWCommented:
eh?
0
lucidityAuthor Commented:
same sample. Tlink...
0
RONSLOWCommented:
"thats the stupidist answer I have ever heard"

What do you mean stupid?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.