DivisionByZero

December 7, 2004

visual c++ notes: day one and two

Filed under: Computers


To get/set data from controls:

UpdateData( [ TRUE FALSE ]);

where: TRUE - retrieve data from controls, FALSE - update form data with values in the code editor.

To enable/disable controls:

GetDlgItem(control_id)->EnableWindow([TRUE FALSE]);

To show/hide controls:

GetDlgItem(control_id)->ShowWindow([TRUE FALSE]);

To associate a variable to a control:

Right-click the control, then choose the ClassWizard. Click on the member variables tab, choose the control’s control id, then click on the "Add variable" button (it’s recommended that you use Hungarian notation to name your variables).

To initialize variables:

Add a function (using the ClassWizard) to the WM_INITDIALOG message. On the code editor, type the initialization values of your variables.

To execute an external program:

WinExec("program name", SW_SHOW);

To exit the application:

OnOK();

teach myself visual c++ in 21 days

Filed under: Computers

after some thinking about what to learn before i start looking for a job. i eventually decided to learn microsoft visual c++ 6.0. ok, so the fact that it’s made by microsoft and is a commercial product would more than get me a few suspicious looks from open-source advocates. i do have my personal reasons for deciding to learn vc++:

  1. let’s face it. windows, bloated, insecure and non-free as it is, won’t be fading away too soon - almost all pc’s run it. that alone, i think is reason enough why any programmer should *at least* be able to program in the platform using industry-grade tools.

  2. desktop java never really caught on. in fact, the current trend with java is now towards the enterprise. awt/swing is just too slow and cumbersome to use (although, swt may hold some promise as azureus looks real good and is pretty responsive).
  3. most importantly, the company i’m looking forward to working with is using it. so as early as now, i’m trying to make myself ready for whatever task i may be given.
disclaimer: nope, i haven’t given in to the dark side. i love linux. i love open-source but as they say - choose the right tool for the right job.






















Get free blog up and running in minutes with Blogsome
Theme designed by Minz Meyer