|
Hi
I'm getting crazzy
I wrote a (very) little test-program for you. It's just a dialog with a button on it. When you click on the button it does nothing but calling
the function.
ModifyStyle( NULL, WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, SWP_NOSIZE | SWP_NOMOVE );
As I said the window isn't resizeable after that, but the cursor changes to a resizing cursor.
I'm using Win2k, but I don't think that this makes any differences.
Could you please download the program and test it on your computer, wether it works or not. Perhaps this helps me to get the solution.
Link (On index.html: link to Border_Test.zip - 32k including Sourcecode and Executable): http://mitglied.lycos.de/dave2m/
Thanks for your Consideration.
dave
|
|
|
|
|
Hi
As Spy++ said "Internet Explorer_Server" isn't the child of a main window.
There does exist "Shell Embedding" and "Shell DocObject View" as its parents.
My question is: how can i simulate a mouse click to the "Internet Explorer_Server" controll?
I can't use the mouse_event function because the window i want to hit may be minimized or invisible.
I recognized that there are lots of massages send to the main window and its children when I click on the control.
Can you help me?
Thx a lot
Dave
ps. sorry for my bad english
|
|
|
|
|
neotrace wrote:
how can i simulate a mouse click to the "Internet Explorer_Server" controll
Send it WM_LBUTTONDOWN and WM_LBUTTONUP messages.
--Mike--
"I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage."
-- Chris Manuder, relativistic system administrator
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Hi !
The Problem is this...
I want to login to a remote machine through a program using vc++/c++. I have administrator privilages of remote machine i.e. username and password are known in advance.
Can it be possible to pass the username and password as parameters to any API(if exists)or in any user define method.
Thanks in advance !
bye
Gautam
|
|
|
|
|
logging in can mean a lot of things. What do you intend to accomplish?
Do you want "remote desktop" abilities? If so, the machines have to be XP, 2000Server, or 2003Server (I think)... and then is available by an ActiveX control...
Other types of access are available programaticallly...
But it's not clear what exactly you are looking for....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
ok
this is what i want to do.
In my programs I am using some windows apis like(RegConnectRegistry,RegOpenKeyEx,GetFileVersion etc)to connect remote registry
or getting any information from remote machine.
These APIs works only when I login to remote machines using their username and passwords.
This thing i want to do programmatically, any program or api that can use username and passwords of remote machines.
gautam
|
|
|
|
|
oh.
And I take it that you are not operating in any sort of domain environment, where priveleges, access, and passwords are centrally administered. If you were, these API's would work assuming that you had actual access priveleges.
So, you want to arbitrarily be able to connect to a machine, with their known credentials, and make the connections to these remote APIs.
That I don't know the answer to.
Take a look through "Network Management" portion of the platform SDK.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Hi,
is it possible to check if an external application has been started, in Windows 98/NT/2K? This application runs in background mode (silent mode), i can see it only in processes tab of Task manager.
I am programming with (ANSI) C.
Thanx in advance,
Aenaos
|
|
|
|
|
One solution is FindWindow().
Kuphryn
|
|
|
|
|
Have you looked at EnumProcesses() and related functions?
|
|
|
|
|
if it's a program that you control, consider adding a mutex with a global name.
The external app creates it, your program checks to see if it's in-use (running from that other program). This way is handier than EnumProcess -- if you ever change the names of programs, you don't have to rename your mutex.
-p
see CreateMutex and WaitForSingleObject API's.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
I'm trying to align a struct like so:
<br />
__declspec(align(16)) struct myStruct<br />
{<br />
char a;<br />
int b;<br />
short c;<br />
};<br />
and i get align is undefined when trying to compile.
I even copied the sample from MSDN and had no luck.
Anyone knows what's the problem? Is it a compiler switch
not used? Or only used in VC7?
thanks
|
|
|
|
|
sharlila wrote:
Anyone knows what's the problem? Is it a compiler switch
not used? Or only used in VC7?
The align declspec option is not supported in VC6. Try using the #pragma pack() option instead:
#pragma pack(push, 16)
struct myStruct
{
char a;
int b;
short c;
};
#pragma pack(pop) Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks for replying, I was afraid it was the answer, however,
MS didn't say it's not for VC6.
anyways, I also saw this option (pragma pack) but it doesn't
allow me to go over 32 (align goes to 4k if I'm not mistaking).
so is this the final answer?
|
|
|
|
|
#pragma pack(push, #) does not allow you values other than:
1, 2, 4, 8, and 16.
It's pretty bad
|
|
|
|
|
Yeah, I don't think the two options are identical, they are used for different things, but have similar effects.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
Hello,
I am trying to dynamically change the texts of the menu items of my main menu. The program should translate the menu items to the local language at runtime. I am using the BCMenu class:
UINT nItem = 0;
CString strItem;
CString strNew;
char *pszSrc = NULL;
while(1)
{
if(m_menu.GetMenuText(nItem, strItem, MF_BYPOSITION) == FALSE) break;
pszSrc = strItem.LockBuffer();
strNew = TRL(pszSrc);
strItem.UnlockBuffer();
if(m_menu.SetMenuText(nItem, strNew, MF_BYPOSITION) == FALSE) { ASSERT(FALSE); }
MessageBox(strItem + " -> " + strNew);
nItem++;
}
m_bMenu = SetMenu(&m_menu);
ASSERT(m_bMenu == TRUE);
The TRL function takes a char * as input and returns a char * to the translated string. This works very well as one can see in the dislayed message box (strItem+"->"+strNew).
The items are translated correctly, but the menu doesn't change. The menu items remain english, untranslated. But the SetMenuText function returns TRUE...
Any idea what is going on?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
call DrawMenuBar() for the window. From MSDN:
Redraws the menu bar. If a menu bar is changed after Windows has created the window, call this function to draw the changed menu bar.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Nope, that doesn't help. I've changed my code now a bit:
UINT nItem = 0;
UINT nSub = 0;
CString strItem;
CString strNew;
char *pszSrc = NULL;
BCMenu *pSubMenu = &m_menu;
while(1)
{
nItem = 0;
while(1)
{
if(pSubMenu->GetMenuText(nItem, strItem, MF_BYPOSITION) == FALSE) break;
pszSrc = strItem.LockBuffer();
strNew = TRL(pszSrc);
strItem.UnlockBuffer();
if(pSubMenu->SetMenuText(nItem, strNew, MF_BYPOSITION) == FALSE) { ASSERT(FALSE); }
nItem++;
}
pSubMenu = (BCMenu *)m_menu.GetSubMenu(nSub);
nSub++;
if(pSubMenu == NULL) break;
}
m_bMenu = SetMenu(&m_menu);
ASSERT(m_bMenu == TRUE);
The items in the menu (so for example all items in "File", such as "Exit") are translated and shown correctly!
It's just the "main main" menu bar (so the one with "File", "Extras", "View", etc).
The code snippet above is called in OnInitDialog.
Any more idea?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Hi!
I am using the DHTML editing control and I want to add a table so I want to add the code into the html code of the control myself? How can I do it?
Thank you very much for your future answers!
Well... I am a beginner ...
|
|
|
|
|
I/m new to VC++. I developed a program which receives a float value via a dialog box (derived from CDialog). This value is a Fahrenheit temparature. Next it performs some mathematics and successfully finds out Centigrade equivalent (a float again). I want this value displayed on the Windows Client Area. How can I? So far I have used CDC::TextOut(int,int," "); this shows a string message but doesn't show the variable's value. Even type casting hasn't helped.
LOOKING FOR YOUR GUIDANCE
|
|
|
|
|
To convert a float to a string, use
CString str;
str.Format(_T("%f"), (double)MyFloatValue); [edit]If this doesn't work, remove the (double) cast:
CString str;
str.Format(_T("%f"), MyFloatValue); [/edit]Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
You've mixed types there. %f is for floats, no need for the cast to double . In fact, the code will break because Format() will expect a float value on the stack, but it will see a double and generate an incorrect string.
--Mike--
"I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage."
-- Chris Manuder, relativistic system administrator
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Michael Dunn wrote:
%f is for floats
That's what I thought, but because I don't usually use float s, I checked MSDN, and the documentation for printf said %f expected a double. Perhaps the docs are wrong.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|