|
Just wondering how winamp sets focus on the current instance's main window when the exe is launched and winamp is already running (ofcourse you have to uncheck "allow multiple instances" check box in preferences)
I thought it was cool!! Any idea how to implement that?
I did find a very useful article on limiting instances (right here on CP!!) though
Clickety[^]
----------------------------------------------
If you need a hammer get C and shut up. If you need a nail gun get C++ and shut up. If you don't need *those* things (and good design should tell you) then by all means get a factory, factory, factory.
--code-frog@codeproject
|
|
|
|
|
Using FindWindow to obtain HWND of the main window and ShowWindow, SetFocus...
|
|
|
|
|
|
Tanx for the replies guys!! I kinda figured that one out on my own... :->
----------------------------------------------
If you need a hammer get C and shut up. If you need a nail gun get C++ and shut up. If you don't need *those* things (and good design should tell you) then by all means get a factory, factory, factory.
--code-frog@codeproject
|
|
|
|
|
i want to check machine offline or online(having internet) through programming if anybody have idea please share with me.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
|
hi,
i have problem with SMTP server.
I wrote simple client but first reading from Socket is very slow.
I do function call like this:
socket() //ok
connect() //ok
select() //with 5 sec.
There is first problem, this function return after 5 sec. with result
OK (socket readable) but if I'll try 1 sec. instead it returns after 1
sec. with same result.
...next call works ok = if socket is readable it returns
immediately. (just first call after socket openning)
But another problem is
recv()
It takes about 40 sec. to get "220 something"
And again, another call of recv() works correctly (couple ms.)
Does anyone know what's wrong?
Thank you
viliam
|
|
|
|
|
hey people,
i developed a vc++ COM component and i want to invoke it in my web page. i registered the component successfully n tried following code in ASP:
<%<br />
dim obj,temp,try<br />
set try=CreateObject("NEW.CReply")<br />
obj=try.CReply<br />
temp=obj.Reply(login,reply)<br />
Response.Redirect("Login.asp?reply="&reply)<br />
%>
this gave me the error:
Microsoft VBScript runtime (0x800A01AD)
ActiveX component can't create object: 'NEW.CReply'
some suggested me to use ASP.NET - the .Net-COM interoperability feature. but i've no idea as to how to do it! i read some books and found out that i should use tlbimp utility.
but tlbimp says 'NEW.dll is not compatible type library'
one of my friend said i should check the binary compatibility of the dll.
can anyone please help me out?
|
|
|
|
|
How to display only buttons in XP Style not the toolbar and propertysheets
knarasimharao
|
|
|
|
|
|
|
|
|
Hi.........
I noticed that it remains extremely hard to plot graphs and data by using Visual C++ 6.0.
Desesperately, I cannot manage and even deal by myself for readind data and plotting when using Visual C++ 6.0
Moreover no such sources available.
If someone has one....... Thanks a lot!
I would wecome to receive a demo, source codes for personal knowledge!
Thanks..
example of filetxt file)
Typical header:Solvers, or optimizers, are software tools that help users find the best way to allocate scarce resources.
1 5.258
2 -8.548103675
3 -7.686156375
4 -9.859503638
5 4.211616105
6
.
.
.
with comments With so many domestic distractions, working from home can tempt even the most diligent wor........
Thanks
Reagrds
|
|
|
|
|
Hi,
I don't know if it will help but try:
Graphviz http://www.graphviz.org/.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
thanks a lot but in fact I downloaded it and proceeded as mentionned but cannot plot any graph...
Thanks ,
Regards
|
|
|
|
|
can recursive functions be inline functions?
|
|
|
|
|
The compiler might not know the number of recursions that can happen during compile time. Neither can it decide it by itself. That information will be available at runtime only. So the compiler will *not* be able to generate the inline code at compile time.
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
yeah!.....exactly what i had in mind.....but if somehow if it could,it did be more efficient!.....it seemz recursive functions are slightly slower than functions that are iterated.....
thatz when i thought of inline.....
anywayz!.....thanx for the reply
cheerz!
|
|
|
|
|
You're welcome
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
inline is only a suggestion to the compiler. There are things you can do in code which will result in a "vanilla" function even though it's marked inline , such as taking its address. Another common one is recursive functions.
Steve
|
|
|
|
|
Hi, regarding an earlier post, suggestions were given as to how to display Locale current time(by using the GetLocalTime n GetCurrentTime). It did work in a single form (managed Application).
My problem now is as I tuned the code and used it in my intended managed Application, i have 4 errors and 4 warnings which I understand is as a result of an ambiguity in an ObjectData; the ATLCom.h header and some other header (apparently in the managed App) are conflicting....fine.
So how can one go about displaying the date and time in a managed App (windows forms .net App)?
Please Help y'all.
Regards....
|
|
|
|
|
Hi All,
The VS2005 visualisers look great in VS, but is there a way of using the technologies (e.g. the little windows with + buttons that open without a mouse click, etc)?
And if so, how?
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
I have two C source files. One does not have main function, but it has a function called MyFunction(). I want to use this function into the other c file. How do I do it? I know i must create a header file (which defines MyFunction), and include it. I do not know how do I link it. (I am using TURBO C). It compiles, but when I try to make the .exe file, I get an error called Undefined symbo, _MyFunction. Please help me.
Regards
Aljechin Alexander
|
|
|
|
|
Hi Aljechin,
Assuming file 1 is a.c and file 2 is b.c (with MyFunction() in b.c). Then you need to create a header file like b.h . Inside the b.h define a prototype of your function (e.g. void MyFunction (void); )
Then make sure that the b.h is included in each a.c and b.c . Then compilte both files.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|