Ok. I posted a code in my last thread. If yoiu have downloaded it and tried the program. Tell me what you think please! I am 14 years old and I made that.
Ok. I posted a code in my last thread. If yoiu have downloaded it and tried the program. Tell me what you think please! I am 14 years old and I made that.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
It's pretty nice...try making it so that you can view it again in the program after it's been stored, and maybe you'd like to turn that into a dialog box, just to look a bit snazzier? Otherwise it's nice...oh yeah, and the help isn't working
Well, in the Help menu, I have the code in WM_COMMAND:
case CM_HELP_HELP:
//Help file goes here
break;
I want to start a .txt file. How do I do that? The help file is called sb15_help.txt. How do I run it from the Help menu?
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
Not bad for a first windows program.
But;
Why do you need 8 x 6000b buffers? (bit of over kill)
Use one large one (for validation) and then use lstrlen() to test if the user has entered a string that is too long to fit. Tell them to re-enter if they have.
Try an array of strings for the input and an array for the HWNDs. Use hash defines for the edits and then you can refrence both arrays with these defines.
Get some dynaminc memory allocation in there to hold the data structure. Increase size each time the user saves.Code:#define NUM_EDITS 8 #define SURNAME 0 #define FIRSTNAME 1 //ect char sArray[NUM_EDITS][64]; char sBigBuffer[255]; HWND hWndArray[NUM_EDITS]; for(i=0;i<NUM_EDITS;i++) { GetWindowText(hWndArray[i],sBigBuffer,255); if(lstrlen(sBigBuffer)>64) { //do error } else sprintf(sArray[i],"%*s",64,sBigBuffer); }
You also can not tab from one edit box to the next? Or maybe it's just on NT machines. I'm running NT and find that sometimes when I program things to work a specific way they don't always work %100 on my NT box. Anyway, just my two cents....
I can't say for sure.....but that doesn't look work related.
I am working on the TAB from one box to another right now. I will post the new one with TAB when I'm done.
You need to set the style for TABSTOP when you create the buttons.
Also you have given all the buttons the same ID number (1). They should all be different.
Try a structure to hold the HWND, ID, text and other details of the button. Then you can use a loop to create them.
Which is why GetDlgItemText() won't work for you.