|
Hi guys i sometime get confuse in this?
What is the difference between Instance and Context.
And how two different instances for the same application work.
What are the responsibilities of the OS two maintain the two different instance.
What is the responsibility of the Application developer.
Thanks in advance.
Anil Kumar
|
|
|
|
|
an instance is a representation in memory of a particuliar type (class, struct, union, native type).
when you write int i1 = 4, i2 = 5; , i1 and i2 are 2 instances of an int .
the context is all that can interract with the program and affect the behavior of it (variables values, thread states...)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi all
I am using VB 6.0 and trying to use SetForeGroundWindow() API in Windows XP . But the API's behavior seems to be different from Non XP OS , because the minimized Application window gets the focus btu waits for a mouse click to come to fore ground . Is there anyway to make the Application window to come to forground straight away ?
regards
Dharani
redindian
|
|
|
|
|
You can use ShowWindow(SW_SHOWNORMAL);
this is this.
|
|
|
|
|
dharani wrote:
Is there anyway to make the Application window to come to forground straight away ?
What about [SetWindowPos] api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Are you asking for VB or VC++ code ?
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Try looking at AllowSetForegroundWindow [^]. Recent versions of Windows prevent applications from taking over the foreground window via SetForegroundWindow , since it takes control of the focus away from the user (which is not a good idea, from the user's perspective).
Software Zen: delete this;
|
|
|
|
|
what is difference between a handle and a pointer?
you can access all of the members with both of em!so what is the difference?
|
|
|
|
|
technically, none ; but handles are generally called like this because the allow to handle a whole object, such as window controls...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
In general terms, a handle is an opaque value used to identify an object. In and of itself, it doesn't do anything, and can't be used to access the object directly. You pass it to one or more functions that perform operations on the object.
A pointer is essentially an address of a piece of memory. In C and C++, a pointer is associated with a type, which lets you treat the pointer as an indirect reference to an object of that type.
Handles may be implemented using pointers; in fact, many handle types in Windows probably are pointers, down underneath. There are also a large number of handles that are not pointers, however. Using a handle as a pointer Is Not A Good Thing because you are relying on an implementation detail that may or may not work in future versions.
Software Zen: delete this;
|
|
|
|
|
I have been working on a dialog based app in Visual C++ 6.0.
I set up an accelerator table and assigned shortcuts to some of
my menu items in my menus. Then I discovered the problem.
If I use any F key as a short cut, or any key in conjunction with
the Shift key, the program will carry out the appropriate action,
but then it crashes, whereas if I invoke the menu command manually
from the menu, there is no problem.
I tried looking around the internet for some answers but didnt
find anything useful. This makes no sense whatsoever! Does anyone
have a clue what is going on?
|
|
|
|
|
It seems that when a window closes after a function key or shift
key combination is used as an accelerator key, the
program invariably will crash. The exception is being thrown
from wincore.cpp, line 875 it tells me.
Looking in the file, this line turns out to be part of the
CWnd::AssertValid() function. Line 875 is:
// should be a normal window
ASSERT(::IsWindow(m_hWnd));
This is not helpful though, and if there were a
problem with my windows, then it should happen each time I
open one of them, regardless of whether I invoke the menu command
via the accelerator key or via the menu itself.
I don't know what to do other than just change my accelerator
keys so that none of them use the function keys or the shift key.
Is there any good reason for this, or is it just something else dumb
to blame on microsoft?
-- modified at 0:29 Saturday 3rd September, 2005
|
|
|
|
|
Hi All
I want to retrieve the information related to internet like
1)Visited sites with time & number of hits in certain duration
2)Chatting time
3)Mails sent etc.
Please reply.
Thanks & Regards.
|
|
|
|
|
I have Visual C++ lib file, but I also want to use C# to write my program. How can i do? Can I use Visual C++ *.lib into C#?
Second problem:
Is it same the writen methods with Visual C++.NET & Visual C++?
thanks
|
|
|
|
|
You need to compile the lib in to a dll, then you can pinvoke it. I don't believe you can use code from a lib file in C#, as a lib file is linked against, and you can't link C++ code into a C# app, all you can do is call a C++ dll from C#.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The small possibility exists that you use VS2005. In that case you might be able to produce a mixed assembly[^].
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi all,
I am building an AUTO-RUN project which have application install, directx install and device driver install. After directx has been installed completely the system must be rebooted, in this case how can i follow the driver install procedure?
Are there any API can do that in VC++ ?
Thanks for any suggestion or help.
|
|
|
|
|
Search the registry for runonce. This key is where you put the path to the app you want to run. There's no API to call, because your program will stop when you reboot.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
create a log file in a particular directory.. update it whenever a successful installation has been done.. mark it up with some checkpoints.. continue from there..
Eg:
Log File:
1.. (Application install done..)
2.. (DirectX done..)
so ur log file will have 2 at the End.. so u should start from 3 ->(Driver Install)..
am i right?
Regards,
V
|
|
|
|
|
I found that most of the example are multithread program, I still cannot find a example program abuot server and single client. can somebody give me some example? It really helpful for me.
|
|
|
|
|
|
|
i have no idea that hw to shut down certain pc automatically whn that computer priority shown emergency which is 0. we need to knw which ip address is shown the priority 0 and shut down it whn the priority 0 is more than 10 times!
can u all gv me an example hw this work?? thanks!
|
|
|
|
|
bryan523 wrote:
i have no idea that hw to shut down certain pc automatically whn that computer priority shown emergency which is 0
Can you clarify what you mean with "computer priority shown emergency"?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
actually server have priority 0 to 7 whc catagories the level of access by unauthorizes person and save it at syslog txt file! As below:
Numerical Severity<br />
Code<br />
<br />
0 Emergency : system is unusable<br />
1 Alert : action must be taken immediately<br />
2 Critical : critical conditions<br />
3 Error : error conditions<br />
4 Warning : warning conditions<br />
5 Notice : normal but significant condition<br />
6 Informational: informational messages<br />
7 Debug : debug-level messages
the syslog txt file contain priority and ip address as below:
<133>Jul 26 10:32:48 sensor SFIMS: [1:499:4] ICMP Large ICMP Packet [Classification: Potentially Bad Traffic] [Priority: 2] {ICMP} 192.168.2.25 -> 202.76.239.1
I need urs help that hw to automatically shut down the certain pc by knowing the ip address when the priority 0(emergency) is more than lets say 100 times!
-- modified at 2:37 Friday 2nd September, 2005
|
|
|
|