921 Posted Topics

Member Avatar for 2008macedonkon3

Try this: [CODE] [COLOR="Red"]FORMNAME[/COLOR] ^myform = gcnew [COLOR="Red"]FORMNAME[/COLOR](); myform->ShowDialog(); [/CODE]

Member Avatar for William Hemsworth
0
70
Member Avatar for zzmgd6

Here is how I learn Win32 API, It is a very good tutorial: [URL="http://www.rohitab.com/discuss/index.php?act=Attach&type=post&id=698"]http://www.rohitab.com/discuss/index.php?act=Attach&type=post&id=698[/URL]

Member Avatar for vijayan121
0
2K
Member Avatar for 13L4D3
Member Avatar for Evan M

Have you tried adding [CODE=CPP]using namespace std;[/CODE] before defining the [B]Dot[/B] class ?

Member Avatar for Evan M
0
521
Member Avatar for Jennifer84

Give form2 a topmost value so it always appears above other windows, or open it as a dialog (you wont be able to use form1 until form2 is closed).

Member Avatar for Jennifer84
0
123
Member Avatar for aaaaaa1
Member Avatar for softjaddyhard

I put togeather an example to show you how to read words and compare them with each other, mabey this can get you started. [CODE=CPP]#include<iostream> #include<sstream> using namespace std; int main() { stringstream str("word1 word2 word1 word word1 word2"); string match = "word2"; string word; int count = 0; while …

Member Avatar for Narue
0
85
Member Avatar for monkey123
Member Avatar for FTProtocol

Yep, there was a discussion on that not so long ago on the last few posts. [url]http://www.daniweb.com/forums/thread130222.html[/url]

Member Avatar for William Hemsworth
0
153
Member Avatar for Black Magic

I personally think you would be able to start Win32 GUI programming. Its really not that hard to learn, it just takes time. A good place to start would be most common Win32 tutorial on the web.. :P [url]http://www.winprog.org/tutorial/start.html[/url] But just incase, the main things you need to know about …

Member Avatar for William Hemsworth
0
140
Member Avatar for camthalion95

I say do your own dirty work, don't try and get other people involved in cheating.. :angry:

Member Avatar for hacker9801
0
208
Member Avatar for Q8iEnG

The variable [B]fin[/B] is destructed before you use it. For this to work you would have to arrange it slightly differently. [CODE]switch( choose ) { case 1: // Constructor that opens the file ifstream fin("madlip1.txt"); // If statement to check if the file can be opened or not. if( !fin …

Member Avatar for Q8iEnG
0
208
Member Avatar for TheBeast32

I found this code on the web some time ago and saved it. It seems to do exactly what you want :) Heres a quick example of how to save the top left corner of the screen. [CODE=CPP]#include<iostream> #include<windows.h> using namespace std; inline int GetFilePointer(HANDLE FileHandle){ return SetFilePointer(FileHandle, 0, 0, …

Member Avatar for TheBeast32
0
1K
Member Avatar for scratchnloved

Communication with other applications isn't very difficult, the hardest part is just finding the window and the rest is easy. Here is an example which opens [B]notepad.exe[/B], gets its handle and sends the message [B]WM_KEYDOWN[/B] a few times. [CODE=CPP]#include<windows.h> HWND notepad = NULL; BOOL CALLBACK WindowEnumProc(HWND hwnd, LPARAM lParam) { …

Member Avatar for scratchnloved
0
120
Member Avatar for adamj2

What about the datatype [B]__int8[/B], is that guaranteed to be 8-bit? Because it seems to act exactly as a char and would be abit misleading otherwise.

Member Avatar for adamj2
0
450
Member Avatar for totaljj

First, you have to load the image using a function like [URL="http://msdn.microsoft.com/en-us/library/ms532309.aspx"]LoadBitmap[/URL] (may only work for [B].bmp[/B]) or [URL="http://msdn.microsoft.com/en-us/library/ms648045(VS.85).aspx"]LoadImage[/URL], and using some GDI functions like [B]GetPixel[/B] you can retrieve a pixel from its HDC. You will probably want to look at a tutorial on GDI before trying this.

Member Avatar for William Hemsworth
0
100
Member Avatar for vender hak

I think you need Visual Studio 2005 at least to do .NET applications. Download visual Studio 2008 express version here. [url]http://www.microsoft.com/express/download/#webInstall[/url]

Member Avatar for vender hak
0
92
Member Avatar for Serunson
Member Avatar for guest7

Its very simple to do. All you need is one function that converts an integer to a 3 bit binary number. If fact, its so simple I will give it to you :) [CODE=CPP] #include <iostream> #include <ctime> using namespace std; void toBin(int num, char *lpStr, int len) { lpStr[len] …

Member Avatar for tesuji
0
205
Member Avatar for Black Magic

Seems to be good :) Only problem I had was that I had to include <ctime> in order to compile it.

Member Avatar for Black Magic
0
92
Member Avatar for CoolGamer48
Member Avatar for ghadahelal

that is because the function [B]atoi[/B] isn't for converting a [B]char[/B] to an [B]int[/B], it converts a string (char array) to an [B]int[/B]. If you want to convert a [B]char[/B] to an [B]int[/B] you need to type cast. for example: [CODE=CPP] char a = 'z'; int num = (int) a; …

Member Avatar for William Hemsworth
0
86
Member Avatar for raj157
Member Avatar for William Hemsworth
0
736
Member Avatar for bdjhall

Well, you didn't really specify your problem, but this might solve your problem. :) [CODE] // function example #include <iostream> #include <string> using namespace std; int addition (int a, int b) { int r; r=a+b; return (r); } int main () { string mystring2; string mystr; int z; z = …

Member Avatar for bdjhall
0
124
Member Avatar for margierose

[QUOTE=tesuji;632471]hey, you may try recursive function baseb: [code=c++] void baseb(int b, string fi, unsigned int nb, string &f){ int p = nb % b; nb = nb / b; if ( nb > 0) baseb(b, fi, nb, f); f=f+fi[p]; } int main(){ int b = 16, nb = 2008; string …

Member Avatar for William Hemsworth
0
160
Member Avatar for Black Magic

The reason you got 46 twice there isn't because the random number happends to be the same, its because you are printing the same variable twice without modifying it. If you want to make it so each number can only come up once, you have to make an array for …

Member Avatar for VernonDozier
0
183
Member Avatar for Ellisande

It seems a bit pointless to have double the amount of cases than you actually need. [CODE] //when user inputs a char.. char classChoice; cin>> classChoice; switch([COLOR="Red"]tolower[/COLOR](classChoice)) { case 'w': cPtr = new Character(/*Warrior stats here*/); break; case 'm': cPtr = new Character(/*Mage stats here*/); break; default: cout << "Improper …

Member Avatar for Ellisande
0
127
Member Avatar for cam9856

Try this, I haven't read it yet.. but its supposed to be good. :icon_mrgreen: [url]http://beej.us/guide/bgnet/[/url]

Member Avatar for cam9856
0
155
Member Avatar for lazytypist

Im not sure why, but I had a go at making this and succeeded but im not going to give you the solution to it, so you can at least have a go at it yourself. But I will tell you how I managed it. [LIST=1] [*]I made two function, …

Member Avatar for William Hemsworth
0
156
Member Avatar for salman213

[QUOTE]You're not very quick, are you?[/QUOTE] I see what you mean :D [QUOTE]So your telling me what is being displayed on my windows screen is the output of a C++ program?[/QUOTE] Most probably.

Member Avatar for Narue
0
577
Member Avatar for zoner7

Because a local object will destruct at the end of the code block / function and therefore you will be returning an invalid reference.

Member Avatar for ff4930
0
88
Member Avatar for ShellB12

You are missing the null terminator at the end, but that shoulden't explain why its outputting the address of [ICODE]t[/ICODE]. The correct way to do it would be like this: [CODE=CPP] char trig [10] = "cos(50)"; //declare and assign the char array "trig" char t [4]; //declare char array t …

Member Avatar for iamthwee
0
107
Member Avatar for &rea

Isn't it just: [CODE=CPP]binaryImage->Save("binaryImage.bmp");[/CODE]???

Member Avatar for &rea
0
95
Member Avatar for Black Magic

This is what you do when your bored ?! I suggest you try learning the Win32 API to be able to make proper window applications, and then mabey move on to MFC when you get the hang of that. From there you should be able to make basic games / …

Member Avatar for Prabakar
0
125
Member Avatar for delixir
Member Avatar for DigitalPackrat
-1
300
Member Avatar for ar31an

[QUOTE=Sky Diploma;627852]Yes , If you are using Windows As An OS. YOU CAN TRY [code] system(cls); [/code] To Clear the whole thing up and then a printer function added in.[/QUOTE] I guess you ment [CODE]system("cls")[/CODE]

Member Avatar for William Hemsworth
0
208
Member Avatar for comply or die

I suggest you get yourself a good book on C++ because it looks like you have no idea what your doing in some places :icon_neutral: You should also learn to format your code better, you have about 10 empty lines near the end and your indentation is messed up. I …

Member Avatar for comply or die
0
172
Member Avatar for Kadence

In addition to what [B]niek_e[/B] sead, you could make things easier by using some windows macros. [CODE=CPP] #include<windows.h> #include<iostream> using namespace std; int main(){ /*max 65535 (= sizeof(unsigned int) /2) */ unsigned int i = 2222; unsigned int j = 1111; unsigned int combined = MAKELONG(i, j); cout << LOWORD(combined) …

Member Avatar for dougy83
0
193
Member Avatar for FreeFull

On line 11 and 19 you cannot compare a char string using the [B]==[/B] operator. Instead use [B]strcmp[/B] [url]http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html[/url]. Line 11: [CODE]if((argv[i] == "-h" | argv[i] == "--help" ) && help != 1)[/CODE] Should be: [CODE]if ((strcmp(argv[i], "-h") == 0) | (strcmp(argv[i], "--help") == 0)&&help != 1)[/CODE] Do the same …

Member Avatar for William Hemsworth
0
122
Member Avatar for Pikachumanson

It would have been much more practical if you had attached the many pages of code... But just a few mistakes / tips: [LIST=1] [*]Dont use [ICODE]system("pause")[/ICODE] : [url]http://www.gidnetwork.com/b-61.html[/url] [*]In your switch statement [ICODE]switch (move)[/ICODE] you have including double the amount of cases than you actually need, just define it …

Member Avatar for Pikachumanson
0
261
Member Avatar for cmatos15
Member Avatar for GallantAlex

[QUOTE]Wow, I cant believe I couldnt find that online myself. Thanks its exactly what I needed.[/QUOTE] Yep, I dont even think [B]Ancient Dragon[/B] looked online for that site :icon_wink: But try this tutorial, I think it will help you. [url]http://winprog.org/tutorial/start.html[/url]

Member Avatar for William Hemsworth
0
487
Member Avatar for AceChandra

You could also make it so you dont have to manually set the array size like this: (Assuming your not dynamically allocating the array) [CODE=CPP] int nums[] = {324, 5462, 2}; int average = 0; short arraySize = sizeof(nums) / sizeof(*nums); for (short i = 0; i < arraySize; i++) …

Member Avatar for William Hemsworth
0
176
Member Avatar for kpsmiling.4ever

Set yourself a challenge like making a function to determine wheather or not a number is a prime. If you get stuck, use google to figure out your problem. :icon_lol:

Member Avatar for William Hemsworth
0
124
Member Avatar for bookworm619

Because you havent formatted your code very well, you missed out a curly bracket during your switch statement. I have formatted and made the following corrections for you: [CODE=CPP] /*------------------------------------------------------------------ * Assignment 7: FIRST LINKED LIST ASSIGNMENT. *Worth: 50 points *Made by: Samuel Georgeo (max11) create an in-memory SERIALLY linked-list …

Member Avatar for mitrmkar
0
417
Member Avatar for herms14

You have left alot of space between lines, and you shouldent use [B]system("pause")[/B] ([url]http://www.gidnetwork.com/b-61.html[/url])

Member Avatar for mitrmkar
0
111
Member Avatar for sniper29

[QUOTE]i dont know how to make array on a function...[/QUOTE] :icon_idea: Ever heard of google?

Member Avatar for jephthah
0
492
Member Avatar for SakisLam

You will have to create another bitmap and use [B]BitBlt[/B] to copy the data to it, more info here. [url]http://msdn.microsoft.com/en-us/library/aa930997.aspx[/url]

Member Avatar for Tigran
0
99
Member Avatar for Flixter

This might not help with your exact problem, but don't use [B]void main()[/B] as [B]Salem[/B]'s avatar will clearly show you :)

Member Avatar for Flixter
0
130
Member Avatar for chrisfrolich

3 Threads posting the same problem.. ? Doesn't anybody try to do their homework by themselves anymore ?? You could have all helped eachother with it and you would figured out the problem in no time. :P

Member Avatar for chrisfrolich
0
364

The End.