Not bad for start.
It is not that uncommon to start what my boss used to called "spaghetti code".
As long as your first code runs you can follow the flow and rearrange the actual code as you go.
The basic concept of the application is what is important.
You can identify the repetitive code and make classes or functions - as long as it continues to compile and run.
Personally I look at writing code and application separately.
And often I do not follow "top down " concept , but look at both application (tasks) and code as kind-off puzzle / mosaic.
Do not get discouraged by "code is too big, hard to follow..." comments.
I do understated that most folks just excpect to "cut and paste and run" posted code and if it does not they get frustrated.
You asked for comments on your coding style and you have received very good ones, if your posted does not compile / run is immaterial.
Now off the soap box and some real advise
When your declare a variable get into habit to initialize it and comment (what is) its purpose.
You are writing code to yourself , but do as is used to do in Chicago
"vote early and often "
comment and over comment what the code does - you will thank yourself later when it gets REALLY big !
Alright, thank you for your reply and your opinion, you motivated me little bit As I mentioned in my topic, I am new to programming and have to learn many things, and as I was learning through I was getting too fast on it to learn new things, I should just stop at one thing and learn it as much as I can. Anyway, thanks for reply.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
displays a dialog to choose compression an parameters, and after "OK" they are stored somewhere (in the hwnd?) this process does work for the current session, but when i restart my app everything is gone. none of the structures (CAPDRIVERCAPS,CAPINFOCHUNK,CAPSTATUS,CAPTUREPARMS,etc.) gives me valid information about the chosen compression. what i need is the COMPVARS or AVICOMPRESSIONOPTIONS structure, but to access these seems to be a completely different approach.
The HWND object only exists for the life of the application, so any values stored inside it will be lost when the application terminates. You will need to save all the values yourself in some permanent storage area. See Where should I store my data?[^]; it's written for .NET but can easily be adapted to a Win32 app.
does anyone know how to store the compression settings to reuse them?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
plz read the whole thread! i want to store the settings, that i made in the dialog! i haven't found a way to ACCESS the data/settings programmatically - that was my question.
i know thousands of ways to store/serialize/dump the data.
Hi everyone, I have a problem in vc6.
In a CFileDialog with 2 configured extensions (eg .Txt and .doc) I want
automatically change directory in my CFileDialog when the extension changes:
when I select the .txt extension I want the CFileDialog in the 'C:\FileTxt' directory,
when instead I select the extension .doc I want the CFileDialog in the directory 'C:\FileDoc'
with the corresponding files list ...
...Can someone help me with some example?
I Try, but I'm not sure )
Last Visit: 22-Feb-20 19:31 Last Update: 22-Feb-20 19:31