1,080,439 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by Martje

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

My code was working Great! until i added a vector named "resudibus"to my namespace in a windows form.

#pragma once
#include <Windows.h>
#include <msclr\marshal.h>
#include <iostream>
#include <string.h>
#include <vector>
#include <fstream>
using namespace std;
using namespace System;
using namespace System::IO;
using namespace msclr::interop;

namespace Project1 {

    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;

    /// <summary>
    /// Summary for MyForm
    /// </summary>

    std::vector<int> resudibus(1);

it gives me the following error messages :
WinCLI.obj : error LNK2005: "class std::vector<int,class std::allocator<int> > Project1::resudibus" (?resudibus@Project1@@3V?$vector@HV?$allocator@H@std@@@std@@A) already defined in MyForm.obj

1>fatal error LNK1169: one or more multiply defined symbols found

But i am sure that i havent declared this file anywhere else, when i remove it everything starts to work as usual... What am i doing wrong here?

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

I am having a dialog box opens that lets you select a picture and then copy that picture to another folder but the problem is that i am having an error that says that i can't convert a System::String to a LPCTSTR.
I searched this subject on google but i spent the whole day trying to figure it out.
How should i convert a System::string to a LPCTSR?

if ( openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK )
            {
                strpic=openFileDialog1->FileName;
                CopyFile(strpic,L"pic/",false);
            }
Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Hey guys,
I am having a problem where i want to print a image and a simple string.
i would want that when i print i get this on paper : Click Here For Image

I looked up printDocument, printDialog and printPreviewControl from MSDN and got a few examples but i did not really understand them, i looked up this topic on Google but its very little discussed.

I don't know the procedure on how to print to paper so if someone can explain to me how its done it would be very appreciated or if you can make an example code snippet i would be very thankful.

Thank you in advanced

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Hey guys,
You know when you are about to buy an item online you have to insert your address, etc and after a few days you will receive the product at the address you provided.
Well i am setting up an online business that offers products but i am stuck because i don't know where i should go or which companies offer these kind of services.
If you know any companies that offer these services pleas let me know and if you had experience with any of them also let me know as it would be great.
Thank you in advanced.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0
Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Yes i want to capture it in place of a button press (like you would in an instant messenger)

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

I have been trying to capture the enter key in a windows.net textbox but i have no idea how to do it, i googled searched but the only examples i find are visualbasic and c# ones and when i try to do thesame thing in c++ in doesnt work.

I am using visual c++ express 2008 and i am working with windows forms(.net)
I hope thats enough information for you guys to be able to help me.
Thanks in advanced.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Thank you Jonsca,

and next time i will describe my topics and post's better.

Thank you,

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Yes i do, i cant figure out a way to do this.
When i give it a empty string it gives me a segfault.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Hi all,
I add picture to my pictureBox by writing the following code : pictureBox->BackgroundImage = System::Drawing::Image::FromFile() But how would i remove that image ones i am done using it?


Thank you in advanced.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Nevermind, i already got the answer.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Yes i think thats what i am going to do.
Thank you.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Are you trying to get the filename back from something you've assigned earlier to the BackgroundImage property?

Yes.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

How would i get an imageBox Background image file location ?
Thanks in advanced.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Hey guys,

How would i get an imageBox Background image file location ?
Thanks in advanced.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

yes its a visual studio list box, after a more serious and very deep research i found the answer...
i had to use listBox1->Items->Count

thanks for your help man, i feel like a dorn tho cause the answer was infront of my face :P

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

yeah its returning an object thing, i did not found any similar functions tho...

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

converting a int to a string works but i am noticing that listBox1->Items isnt returning a number...
i really have no idea how to return the amounts of items i currently have in a listBox.

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0

Ah now i understand your point,
i have a listitem box with 3 items(item1,item2 and item3) i want my messagebox to tell me that i have 3 items so when i use show() its suppose to tell me 3.

If you dont understand what i want tell me and ill try to explain better(my english is a little bad so pleas have patience with me)

Martje
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 16
Solved Threads: 0
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page generated in 0.1315 seconds using 2.63MB