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
  grey out selected listbox item when listbox loses focus?         


Author: dan
Date: May 29, 2007 17:59

My question: Any way to grey out selected listbox item when the
listbox loses focus, the same way selected treeview item gets grayed
out when treeview loses focus? Or other way to make it clearer when
listbox loses focus?

Background: An interface screen has five groups of controls: [one
treeview - two listboxes - two button groups]. The user can navigate
from one group to another using TAB key. I'd like the user to be able
to easily tell which control has the focus. It's easy to tell when the
focus is on the treeview or a button. But I find it very hard to tell
if the listbox has the focus. The highlighted listbox item only
changes a little teeny-weeny bit, as shown here:

http://www.ehdp.com/out/txu1-tpp-pd1-age1.gif - which listbox has
focus? (left one)
http://www.ehdp.com/out/txu1-tpp-pd1-age2.gif - easy to tell which
button has focus

Ideal solution - Any way to grey out selected listbox item when it
loses focus, the same way the selected treeview item is grayed out in
the pictures above? Can't find anything like TVS_SHOWSELALWAYS for
listboxes.
Show full article (1.76Kb)
1 Comment
  Re: Newb: Window creation fails         


Author:
Date: May 29, 2007 10:31

PeterW wrote:
>> I hangs here... before the poor window has even a chance to display itself.
>>
>>
>>
>>> }
>> replace that for with a message loop:
>>
>> while(GetMessage(&msg,NULL,0,0)){
>> TranslateMessage(&msg);
>> DispatchMessage(&msg);
>>
>>
> No! I tried it. And it still shows no window.
>

Yes, that for loop needs to be replaced as I showed. But there might be
others bugs I didn't spot.
Show full article (0.71Kb)
no comments
  screen scraping a Windows text box         


Author: WFDGW2
Date: May 29, 2007 09:35

I want to write or obtain C++ code that will scrape text from a dialog
box within a poker client, and then record that text somewhere else.

What do I do? Thanks.
1 Comment
  Re: Newb: Window creation fails         


Author:
Date: May 29, 2007 09:35

PeterW wrote:
>>replace that for with a message loop:
>>
>>while(GetMessage(&msg,NULL,0,0)){
>> TranslateMessage(&msg);
>> DispatchMessage(&msg);
>>
>>
>
> No! I tried it. And it still shows no window.
>

Keep trying. The Petzold book has plenty of examples that do it right,
and they all incude something like the above loop.

There is no possibility that your window will work if you execute
for (;;);

...your program will just execute that and nothing else.

--
Scott McPhillips [MVP VC++]
no comments
  Re: Newb: Window creation fails         


Author: PeterW
Date: May 29, 2007 08:56

> I hangs here... before the poor window has even a chance to display itself.
>
>
>
>> }
>
> replace that for with a message loop:
>
> while(GetMessage(&msg,NULL,0,0)){
> TranslateMessage(&msg);
> DispatchMessage(&msg);
>
>
No! I tried it. And it still shows no window.
no comments
  WriteFile synchronous with OVERLAPPED flag         


Author: harry
Date: May 29, 2007 07:53

Here is a code snippet

#define WRITE_SIZE (5*1024*1024)

main()
{
......
//Get Handle
hndl=CreateFile(tFileName,GENERIC_WRITE|GENERIC_READ,
FILE_SHARE_WRITE|
FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_FLAG_OVERLAPPED|
FILE_FLAG_NO_BUFFERING,NULL);
//Set File pointer to end of file
li.QuadPart=(WRITE_SIZE)*iNumWrites;
SetEndOfFile(hndl);
//Taking back pointer
li.QuadPart=0;
bRet=SetFilePointerEx(hndl,li,&liNew,FILE_BEGIN);
//Get event
Ovr.hEvent=CreateEvent(NULL,FALSE,FALSE,NULL);

__int64 qOffset=0;
//iNumWrites is the number of writes
for(j=0;j Ovr.Offset=(DWORD)qOffset;
Ovr.OffsetHigh=(DWORD)(qOffset>>32);
//Write Data
if(!WriteFile(hndl,(BYTE*...
Show full article (1.98Kb)
2 Comments
  Re: How to retrieve pop3 etc. address         


Author: Sten Westerback (MVP SDK 2005-6 :)
Date: May 29, 2007 06:26

"Jerry Coffin" taeus.com> wrote in message
news:MPG.20c4f084e2800c99898de@news.sunsite.dk...
> In article ,
> /dev/null@localhost.localdomain says...
>
> [ ... ]
>
>> That's funny, I have compiled a simple MAPI program few years back and
>> it didn't work. I have run that program today and it worked! Probably my
>> old mail client wasn't MAPI compatible (I didn't do any error checking).
>> Now with Thunderbird it has run without problems.
>
> Having it actually work the first time it connected to a MAPI compatible
> client is pretty impressive!
>
>> However I wouldn't recommend this method because:
>>
>> 1) It will be confusing/suspicious for the user - The mail client will
>> probably warn him that some other application wants to send an email
>> using his/her user profile. It might be further confusing to find this ...
Show full article (2.43Kb)
no comments
  Win CE Platform Builder Help         


Author: kd
Date: May 29, 2007 02:30

Hi all,

I am using Win CE Platform builder 5.0.
I am getting following error when I am trying to attach device:-

" The specified CE boot image could not be loaded.
Your virtual machine may not have enough RAM allocated. Try
increasing the RAM allocation (if you are
using Platform Builder open the Configure Remote Services
dialog, choose the Emulator Download service,
and click the configure button)."

Can anybody tell how to overcome this problem.
1 Comment
  Re: Any key pressed?         


Author: aleksa
Date: May 29, 2007 01:50

On May 28, 5:36 pm, "Sergei Zhirikov" yahoo.com> wrote:
> "aleksa" gmail.com> wrote in message
>
> news:1179865815.707221.309580@x35g2000prf.googlegroups.com...
>
>> How do I detect if any key is pressed while I'm processing a message
>> in a single-threaded app?
>
>> My WM_PAINT handler may take 2 seconds to finish, and I must
>> stop drawing if there is *any* key pressed, including mouse buttons.
>
>> Something like GetAsyncKeyState for all keys?
>
> I think it's better to call GetQueueStatus(QS_KEY|QS_MOUSEBUTTON) every once
> in a while
> and then stop drawing if it says that there is something in the queue. If
> necessary you can also call
> PeekMessage afterwards to find out which key/button has been pressed and act
> appropriately.
Show full article (0.84Kb)
no comments