|
|
Up |
|
|
  |
Author: JussiJJussiJ
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
|
|
  |
Author: JussiJJussiJ
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 |
|
  |
Author: JussiJJussiJ
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
|
|
  |
Author: JussiJJussiJ
Date: Dec 18, 2007 18:44
> 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 |
|
  |
Author: gw7ribgw7rib
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 |
|
  |
Author: David LowndesDavid 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 |
|
  |
|
|
  |
Author: sandy58sandy58
Date: Dec 18, 2007 01:33
On Dec 17, 9:05 pm, lessspamjon...@ gmail.com wrote:
Nice one, buddy. Thank you:-)
|
| |
|
3 Comments |
|
|
|
|