|
[Footer: not for nitpicks, but for the noob op]
|
|
|
|
|
I wanted to use a Console Window to output some debug information for my MFC application, that all works fine, but would like to make the Window a bit larger without having to modify the properties of the Console WIndow by hand each time.
I tried this bit of code as the Console was being created - but did not work.
AllocConsole();
m_hConsole = GetStdHandle( STD_OUTPUT_HANDLE );
int handle = _open_osfhandle( (long) m_hConsole, _O_TEXT );
m_fConsole = _fdopen( handle, "w" );
dwSize.X = 120;
dwSize.Y = 50;
SetConsoleScreenBufferSize(m_hConsole, dwSize);
Any sugegstions please
Andy.
|
|
|
|
|
Hi,
on WinXP the layout tab of the console allows you to modify its buffer and window size, and
to make these changes permanent for all future console windows with the same title.
on Vista the option is gone, it just always does it that way.
So for both: do it once manually, then keep the title constant.
|
|
|
|
|
Hi there
I have a Some Question
When I Get Logon UserName , I try to use GetUsername Function
But, Function retrieve Name that is "SYSTEM"
Why are retrieve "SYSEM" user name?
|
|
|
|
|
|
TCHAR infoBuf[INFO_BUFFER_SIZE]; //Account Name
DWORD bufCharCount = INFO_BUFFER_SIZE;
if(NULL == GetUserName(infoBuf, &bufCharCount) )
{
DWORD dwRet = GetLastError();
}
thats all;
|
|
|
|
|
Member 3736335 wrote: GetUsername Function
The GetUserName function retrieves the user name of the current thread.
Try the NetUserGetInfo() function retrieves information about a particular user account on a server or NetWkstaUserEnum
Hope this helps
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks your reply
now i trying to NetUserGetInfo Function , but thats so hard to me~!
hehe
|
|
|
|
|
Did you try to google with NetUserGetInfo keywork. I got this
Sample Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Very Thanks _AnShUmAn_
When i find some information , i can try WNetGetUser Function.
the function is same retrieve logon user name.
so, what is different that WNetGetUser and GetUserName?
|
|
|
|
|
any body has experience with novell edirectory LDAP server from your application ?
if yes,
I want to send multiple asyncronus requests to edirectory LDAP server. when i try send 1000 request at a time, eDir LDAP server accepts only few requests.
How can i tune eDir LDAP server into support huge requests ?
Thanks,
Sakthi
Nice things do nice works
|
|
|
|
|
is there any API is there using which we can done the os provisioning in windows . ??
Can any body tell me how the provisioning of os can be done programmically .
vineesh
|
|
|
|
|
what are you calling "provisionning the OS" ?
|
|
|
|
|
Can you more explain,please?
|
|
|
|
|
provisioning simply means automatically installing and configuring operating systems,
Suppose i have a server machine and some n number of computers connected to it . The server then done a mulitcast to all the members to know which machine is needed a O/S installation . The client machines which are waiting for installation will send back a request to the server .
Then the server needs to install the O/S followed by the system softwares and appln softwares on to the respective machines .
There are two different ways to achieve this
one is a disk cloning
second is a scripted installation
Both disk cloning and unattended scripted installs can be performed remotely using a PXE/DHCP server.
Now my question is whether we are bale to write some APIs for this
remote installations ?
Is it clear now ..?
vineesh
|
|
|
|
|
Be solved by using CWorkbook::SaveAs and CFileDialog.
system
modified on Monday, July 28, 2008 9:29 AM
|
|
|
|
|
|
CApplication app;
...
app.Quit;
system
|
|
|
|
|
Hi,
I found the code below work, but got a problem.
_variant_t var(NULL);
app.Save(var);
If I choose cancel in the SaveAs dialog, the will be an error that says Save method is invalid.
Any suggestion?
system
|
|
|
|
|
hi ,
I have a application to disable buttons .
Example :
There are 50 buttons , If i put 20 in the text box 20 buttons should be shown . Please tell me using ARRAY .
Because i have done it manually i.e
Getdlgitem(id_button)->enablewindow(true);
I need using ARRAY because ,there r 50 buttons know ..
With warm regards
K.Guru moorthy
k.guru moorthy
|
|
|
|
|
The real question is, "Why is your window having 50 buttons on it?".
Anyways, if the IDs of the buttons are sequential, you may run a loop and call EnableWindow(true) from within it.
|
|
|
|
|
v are using for calender appli ,Small buttons .
Say how to do using array
k.guru moorthy
|
|
|
|
|
What array are you talking about? Your controls should have been defined like this:
#define IDC_BUTTON1 1000
#define IDC_BUTTON2 1001
#define IDC_BUTTON3 1002
#define IDC_BUTTON4 1003
#define IDC_BUTTON5 1004
#define IDC_BUTTON6 1005
If they are defined sequentially, then you may run a loop like this to enable or disable them:
for(int i = IDC_BUTTON1; i<= IDC_BUTTON6, ++i)
{
GetDlgItem(i)->EnableWindow(true);
}
|
|
|
|
|
thanks. it works fine
k.guru moorthy
|
|
|
|
|
You must be absolutely sure that you don't have duplicate IDs for your controls (the compiler will warn you though). If you have duplicate IDs, the loop won't go through as you expect it to.
|
|
|
|