|
Read this article :-
http://www.codeproject.com/useritems/pretransdialog01.asp
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
|
|
|
|
|
Do you have any idea how I would do this without MFC and without any explicit message pump?
The create dialog only takes a handle to a CallbackProc and sends the dialog messages through that. I don't have any explicit access to the message loop (as far I as I know) to be able to intercept the keyboard input on the edit box child window.
I suppose if there is no other way I could explicitly create a thread and message pump to go with a CreateWindow but I would rather not put forth so much effort if there is a simpler way.
|
|
|
|
|
Well if you don't use MFC I assume you'll have something like this :-
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Now you can put your code just above the call to TranslateMessage()
Regards,
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
|
|
|
|
|
The thing is that I don't have a message pump. Just a callback procedure. Is there anyway to collect child window messages into that callback procedure?
|
|
|
|
|
Hello -- so now that I have a good working code -- I want to show it off -- but if I print it out it loses all the pretty color syntax stuff. Here are my ideas:
(1) write a perl script that changes the code to some type of markup language
(2) drop the code in word and run a visual basic macro on it that does a bunch of find and replace runs
but I know that ya'll have a lot of great ideas out there . . . any that would make this little problem simpler?
thanks,
tim
---------------------------------------
Tim Booher
|
|
|
|
|
I always wondered why vc++ didn't supoort color syntax printing..
I think you cou ld save yerself alot of work and use UltraEdit32, which supports many lanuages and can print with color syntax...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
a2ps can pretty-print to color PostScript. If you don't have a PostScript printer, you can output with Ghostscript
|
|
|
|
|
Visit www.boost.org and download regex++ library. There is an example in the library that will help you to convert c++ source files in syntax colored html files.
With best regards,
Ivan
|
|
|
|
|
Go and download SciTE. It's nice little editor that does syntax hilighting, printing, and even lets you copy "pretty" code to the clipboard in RTF format; nice for pasting into code reviews, etc.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
sweet -- thanks -- I also learned that emacs will allow a "print postscript" which is really nice. thanks for all the help -- I have a lot of options now which are a lot better than my perl script idea.
thanks,
tim
---------------------------------------
Tim Booher
|
|
|
|
|
I have a web-device that is running Windows CE 3.0 embedded. I've made a small webserver like application that allows me to type in it's IP address and view the webpages that I have set up on it.
I'm using a COM wrapper to wrap the low level C code. I instantiate the COM object with server side JavaScript (because there is no support for ASP), and perform the operations on the machine through the COM object.
Finally... Here's the problem: Whenever I call the functions to interact with the machine, the result I always get is 0 (S_OK). Even though I specify one of the parameters as [out, retval]. How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers?
Any help would be appreciated.
There's a fine line between confidence and arrogance.
|
|
|
|
|
joshkoppang wrote:
How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers?
Dunno about JavScript, but in ASP you can pass arguments ByRef. Same as in Client side VBScript
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
|
|
|
|
|
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
|
|
|
|