Jump to content

Linking button to textbox

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
21 replies to this topic

#1
BrasilianBR

BrasilianBR

    Newbie

  • Members
  • Pip
  • 1 posts
Sort of.

I'm using Visual Studio 2005 and coding in Visual c++. The problem I'm having is linking my browse button to a text box. I'd like a file selected in the browse window to display in a textbox next to it (the file's path, if you will). If anyone could help me out here, it'd be much appreciated.

Thanks in advanced.

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
It depends on how you opened the file. If you have a string variable somewhere, then just use that. If you used the CommonDialog object, there's a LPSTR field in the OFNSTRUCT that you can read. Otherwise you'll have to post more information.

#3
directoryxd

directoryxd

    Newbie

  • Members
  • Pip
  • 3 posts
I will try as i am a new here i heve to get some knowledge ...
medifast weight lossLas vegas hotels

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
How did you open the file, anyway?

#5
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
With a spanner.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
I don't get it.

#7
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts
Xav meant a file scanner. In order to read text out of a file, you need to read it using a text scanner from the standard libraries provided :)

#8
MeTh0Dz

MeTh0Dz

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,119 posts

morefood2001 said:

Xav meant a file scanner. In order to read text out of a file, you need to read it using a text scanner from the standard libraries provided :)

Once again your wrong.... You don't have to use a 'standard library' to read a text file.

You can use APIs. CreateFile() ReadFile()

Sigh... Please stop.

#9
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts

MeTh0Dz|Reb0rn said:

Once again your wrong.... You don't have to use a 'standard library' to read a text file.

You can use APIs. CreateFile() ReadFile()

Sigh... Please stop.

I have always used the standard template library to read a file. I have never seen the APIs such as ReadFile() read files.

Programming has many approaches which are all right, it all depends on which method you like more (or are more familiar with).

#10
MeTh0Dz

MeTh0Dz

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,119 posts
If you aren't educated on something, then don't say you have to do it a certain way...

#11
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts

morefood2001 said:

Xav meant a file scanner. In order to read text out of a file, you need to read it using a text scanner from the standard libraries provided :)
LOL I actually did mean "spanner", as a DIY pun. :D
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#12
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts
Methodz: I never did, did I? :/

And xav, I know that file scanners exist in c++ because i've used them, so I figured you made a typo :P