|
Nish [BusterBoy] wrote:
Dunno about JavScript, but in ASP you can pass arguments ByRef. Same as in Client side VBScript
How?
There's a fine line between confidence and arrogance.
|
|
|
|
|
C++
BSTR bsOutRetval;
HRESULT hr = myCOMObj->SomeMethod(&bsOutRetval);
....
SysFreeString(bsOutRetval);
VB
Dim sOutRetval As String
sOutRetval = myCOMObj.SomeMethod();
If you don't grab it, I can explain more.
Michel
|
|
|
|
|
DAMN, I misread the article. Again!
Sorry buddy
|
|
|
|
|
Hi,
How to capture monitor & display it on a Picture control using StretchBlt()
|
|
|
|
|
ALT-PrintScrn works wonderful!!!
Programmatically...I dunno...I imagine you could use GetDeskTopWindow() and use it's device context. However this ain't tried and true it's just a hunch.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
CWindowDC wnd(NULL);
You now have a DC that contains the contents of your desktop.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
|
hi,
How is it possible to change the color of a Button
|
|
|
|
|
Subclass teh button then you can handle the WM_CTLCOLORBTN message. In this message you will set the color of the brush that you want the button to use instead of the default color.
|
|
|
|
|
I done that method also...But I didn't get the color
|
|
|
|
|
You need to create a brush as a member object and return it from this function.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
kilowatt wrote:
Subclass teh button then you can handle the WM_CTLCOLORBTN message
Only owner drawn buttons receive this message.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Check out the following URL
Chris's and subclassing buttons
Very imformative!!
Laterz !;P
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I have a resizabe dialog, now how do I restrict the minimum size when manually resizing.
Thanks
-----------
|
|
|
|
|
You should check out the WM_GETMINMAXINFO message in MSDN.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Cool I did not know of this until now...I would have just handled the OnSize...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
|
Given the window handle of a window in another app, how to get the processID and thread ID related to that Window? E.g. When we SPY++ a window, it'll show the processID and threadID under the window.
Thanks in advence,
Wally
|
|
|
|
|
::GetWindowThreadProcessID
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
ok let me see if I can articulate my problem. If I don't let me know.
I have a class called clientsocket that Is a derived from CAsyncSocket. I've overridden OnReceive to just put a AfxMessageBox on the screen when it is triggered.
ok heres the problem.
When I create the listening socket and accept the connection from inside a thread the OnReceive never triggers. I can send messages from the server to client but never get the Onreceive when sending something from the client to the server. The part that I can't figure out is that if I cut and paste the exact same code into a method that is called by a button on the main dialog window it works correctly. just not when I put the code in a thread... does this make sense? if not let me know and I can try to elaborate.
|
|
|
|
|
How do you know the routine isn't getting called? Have you set a breakpoint in the routine?
If you are just going by the lack of a message box, then maybe it is caused by trying to access windows in another thread and thus failing.
Instead of calling AfxMessageBox from a worker thread, just try ::MessageBox (NULL, "Made it", "Made it", MB_OK);
But these are all guesses.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I thought about that and added a break point put it doesn't break so I assume it never gets in there.
anybody that wants a copy of the code let me know and I can send it to them...its small...about 35k.
|
|
|
|
|
I just read somewhere that its bad to try to use a CSocket in a workerthread because of a lack of a message pump. could this possibly be my problem...theres nothing in there to handle the OnReceive?
|
|
|
|
|
I think it should be okay in a separate thread. I have written exactly the same code in the past, where I derived a class from CAsyncSocket and ran it in a separate thread without any problems. (For the thread, I derived a class from CWinThread)
At the risk of stating the obvious, you did do an AsyncSelect( FD_READ|.... ) at some point, to enable the ::OnReceive virtual function.
I can have a (quick, as I don't have much spare time) look at your code if you like.
Dharminder S. Birdi
|
|
|
|
|
hello -- i am trying to use both isalpha() or isdigit() in my code and they aren't working. I have the following code
next_state WhatIs( char chrSymb )
{
if (isdigit(chrSymb)) return digit;
if (isalpha(chrSymb)) return letter;
if (chrSymb == '_') return underscore;
else return not_char;
}
I continually get 'not_char' from this. I am afraid it is that I am sending a char into an int argument. Here is how I call the function.
input = WhatIs( MyString[i] ); where MyString is a string from the STL. When I try to step into this function I get a prompt to "Enter the path for _CTYPE.C" In my header I include:
#include <ctype.h>
Any ideas what I am doing wrong?
thanks,
tim
---------------------------------------
Tim Booher
|
|
|
|