comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2007
motuwethfrsasuw
 123456 18
78910111213 19
14151617181920 20
21222324252627 21
28293031    22
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
  What An I Missing in This Custom Draw of TreeView.         


Author: Larry Lindstrom
Date: May 5, 2007 23:13

Hi Folks:

Developing on XP Media, with VC6, WIN32, no MFC.

A google of "*win32" groups with with "NMTVCUSTOMDRAW" in the
body came up empty. Search of any post to this newsgroup with
"NMCUSTOMDRAW" anywhere in the body also came up dry. Variants
on those themes were also empty.

And I'm having a bad day to.

Out of many listboxes, one always returns -1 to
SendMessage(..., LB_GETCURSEL, ...) after double clicking, and
out of 11 identical combo boxes that use the same function to
service their button clicks, one does the same in response to
CB_GETCURSEL.

I can't look at those anymore, I need to take my mind off of
them with a little custom draw on a treeview.

I do a lot of owner draw on listboxes and combo boxes, but
I'm not familiar with customdraw. So I've studied an MSDN
page on the subject.

I have the treeview setup to draw white text on a blue
backgroud. I want to reverse that for the selected item.
Show full article (3.41Kb)
no comments
  Does C run-time library translate to Win32 APIs?         


Author: Charlie Gibbs
Date: May 5, 2007 12:39

I'm getting into a bit of a political discussion at work. My programs
use the C run-time library wherever possible, for portability's sake.
The one drawback to this is the limit on the number of files I can have
open at once, which is hardwired into the run-time library. I wrote
a small test program which tried to create as many files as possible,
leaving them all open. Under Borland C++ Builder 4.0 I was able to
open 47 files before things started failing. Using the Win32 API
I opened 1000 files successfully, on both Win98 and Win2K boxes.
For a few applications, this 47-file limit is going to become a
problem, so I'm looking at recoding at least those files' I/O using
the Win32 API.

Now we come to the political part. I've had intermittent problems
with files disappearing. Or at least not appearing quickly enough
for subsequent programs (or even the same program) to successfully
access them. The most common failure is when I'm trying to update
a file by copying it to a work file making changes as I go, then
deleting the original file and renaming the work file back to the
original file name.
Show full article (2.60Kb)
4 Comments
  memory management question (how to avoid excessive page-in, special case)         


Author:
Date: May 5, 2007 07:44

Hi,

my application uses a big (~256M) static char[] as a buffer.
Previously I had allocated this region via malloc but because of
fragmented virtual memory the malloc call sometimes failed and so
I moved to a static array (With the benefit that some dlls get mapped
in a much more compact way.

Now the problem: my app creates another process which
also uses big amounts of memory and also does heavy I/O (DVD burning,
image conversions) which causes some parts of the main app to become
paged out.

After the "another precess" has done its work I would like so somehow
clear the buffer are and forget all records about it in the page file
because the buffer will get overwritten with fresh contents anyways and I
have seen heavy page-in activity which is very slow at times because of
heavy seeking of the hard disk. Sometimes the page-in was in the
range of 1-2MB/sec (disk LED bright illuminated), so paging in of
30-40MB took some 20-30 seconds.

This is not always so slow but it seems that the pagefile allocation
of the buffer memory can become fragmented quite badly at times.
Show full article (1.68Kb)
1 Comment
  Question about finishing combobox         


Author: Vitor
Date: May 5, 2007 07:37

I got some help creating a combo box and it all worked. I created a
combo box with four options and I would like to set an int to that number?

const char * str[] = {"1", "2", "3", "4"};

switch(msg){

case WM_INITDIALOG:

HWND list;

list = GetDlgItem(hwnd, IDC_LIST);

for(int lp = 0; lp != 4; lp++){
SendMessage(list, CB_ADDSTRING, lp,
reinterpret_cast((LPCTSTR)str[lp]));
}
Show full article (0.88Kb)
3 Comments
  How can I kill protected process like ZoneAlarm?         


Author: Robin
Date: May 5, 2007 06:14

If I kill it with task manager, there will be a error said "Access
denied!". Is there a way to kill the protected process by programing?

Thanks a lot.
3 Comments