|
well, in VC++6.0, FILE>OPEN
change the file types to .exe
change "Open as" to resources
then browse to the .exe you wish to "browse"
Joe
"I'd rather be a smart ass, than a dumb ass"
|
|
|
|
|
Microsoft to improve C++, C#[^]
Interesting news report on C++ standards conformance. The highlight being that our very own Chris Maunder is quoted as the second authoritative source on the subject, right alongside Nick Hodapp.
* Chris is blushing but deep down he got a kick out of this, as would anyone
Paul Watson Bluegrass Cape Town, South Africa Ray Cassick wrote: Well I am not female, not gay and I am not Paul Watson
|
|
|
|
|
Does anyone know how to deselect all the text in an edit control...I am using a read-only edit control which displays a resource text file. The problem is, is that when I open the dialog all the text is highlighted. I tried sending the message SendMessage(hwndEdit, EM_SETSEL, -1, -1); but still no luck. I also would like to hide the caret but I don't know how to do that either...Does anyone have any thoughts on this?
|
|
|
|
|
You probably need to have called SetFocus() to the control before setsel. When a edit control recives the focus, by default it selects the whole content. If you call setsel after setfocus this shouldn't be a problem.
Also take a look at the function CWnd::HideCaret() for the edit control, that may help you.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Thanks for the help but still nothing happened. I called SetFocus(hwndEdit) and then SendMessage(hwndEdit, EM_SETSEL, -1, -1) but still everything was selected. Any other ideas...btw here is the code exactly:
case WM_INITDIALOG:
hResource = LoadResource (hInst,
FindResource (hInst, TEXT ("README"), TEXT("TEXT")));
pText = (char *) LockResource(hResource);
SendMessage(hwndHelp, WM_SETTEXT, 0, (LPARAM) pText);
SetFocus(hwndHelp);
SendMessage(hwndHelp, EM_SETSEL, (WPARAM) -1, (LPARAM) 0 );
return TRUE;
Do you see any problems here?
|
|
|
|
|
When I load bitmap on toolbar it looses it colors. Is there any particular tool to develop a bitmap that can be used by graphic designer or particular way a bitmap has to be made to load on toolbar without loosing its colors.
I appreciate your response,
Thank you,
Raghu
|
|
|
|
|
Hi All,
I have a simple yet complex problem, has anyone tried or does anyone know how to create a child window that is a java window?
My idea is this:-
Using JNI
start java VM
create top level java class (window), passing View HWND
in java (window) create Frame with HWND as parent
What I mean by this is a java application/class runs inside a MFC application like so:
.......MFC Main Frame...............
. ......MFC View.................. .
. . ......Java Swing Window..... . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . ............................ . .
. . . .
. ................................ .
. .
....................................
Thanx in advance...
|
|
|
|
|
The best integration for Java in a WIN32 window application is through applet context. Thus I would reuse the chtmlview and put an html page there with the right applet tag.
Back to real work : D-22.
|
|
|
|
|
... I would like to look into how to stop popup ads in a browser.
Is there an example of what is involved in doing such a thing?
thanks much!
craigk
|
|
|
|
|
craigk wrote:
Is there an example of what is involved in doing such a thing?
Yes, there are 4 or 5 articles in CP about this. Search the articles and have fun!
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Daniel Turini wrote:
and have fun!
If you really meant fun, you would have provided a link, wouldn't you ?
Back to real work : D-22.
|
|
|
|
|
You could put a link to an article of your, right ?
(I'm a little tired of requests like "Please, search this for me?")
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
I searched yesterday on codeproject. You or, in your case, not believe me.
I search for "pop up ads", i searched for "block ads", i searched for popup ads", i searched for "block popup", etc...
Perhaps I was in a rut, and was on the wrong track as to what to search for.
Overall, I am quite successful when googling around for information, or when searching on codeproject for information on how to do something.
If you know there are several articles out here that talk on this subject, I really do not mind searching for them. Would it bother you greatly to give me a hint as to what to search on?
thanks much!
craigk
craigk
|
|
|
|
|
Thanks!
You are right. I should have been able to hit those myself.
craigk
|
|
|
|
|
I have a program that runs fine as a service under windows nt, however when I try to run this on windows 2000, I get an error message when I try to manually start the service from the service control panel. (I haven't tried to let it start automatically, since I assume the problem will continue to occur.) I get the message that the Service failed to start in a timely matter error 1053. The event log shows that the process timed out at 3000 milliseconds. Does anyone have any suggestions I haven't been able to find much regarding this?
|
|
|
|
|
Maybe some library used by your program is missing on the Windows 2000 machine?
|
|
|
|
|
Unless there is something nt vs. 2000 specific in the libraries, I don't believe this to be the case, as the program works perfectly when I run it as a "standard" application, it is only when I run this as a service that there is a problem. Also the Service Main function spawns a thread where all of the applications work is done. Which incidentally is ftp processing, if that helps at all.
|
|
|
|
|
Is it possible to pass a socket handle between apps?
|
|
|
|
|
Yes. HANDLE is a pointer to a pointer. Do you develop the applications or just one? The reason I ask is because you have to implement a solutino to send and receive the handles.
Kuphryn
|
|
|
|
|
I am developing both applications.. What functions should I look at for doing such a thing?
|
|
|
|
|
There are several solutions for data sharing among processes.
- Winsock
- File-Mapping
- Namepipe
I recommend file-mapping. Mapping the handle of your socket with a valid name. Search for that file-mapped on the other applications via its name.
Kuphryn
|
|
|
|
|
Suppose I have an unsigned integer variable. How can I read only bits 3 to 10 off of it?
Isaac Sasson,
Small time programmer - complainer at large!
Sonork ID 100.13704
|
|
|
|
|
do a binary and (&&) with a bitmask
i.e.
binary 0011111111000000 = 0x3FC0 (hex)
so
nResult = nNumber && 0x3FC0;
You can then use the shift operators << or >> to shift the bits if you want to strip of trailing zeros
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
BOOL IsBitOn (UINT uOriginal, UINT nBit)<br />
{<br />
uOriginal >>= nBit;
uOriginal &= 1;
return (uOriginal == 1);<br />
}
and for the concisists...
#define IsBitOn (x,n) ((x>>n)&1)<code><br />
<br />
Or if you just want to mask out the other bits,<br />
<br />
<code>uOriginal &= 0x03fc;
I hope that helped,
Iain.
|
|
|
|
|
i want to see what does the preprocesor generates how can i do that?, using vc++ 6.0
|
|
|
|