comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 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
  EDIT field - Keyboard Cursor         


Author: magix
Date: May 20, 2008 23:40

I have two text box Edit fields
- one is read-only, let say IDC_EDIT1 // the text will be filled from
external source
- another is normal, editable, let say IDC_EDIT2

How can I control that if IDC_EDIT1 is not filled, then keyboard cursor can
never activate in IDC_EDIT2 ?

In another word, user can enter text into IDC_EDIT2, if and only if
IDC_EDIT1 is filled.

Regards,
Magix
2 Comments
  First invocation of a program in a script         


Author: Norman Bullen
Date: May 20, 2008 19:50

Is there any way in which a command line program can determine whether
or not it is being invoked for the first time from within a particular
script (.BAT file)?

In other words: program A.EXE may be invoked several times in the same
.BAT file, either because the .BAT file contains some sort of loop or
because A.EXE appears in more than one place. I need to be able to
determine that one invocation is the first and that none of the others are.

Bear in mind that the script may be invoked more than once in single CMD
session; I want to identify the first time that A.EXE is invoked each
time the script is called.

A child script may be called more than once with a CALL statement in a
parent script; ideally I would like to identify the first time A.EXE is
invoked each time the child script is called.

More than one CMD session may exist; I need to identify the first time
A.EXE is invoked in each script that each of them runs.

Is there, perhaps, some detectable kernel object that is unique to an
invocation of a script?

Alternatively, can I cause CMD to invoke an identified program whenever
it starts running a script?
Show full article (1.22Kb)
28 Comments
  WM_CHAR         


Author: magix
Date: May 20, 2008 17:46

Hi,

I want to store all the keyboard input until it reach Carriage Return, and then MessageBox it

I have:

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
// Create main form
hWndMain = CreateDialog(hInst, MAKEINTRESOURCE(IDD_MAINWND), NULL, (DLGPROC)MainWndProc);

if (hWndMain == NULL)
return false; // stop the application

ShowWindow(hWndMain, nCmdShow);
UpdateWindow(hWndMain);
while( GetMessage(&msg, NULL, 0, 0)) {
Show full article (6.19Kb)
1 Comment
  WM_KEYDOWN         


Author: magix
Date: May 20, 2008 09:19

Hi,

I wonder why WM_KEYDOWN in my code doesn't work.

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR
lpCmdLine, int nCmdShow)
{
...
...
// Create main form
hWndMain = CreateDialog(hInst, MAKEINTRESOURCE(IDD_MAINWND), NULL,
(DLGPROC)MainWndProc);

if (hWndMain == NULL)
return false; // stop the application

ShowWindow(hWndMain, nCmdShow);
UpdateWindow(hWndMain);
while( GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return (int) msg.wParam;
Show full article (1.61Kb)
3 Comments
  GetModuleFileName() buffer         


Author: Gary Larimer
Date: May 20, 2008 08:21

char szBuffer[10]

iret = GetModuleFileName(NULL, szBuffer, 10)

ierror = GetLastError()

The SDK states that GetLastError() will return 122 or
ERROR_INSUFFICIENT_BUFFER if the Path to the current process is > than
10 characters.

However, GetLastError() actually returns 183 or ERROR_ALREADY_EXISTS
if the Path to the current process is > 10 characters.

Is this a known problem?

Thanks for any comments of info.
4 Comments
  Read Office Files         


Author: miztaken
Date: May 20, 2008 04:16

Hi there,
I want to read my Office Files (DOC,XLS and PPT) files using ole32.dll
and C++ or C++.NEt.
I have googled a bit and found that i can read the contents of DOC
file by using Stogare and Stream, or let me say ole32.dll.
But i dont know how to read other things like embedded attachments.
Actually i want to dump all the embedded attachments of DOC file to my
hard drive for further processing.

So can any one please help me get the info i need.
I am unable to find any tutorial or references to ole32.dll and how to
use it to extract embedded attachments from DOC file.
Please help me, i would be very much grateful.

Thank you
miztaken
5 Comments