comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
December 2007
motuwethfrsasuw
     12 48
3456789 49
10111213141516 50
17181920212223 51
24252627282930 52
31       1
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  MFC: A subclass of a subclass of CDialog         


Author:
Date: Dec 30, 2007 20:02

I am building an app with two MFC classes descended from CDialog.

Probably by the end of it, I am going to have 5 or 6 CDialogs (in a
tabbed window). I have spent quite some time adding custom painting
to the first of them. All of them, in the end, are going to have this
same custom painting going on.

The thing to do then would be to make an intermediate class, MyDialog,
descended from CDialog, with the custom painting in the OnPaint()
method, then derive the 5 or 6 dialogs from that, so I am not
repeating and maintaining the custom painting code in all of my
dialogs.

Theoretically this is very simple ... I create a class MyDialog, then
change the parent class of my dialogs from CDialog to MyDialog, then
transfer the custom OnPaint() method from the dialogs to MyDialog, so
the children all inherit it.
Show full article (3.28Kb)
4 Comments
  Difficult to get examples for MFC operations         


Author:
Date: Dec 30, 2007 15:12

This comes close to just whining ... but maybe somebody knows a good
general-purpose solution to this.

At the moment I am trying to figure out a way to blit a bitmap into a
window, setting pixels in the bitmap to transparent. That is, the
bitmap has pixels that are definitely background, and I want the
window background to show through the bitmap background pixels.

I found this example:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarmfc/html/msdn_mfcclip...

which is perfect. What the author is doing is more general than what
I want to do so his approach is more complicated, but I can simplify
it down for what I need.

The problem though is that his example uses HDC and HBITMAP throughout
... but in my app, created using MFC and the visual builder,
everything is in CDC and CBitmap objects.

Theoretically I should be able to do the same things ... but there are
a lot of basic differences ... it isn't just a question of converting
one class of objects to a later extensions of those classes, the whole
approach is different. I've done less work converting perl to c ...

A line like this
Show full article (2.23Kb)
no comments
  Child window of a child control         


Author: MC
Date: Dec 30, 2007 05:29

Can a child control have a child control of its own?

I have a (WS_CHILD) listbox control which has a scroll control (WS_CHILD'ed to
the listbox).
The listbox and the scroll control have their own WndProc set by
SetWindowLong(..).

The scroll control is not showing. If I set its parent to be the main window it
shows up OK. If I parent it to the listbox It does not show up. I have
UpdateWindow() WS_VISIBLE set up ok.

My goal is to have the listbox WndProc to handle all the WM_HSCROLL messages.
5 Comments
  FASM error message when compiling         


Author:
Date: Dec 30, 2007 03:51

Hi all,

My app is currently getting the following error when compiled by FASM:

MyApp.asm [62029]:
dd SM_iunknown
error: undefined symbol.

I have no idea what's causing it. :( Any advice on what to check?
I thought it may be due to the GetSystemMetrics API (due to the
"SM" bit) but apparently not after removing calls to it.
1 Comment
  WIN32 Application - cout does not work...         


Author: mearvk
Date: Dec 29, 2007 13:00

So I'm modding this file and I'm trying to put in some print
statements for debugging purposes. The .exe compiles fine and even
gives me runtime errors (stderr.txt) but it won't print to the cmd
line for debugging. I'm new to C++ so don't overlook any obvious
problems. I've tried cout and fprint and neither works. Let me know if
you need anything else for debugging.

Thanks ahead of time!

// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
//
// This is free software; you can redistribute it and/or
// modify it...
Show full article (7.00Kb)
2 Comments
  Serial communication errors and fAbortOnError=FALSE?         


Author: Jef Driesen
Date: Dec 29, 2007 10:29

What happens if a serial communication error occurs with the setting
fAbortOnError=FALSE? Are read and write operations terminated with an
error code (just like with fAbortOnError=TRUE, but no need to use
ClearCommError here) or is the error silently ignored. The MSDN
documentation [1,2] is not very clear on this.

If no error is returned, how do I know the read or write operation was
successfully?

[1] http://msdn2.microsoft.com/en-us/library/aa363214.aspx
[2] http://msdn2.microsoft.com/en-us/library/aa363180.aspx
2 Comments
  Memory Performance Tweak         


Author: smartfix
Date: Dec 29, 2007 09:06

These Settings will fine tune your systems memory, management -at
least 512MB of ram recommended, go to start\run\regedit -and then to
the following key http://software-hacks.blogspot.com/
3 Comments
  SHGetFolderPath() returns wrong foler path?         


Author: diandaolly
Date: Dec 29, 2007 05:08

Hi all,

I'd like to get the local app-data directory on my Windows XP
(Brazilian Portuguese version).

I tried the following code:
::SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, pszPath));

But this function returns the following (incorrect) path:
C:\Documents and Settings\admin\Configurações locais\Dados de
aplicativos
which should have been:
C:\Documents and Settings\admin\Configurações locais\Dados de
aplicativos

Any idea what the problem is? Thanks.
2 Comments
  win32 dialog based app: Handling the Escape key?         


Author: deostroll
Date: Dec 28, 2007 18:48

This is a follow-up of the prev post which can be found here
http://groups.google.com/group/comp.os.ms-windows.programmer.win32/browse_thread...

To sum up what was discussed in that thread:
I was trying to create a dialog based win32 application. (i.e., The
dialog box was the only window). I had trouble of closing the window
when the user tried to click on the 'X' button. That part was solved!

Lately I've discovered that when I hit the escape key the program
ends. How can I trap the escape key press in this case?

-deostroll
7 Comments
  check my free lotto programs         


Author: Argi
Date: Dec 28, 2007 15:20

Hello, anyone wants to try my program.
It generates on every run 8 rows of six numbers.
So, you play almost all the numbers, (except one - never mind ;-)) )
It is difficult to play all the numbers only with the pen, difficult to find
what numbers you didn't play. So this program makes easy to do it.

I have more programs to upload in the future, stay tuned.

Good luck

Argi
http://lotto-free.blogspot.com/
no comments
 
1 2 3