Forum: C++ Dec 8th, 2007 |
| Replies: 2 Views: 4,752 Your computer must run quite a bit different than mine then.
Once you've entered your stringchar word [80];
cin >> word;or whatever size you think you need, then just cycle through all the... |
Forum: C++ Dec 4th, 2007 |
| Replies: 11 Views: 3,202 You can also let 'c','p' & 't' fall through to 'g' |
Forum: C++ Dec 3rd, 2007 |
| Replies: 5 Views: 1,084 I also remebered the way I wanted to do it
LPMINMAXINFO Info
Info = LPMINMAXINFO (lParam)
I don't believe their is any advantage this way other than less to type and easier to... |
Forum: C++ Dec 3rd, 2007 |
| Replies: 5 Views: 1,084 Thank-you Duoas, my adaptation is as follows and works as expected
case WM_GETMINMAXINFO:
((LPMINMAXINFO) lParam)->ptMinTrackSize.x = WndInfo.MaxWidth;
((LPMINMAXINFO)... |
Forum: C++ Dec 2nd, 2007 |
| Replies: 5 Views: 1,084 How would I declare a pointer to MINMAXINFO that is passed to WPARAM
In WM_GETMINMAXINFO wParam is a pointer to a place on the stack that holds MINMAXINFO. I've triedMINMAXINFO *Info;
Info =... |
Forum: C++ Nov 3rd, 2007 |
| Replies: 9 Views: 1,725 I am an avid and would even venture to say an excellent assembly programmer. In the early 80's my assembly overlays to basic where an essential component to greater throughput. Example sorting 1,000... |
Forum: C++ Sep 22nd, 2007 |
| Replies: 8 Views: 5,558 Start with int main () {
int a = 2, c = 1, b, d;
while (c < 100) {
b = 2;
a++;
/* Implement your next loop here changing the logic a bit */
} |
Forum: C++ Sep 17th, 2007 |
| Replies: 4 Views: 1,058 int TxtSize = GetWindowTextLenth (hwndEditBox) + 1;
char *Entry = new char [TxtSize];
GetWindowText (hwndEditBox, Entry, TxtSize);
MessageBox (NULL, Entry, "", MB_OK | MB_ICONINFORMATION)
delete... |
Forum: C++ Sep 16th, 2007 |
| Replies: 2 Views: 654 When creating an "EDIT" window there are several flags associated all begining with ES_. The one you want to use is ES_AUTOHSCROLL in dwStyle. |
Forum: C++ Sep 16th, 2007 |
| Replies: 8 Views: 1,399 Without seeing your code or header file it's impossible to know where the problem is, but my implementation would have each node with two pointers. One to students name and other to array of grades.... |
Forum: C++ Sep 15th, 2007 |
| Replies: 2 Views: 907 Assuming your using CreateWindowEx, change the value of y (vertical position of window) before the next window is created. |
Forum: C++ Sep 15th, 2007 |
| Replies: 2 Views: 722 It almost looks like you threw something out in the wind in the hopes that someone will fix it up for you. Clean up your code with indentation to begin with so it's a little more legible. Then run... |
Forum: C++ Sep 2nd, 2007 |
| Replies: 4 Views: 1,382 One of expecption handlings greatest claims to fame is ability to unroll the stack. Lets suppose you have subroutines "A", "B", "C". Your main code establishes a try block, where in it you call "A"... |
Forum: C++ Aug 31st, 2007 |
| Replies: 5 Views: 3,368 Hamrick's link is about as succenct as you can get. The why on the other hand probably will never be know. It could be deliberate, accidental or just a matter of convienence as code is being... |
Forum: C++ Aug 30th, 2007 |
| Replies: 5 Views: 888 That being said, Intel is quite liberal with their documentation so there is no reason M$ couldn't have an equal or better compiler. |
Forum: C++ Aug 30th, 2007 |
| Replies: 5 Views: 888 Thank's. Better than M$, why am I not surprised. I like the idea too that I can use it with my existing IDE. |
Forum: C++ Aug 30th, 2007 |
| Replies: 5 Views: 888 Using VC++ 6.0, setting this option doesn't seem to do anything significant. Specically, I can still run the app on a 486. I've drilled into assembly and can't find anywhere that Pentium opcodes... |
Forum: C++ Aug 20th, 2007 |
| Replies: 11 Views: 4,971 If you don't return a value to the operating system, then whatever happens to be in EAX at the time will probably be returned and this may cause undesirable results. That is why void main () is a... |
Forum: C++ Aug 13th, 2007 |
| Replies: 20 Views: 2,719 You can invoke the debugger in release mode too. Trace that part of the program and see if an optomization setting is causing a problem.
It doesn't sound like my contention of the directories is... |
Forum: C++ Aug 12th, 2007 |
| Replies: 2 Views: 972 I concur, you will find that after writing a few hundred programs you will probably develop your own style. This is an example of how I use main in a windows applicationint APIENTRY WinMain... |
Forum: C++ Aug 12th, 2007 |
| Replies: 20 Views: 2,719 In VC 6.0++ each of Debug & Release can have different settings for directories. Use ALT-F7 and check that the settings for each is the same |
Forum: C++ Aug 10th, 2007 |
| Replies: 3 Views: 5,671 int FSize, Actual;
char *Buffer;
FSize = GetFileSize (hFile, NULL);
Buffer = new char (FSize+1);
ReadFile (hFile, &Buffer, FSize, &Actual, NULL);
I'm pretty rusty at C++, but that is how you... |
Forum: C++ Aug 9th, 2007 |
| Replies: 4 Views: 1,198 Thank-you, this has definitely opened the eyes amongst our development group that assembly is much more efficient for our intended project. |
Forum: C++ Aug 9th, 2007 |
| Replies: 4 Views: 1,198 In assembly I would
ProcA enter 16, 0
call ProcB
leave
ret
ProcB enter 16, 1
... code
leave |
Forum: C++ Aug 9th, 2007 |
| Replies: 1 Views: 6,282 Use WM_KEYDOWN as a toggle instead of an event that actually moves your character. You've probably discovered by now that your character movement corresponds to how repeat keys work. ... |
Forum: C++ Jul 11th, 2007 |
| Replies: 4 Views: 6,588 The problem probably is at Speed Gonzales3456. There is no space between es and 3456, so afterwards everything is out of sync by one field.
You last post wasn't visible to me until I posted this... |
Forum: C++ Mar 31st, 2005 |
| Replies: 3 Views: 21,325 case WM_CREATE:
GetClientRect (hWnd, &Rc);
InflateRect (&Rc, -10, -10);
StatusArea = DisplayArea = Rc;
StatusArea.top = StatusArea.bottom - 32;
DisplayArea.top += 32;
DisplayArea.bottom =... |
Forum: C++ Mar 31st, 2005 |
| Replies: 3 Views: 21,325 CreateFont as 14 parameters that need be passed to it, and it will provide you with everything you need to create the font you need. |
Forum: C++ Mar 26th, 2005 |
| Replies: 7 Views: 5,424 When you created this project you may have inadvertantly selected of the 15 choices the wrong type. In your case Win32 Console Application would have been the one you wanted. There are also several... |
Forum: C++ Mar 20th, 2005 |
| Replies: 6 Views: 2,072 Ok as promised here is my modification based on your algorithym# include <iostream>
# include <iomanip>
# include <string>
using namespace std;
int main()
{
int Quantity, Disc;
double Cost,... |
Forum: C++ Mar 20th, 2005 |
| Replies: 6 Views: 2,072 In all cases remove quotes around bolded sectioncout <<"\n" << setw(20) << "Adjust Amount $" << "AdjustAmount" << endl;Declare DiscountRate in your application and set its value inside each... |
Forum: C++ Mar 20th, 2005 |
| Replies: 6 Views: 2,072 Show us what you've got done so far, so we know what to tell you to correct. |
Forum: C++ Mar 19th, 2005 |
| Replies: 5 Views: 4,206 In your ok button click event you have to read the contents of path. Not having used borland I'm not sure how its done, but using a WIN32 API it would be GetWindowText (hWnd, char *, int size); or... |
Forum: C++ Mar 18th, 2005 |
| Replies: 5 Views: 4,206 Sorry, I missed the Borland part. The first segment of code are the events that are either preset with those controls, or you selected something in a dialog box you initialize those events. The... |
Forum: C++ Mar 17th, 2005 |
| Replies: 5 Views: 4,206 That's a pretty loaded question. Qualify first how you want to do it, meaning are you going to use a resource or create the dialog directly within code. Which compiler are you using now. If it's... |
Forum: C++ Mar 15th, 2005 |
| Replies: 3 Views: 3,006 Provide a little detail as to how far you've gotten with your code so far. Basically, you are going to respond to that windows WM_LBUTTONDOWN event. Then you can use GetWindowText (hWnd, lpstr... |
Forum: C++ Mar 15th, 2005 |
| Replies: 7 Views: 4,553 Wouldn't the resulting string being 1 byte longer overwrite the "3" in the next position (record)? Often when confronted with this type of data I prefer to pad values that will be less than 10 with... |
Forum: C++ Mar 15th, 2005 |
| Replies: 1 Views: 3,161 What is the error? Right off hand I can see you are mixing two entry points. void main () & WinMain. WinMain is empty. There is an example of a sekeltal app in code snippets under cplusplus. ... |
Forum: C++ Mar 14th, 2005 |
| Replies: 7 Views: 2,603 I think I've tried notepad before, but for some reason I think I used WordPad to save to a TXT file and then loaded with Notepad and copied and pasted from there. So far that is the only way I've... |
Forum: C++ Mar 14th, 2005 |
| Replies: 2 Views: 14,223 Your function definition declares "ava" as an it, but your trying to use as if it was an array. This wasn't too hard to spot, but in the furture please include everything so it can be pasted into... |