- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 5
- Downvotes Received
- 9
- Posts with Downvotes
- 5
- Downvoting Members
- 7
52 Posted Topics
This is strange, I looked it up and by default C# should pass parameters by value but I've always had them get passed by pointer. ie [ICODE] public class foo { public foo() { derp = 123456; } public int derp; } public static void dontcare(foo z) { z.derp = …
Seen it asked for so here it is.[code]#include <Windows.h> #include <iostream> #include <conio.h> using namespace std; #define ClearScreen() system( "CLS" ) class _Notepad { public: _Notepad() { ZeroMemory( &Buffer, sizeof( Buffer ) ); pt.x = 1; pt.y = 1; } void GetUserString(); void SendToChild(); private: HWND nphWnd; POINT pt; char …
[CODE]#include <iostream> using namespace std; int main() { float Num; printf( "Enter a number: " ); cin >> Num; if( Num <= 2.0f ) { printf( "Enter number that is bigger than 2" ); exit( 0 ); } while( 1 ) { if( Num == 2.0f ) { printf( "\nPower …
Hi all, Ive been trying to find a seek method for StreamReader. I want to be able to reverse the file buffer by a couple characters at a time. How I have everything set up. [CODE] private void SortThread() { string[] lines; string line, totalLine = null; char[] fileInput = …
There is a coupe of ways with List. [CODE]addresses.Remove(put the object in here); addresses.RemoveAt(put the index number here); addresses.RemoveRange(starting index number here, amount of items to remove here);[/CODE] for removing by object, index, or a range.
I am interested in being able to make a C++ win32 program that will simply display someones profile on a phpbb3 forum when they enter in their credentials. I've already made the GUI and other misc code needed for displaying the information, but I dont know how to make the …
[CODE]HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] When I included a dll file into my project, I used: [CODE]fstream …
I've been trying to disable the desktop ( in its entity ) so that no window can get focus and I can draw on top of it. Since creating a fullscreen window and drawing on that will lag all the other windows. Ive tried WM_ENABLE and EnableWindow with the handles …
When I included a dll file into my project, I used: [CODE] HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] …
I have tried resizing the taskbar with all the normal Windows APIs SetWindowPos MoveWindow SetWindowPlacement But to no avail. The taskbar does not even flinch, what would be a good way to adjust it in its width, height, pos.
[CODE]class C_Class { public: struct _Get { void foo( void ) { m_Var = 0; } }Get; struct _Set { }Set; long m_Var; };[/CODE] I like to organize my functions with get and set structures [CODE] Get.ThisThing(); Set.ThisThing();[/CODE] But my structure's functions cant access the classes members unless I make …
I wanted to use a window style that was border-less or had a 1 pixel wide border, but was re-sizable. It was not actually possible so I tried changing the window style with SetWindowLong() then using SetWindowPos() with SWP_FRAMECHANGED and AdjustWindowRect() It allowed me to resize the window but it …
Win32 api's are easy and very flexible. You can create great looking applications within weeks.
Example: [CODE] class foo { public: void DoNothing() { cfee.AddNothing(); } }; class fee { public: void AddNothing() { int a = 0; a += 1; } }cfee;[/CODE] Is there a way to call a function in a instance of a class that was declared after the creation of the …
I have made a simple test application that I use to paint objects while I study and try to give them physics such as gravity, velocity, wind, momentum, etc. I have the app setup like this: [CODE]WM_PAINT PaintFunction(); break; DWORD CalculationsThread() { while( 1 ) { //-_-_Calculations here SendMessage( WindowsHandle, …
Goal: Get USB drive letter upon insertion. Done so far: Detection of drive. ------------------------------------------------------------- Im using the method of RegisterDeviceNotification() [CODE]WM_DEVICECHANGE // Received message | DBT_DEVICEARRIVAL // Received Message | DEV_BROADCAST_HDR // Pointer from lParam | PDEV_BROADCAST_VOLUME //Pointer from DEV_BROADCAST_HDR Pointer [/CODE] When getting the index drive letter from dbcv_unitmask. …
[QUOTE=Frederick2;1150074]The reason you are not getting any replies Nicholas is because what you are trying to do isn't doable.[/QUOTE] It is doable..... Not simple, But doable.
[url]http://www.cplusplus.com/doc/tutorial/files/[/url] Get any previously unanswered probs, just ask.
Also since its a local include, shouldn't "Strng.h" be with quotations....
tmp4 is a null pointer which has the value 0. When you get the string into tmp2 that has 0 and compares them. The result is 0 so it breaks out of the while loop. Second Idea: Condition is being met it, tmp2 attains the "http://" Regards, Gen
[QUOTE]who uses dial-up modems these days?[/QUOTE] I guess people are still reeling from the aol cd spam of the 90's
when you pass a variable by reference, any changes you make to the variable will be done as well to the passed variable. A pointer does the same only it passes the address of the variable and from there you can change it by De-referencing it '*'. references make it …
Example Image: [url]http://img710.imageshack.us/img710/4310/cropexample.png[/url] I need to make a cropping tool such as the on in Photoshop ( Fig.2 ) So is there a way to do selective area transparency( Fig .1 ) ( I have only done whole window transparency ) Because the only way I can think of doing …
looks like flies on a coders carcass [url]http://www.videolan.org/developers/vlc/doc/doxygen/html/structintf__thread__t.html[/url] anywho, define connect ( internet connection, sending/receiving commands )
really there should just be videos of great books with narration and examples. nothing more.
If you want to do graphics, you can start with [URL="http://www.winprog.org/tutorial/"]Win32 API's[/URL]. And im sure [URL="http://msdn.microsoft.com/en-us/library/dd162760%28VS.85%29.aspx"]these[/URL] will come in handy. extras [URL="http://msdn.microsoft.com/en-us/library/dd183385%28VS.85%29.aspx"]bitmap[/URL] [URL="http://msdn.microsoft.com/en-us/library/dd183395%28VS.85%29.aspx"]brushes[/URL] g' luck
o: Hard to believe you have been doing C for 4 years and havent touched the api.
Shoop [url]http://www.daniweb.com/code/snippet259700.html[/url]
While finishing up my app, I included into the project the code for loading and injecting my dll into running processes. Once compiling I received these errors [CODE]error C2039: 'getchar' : is not a member of '`global namespace'' error C2873: 'getchar' : symbol cannot be used in a using-declaration error …
Show some pictures of the themes that are available. Also have you tried a system restore.
Although Possible ( Might not be what your teacher intended ) you could also try to GDI functions such as Rectangle(), LineTo(), and TextOut().
To slow down bullet, use a float data type with . below or set it to move every couple milliseconds. If you want to disable the ball when its not playing, simply put a check for it by setting its movement speed to zero, returning on its drawing call, and …
Wallah [CODE]for( int i = 0; i < Stat.x; i++ ) cout << a; cout << endl; for( int i = 0; i < Stat.y - 2; i++ ) { cout << a; for( int k = 0; k < Stat.x - 2; k++ ) cout << b; cout << …
[CODE]#include <Windows.h> #include <iostream> #include <conio.h> using namespace std; int main() { char symb; double mug = 2.50f, teeshirt = 9.50f, pen = 0.75f, tot_mon = 30.0f; cout << "You have 30 dollars to spend.\n"; do { cout << endl; cout << "What do you want to buy today?\n"; cout …
on msdn you can find information regarding SendMessage(), or keybd_event() you can use WM_KEYDOWN or WM_CHAR Edit: I also posted a simple console based app that sends words to a minimized notepad [url]http://www.daniweb.com/forums/thread256517.html[/url]
[CODE]#include <iostream> using namespace std; int main() { int x = 0, Total = 0; /* You must make a varaible a, b, c to hold the value unless they are constant */ printf( "Hello. This program will evaluate the expression 5(x+7)-2. \nEnter the value for x: " ); cin …
[CODE] #include <iostream> #include <conio.h> using namespace std; bool Possible; VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime ) { printf( "\n3 Seconds Have Elapsed..." ); Possible = false; } void main() { SetTimer( 0, 1001, 3000, TimerProc ); // Set 3 Sec opening while( true ) …
I was thinking about this just yesterday, And there really should be, it would give better look
You shouldn't be dumping off your homework, people aren't to serve you...
On the left is the dialog ran from VC++ On the right is run from my app [url]http://img208.imageshack.us/img208/2019/wonder.png[/url] Why the version ran from my app lacks is: Combo Box Options Color, Design is from the 90's style
try passing the arrays by pointer, and change == to =
Explain a bit more, Also you could try selecting it for a fraction of a sec, then returning it.
If its clear all of the text inputted into the console you could use cmd Clear?
upon trying to save or view the code when I generate a dialog box in vs 2010 beta 2 I get a nice [URL="http://yfrog.com/jmdialogerrorp"]Little Error Box[/URL] That pop ups and prevents me from saving or editing the source at all leaving hours wasted making it in the first place. I …
debug, GetLastError(), etc
make effort first or just use some [URL="http://google.com"]resources[/URL] I spose'.
I don't believe this is c\c++ Edit: that loop is pointless....
The End.