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
  Re: How to create a simple icon-driving menu...         


Author: JussiJ
Date: Dec 18, 2007 19:09

On Dec 15, 8:00 pm, Windows Application netzero.com>
wrote:
> I would like to create a simple menu that looks and function
> like the control panel window of Windows XP, when the user
> click on an icon the code should call the API CreateProcess()
> to launch an executable program. Do I need to create and use
> a treeview control to create this menu, or is there an easier
> approach?

I think you will find the control panel is using a list view control
and not a tree view control.

Jussi Jumppanen
Zeus for Windows IDE: http://www.zeusedit.com
no comments
  Re: Network File I/O in VS.NET 2005         


Author: JussiJ
Date: Dec 18, 2007 18:55

On Dec 15, 3:43 pm, "Alf P. Steinbach" wrote:
> #include
> int main(void)
> {
> printf( "%%s\n", "U:\\TEST\FILE.TXT" );
> return 0;
> }
>
> If this consistently prints
>
> U:\TESTFILE.TXT
>
> then it's most probably not a compiler issue, but if it prints
>
> U:\TEST\FILE.TXT

That is because the code should be:

printf( "%%s\n", "U:\\TEST\\FILE.TXT" );

This has nothing to do with the printf and everything to do
with how c/c++ handles literal characters (ie '\f').
Show full article (0.61Kb)
1 Comment
  Re: new line is still 2 bytes in Windows Vista?         


Author: JussiJ
Date: Dec 18, 2007 18:49

On Dec 17, 2:52 pm, debiannabi gmail.com> wrote:
> When I make a text file using notepad or VC++ editor, I noticed that
> new line eats up 2 bytes.

So? Why would you expect this to have been change?

Since the days of MS-DOS Microsoft has defined text file end of lines
to be a carriage return and a line feed.

This definition will never be changed.

Jussi Jumppanen
Zeus for Windows IDE: http://www.zeusedit.com
no comments
  Re: How to activate an application programmatically (to implement single-instance behavior)         


Author: JussiJ
Date: Dec 18, 2007 18:44

On Dec 18, 8:58 am, r_z_aret@pen_fact.com wrote:
> On Fri, 14 Dec 2007 12:39:12 -0800 (PST), thomas_ok...@yahoo.com
> wrote:
> Using the second argument (caption) with FindWindow can run in to two
> problems:
> 1) the caption changes for some windows
> 2) the call can hang if the process for a window is not responding

You can also use a named mutext to achieve the same, problem
free result:

//-- try to create a mutex flag
HANDLE hMutex = ::CreateMutex(0, 1, "Zeus for Windows IDE");

//-- check if the application is already running
bool IsRunning = (::GetLastError() == ERROR_ALREADY_EXISTS) ? 1 :
0;

...

//-- release our mutex
::ReleaseMutex(hMutex);
::CloseHandle(hMutex);
Show full article (0.78Kb)
3 Comments
  Is this SaveDC really necessary?         


Author: gw7rib
Date: Dec 18, 2007 09:13

I had some difficulties with fonts before, in that the normal font for
windows doesn't always show particular characters such as the card
suits. I was given some code to fix this by using a different font.
However, it looks a little ugly and so my program gives the user the
choice as to which of the two fonts gets used. I'm a little curious
about whether all the code I was given is necessary.

If I have a paint routine which goes as follows:

PAINTSTRUCT ps;
HDC hdc;

hdc = BeginPaint (hWnd, &ps);

if (font == Font2) {
SaveDC(hdc);
SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); }

// code here using TextOut

if (font == Font2) RestoreDC(hdc, -1);

EndPaint (hWnd, &ps);

then do the SaveDC and RestoreDC actually have any effect? Or are they
there so that I could, if I wanted to, include more TextOuts after the
RestoreDC which would be back in the normal font again?
Show full article (0.91Kb)
4 Comments
  Re: Shell extension multi language support         


Author: David Lowndes
Date: Dec 18, 2007 01:54

>Currently we have an ATL/COM based context menu shell extension that
>replaces Windows Eject menu item with one specifically for our device.
>Now we need to add support for multiple languages . I've run into
>difficulty when trying to convert the program to a pure Unicode
>application. Strings in non-western languages cause code page
>warnings.

What do you mean by a "code page warning"?

Are you using a version of VS prior to 2005 perhaps? I think that was
the first version to properly support Unicode strings in resources.
>What is the preferred method to add non-western language strings to an
>ATL/COM based program? Is it possible to make a pure Unicode based
>shell extension.

It sure is possible.
>Is the best method to re-write the shell extension program in .NET

No, in fact .Net is not recommended for shell extensions at all - you
can run into problems as only 1 version of the .Net runtime can be
loaded, so if you have extensions that require different version....
:(.

Dave
2 Comments
  Re: Solve any your Software problem         


Author: sandy58
Date: Dec 18, 2007 01:33

On Dec 17, 9:05 pm, lessspamjon...@gmail.com wrote:
> Find solution for any your problem with Windows XPhttp://windows-xp-tricks.blogspot.com/

Nice one, buddy. Thank you:-)
3 Comments