|
Many thanks for the reply, I've tried the param version but I'm getting a NULL pointer when using CWnd* pWnd = GetDlgItem(IDOK); Any ideas?
|
|
|
|
|
Where is this code being used? If it is on one of the property pages or the app itself, there won't be a control with an id of IDOK.
BOOL CMyPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
CWnd *pButton = GetDlgItem(ID_APPLY_NOW);
ASSERT(NULL != pButton);
pButton->ShowWindow(SW_HIDE);
pButton = GetDlgItem(0x00000009);
ASSERT(NULL != pButton);
pButton->ShowWindow(SW_HIDE);
return bResult;
}
|
|
|
|
|
Hi
please guide me How can I make Installer for my Offfice2K COM Addin, in VC++/ATL ? This COM Addin creates .dll file.
I'll be grateful
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
HI, i have a problem:
I should write an application executing a batch file which starts an MS-Dos window (console)
a programm is runnning there.
In this console i must send commands "visk[enter]" .... wait some time .... "visreg[enter]" .... and so on...
is this possible??
I searched very much, but can't find the right thing up to now.
Is it possible with this funtions:
CreateProcess (uses PROCESS_INFORMATION, from which i can get the HANDLE
to the window (but what do i need to use? hProcess, or hThread ??
With this can i use "WriteConsole" ????
I think this only writes strings, but i need to execute the command... HOW can I do that???
also it would be good, to get the response from the console output as an errormessage in my app.
Please Help!
I'm german, so if u're too, would be good to talk in german language.
Greetingz from da HackMan
|
|
|
|
|
Da_HackMan wrote:
also it would be good, to get the response from the console output as an errormessage in my app.
See if MSDN article Q190351 helps. There's also another one titled "Creating a Child Process with Redirected Input and Output".
|
|
|
|
|
Hi, I did some research now in google groups and MSDN, but still cant find any solution for my problem.
The goal of the whole story is to execute batch files on a remote machine.
Wouldn't it be better to write som RPC appication? But I donm't know how to do this!!!!
Can anybody explain me how to get THIS working?
I want to execute one or more batch files on a remote machine. which are lying all in the same directory.
at the moment it is working this way:
Call a batch file which internally calls remote.exe (i noticed this is from MS!)
In the nw command prompt (which is remote.exe) enter for example "visk" which is an batch file
from the remote machine lying in the same directory like the remote.exe (which is startet as server on the remote machine)
Now i want to make a Dialog based application. simply clicking a button to execute a command, or a command sequence like "visk [ENTER] visreg[ENTER] updstat[enter] ..."
HOW the hell can i manage this??? any clue??
with RPC i can start these batch files on the remote system, but i don't get the output they provide, am i right???
PLEASE HElp, I'm getting crazy of that *g*
Greetingz from da HackMan
|
|
|
|
|
Hi all,
can any body tell that, how to convert folder name with spaces into short names to be usable by the GetCurrentDirectory(...).
Thanks
The Phantom.
|
|
|
|
|
GetShortPathName() converts long names to short, but what has this got to do with GetCurrentDirectory() ? GetCurrentDirectory() has no input parameters.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
hi
i have to increase the efficeny of printer using postscript
that is "They are currently getting speeds of about 3 seconds per card but need something closer to 0.5 seconds per card. "
regards
ab
|
|
|
|
|
what do you mean ?
you want to optimize the generated ps file ? or tweak the printer itself ?
who's generating the postscript file ? if it's you, reviewing the code itself might be usefull.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
hi
i m generating the both optimized & non optimized ps files, the prob is that once the ps file is given to printer , the processor utilize too much time for processing it
there is some software like "JLYT" ( u can view its info from <http: www.hp.com="" go="" solutions=""> ) in this case the efficency of the printer is increased
i think now it is clear to u
regards
ab
|
|
|
|
|
How are you creating the Postscipt that is being sent to the printer? I need to know the same thing. How to print to a postscript printer.
Thanks
Larry
|
|
|
|
|
Hi!
To detect Ctlr+A in WM_KEYUP we use GetKeyState(VK_CONTROL)<0.
How can we know that user is pressing Alt+A for example ?
Thanks,
Sovann
Everything should be made as simple as possible, but not simpler [Albert Einstein]
|
|
|
|
|
That will be done as WM_SYSKEYDOWN or WM_SYSKEYUP, not WM_KEYDOWN/WM_KEYUP.
Steve S
|
|
|
|
|
VK_MENU
*.*
cin >> knowledge;
|
|
|
|
|
Hi All
i have a list control, and am using the below code to delete selected
items out of the control,
once the items have been selected the user presses a button and it calls
the below function
the problem im experiencing is if i select say
10 or 15 items it doesnt delete all the items only say 7 out of 10
can ne1 see where im going wrong
CListCtrl* pLB = (CListCtrl*) GetDlgItem(IDC_LIST1);
POSITION pos = pLB->GetFirstSelectedItemPosition();
if (pos == NULL)
AfxMessageBox("Nothing Selected");
else
{
while (pos)
{
int nItem = pLB->GetNextSelectedItem(pos);
pLB->DeleteItem(nItem);
}
}
thanks
si
|
|
|
|
|
You may find a better way is to create a list of selected items (including their row numbers), and delete from the highest number downwards, to avoid moving targets...
Steve S
|
|
|
|
|
As Steve indicated, you must remove items from the bottom up. Why? Because once you remove an item from a listbox, listctrl, or a combobox, all items below the removed one move up spot in the list, thus their original index number is no longer.
|
|
|
|
|
Hi all,
I need to know, how to find out the (.exe) running application path.
Thanks
The Phantom.
|
|
|
|
|
look @ GetCurrentDirectory for the current directory of the executable
or
GetModuleFilename for the path + filename where the exe resides
|
|
|
|
|
Hi!
To get full exe path use GetCommandLine
Everything should be made as simple as possible, but not simpler [Albert Einstein]
|
|
|
|
|
Is it sure, that it will work? In docs stays that the OS _may_ prepend a fully qualified path, if wasn't specified as a CreateProcess parameter. For that reason I'm afraid to use it and prefer the GetModuleFilename .
|
|
|
|
|
try this, its working for me
Full Path and Filename:
=======================
CString strArgument;
strArgument = __argv[0];
Set the default path:
====================
CString strArgument;
strArgument = __argv[0];
int i;
for(i=strArgument.GetLength()-1; i>0; i--)
{
if(strArgument.GetAt(i) == '\\') {
strArgument.SetAt(i+1, 0x00);
break;
}
}
SetCurrentDirectory(strArgument);
|
|
|
|
|
yeah, that I can simply imagine, but the question is, if there's always a full path supplied - e.g. if you run program placed in a path, does he receive the full path, if someone runs it as CreateProcess , if it will also have such a path...
For that reason I think the GetModuleFileName is a better choice
|
|
|
|
|
You will get always the full path, just try it !
|
|
|
|