|
Hi, I wonder how does Cube and WindowFX and such applications work?
I'm interesting in developing a similar application but have no real clue as to where I should start looking for information.
Any and all information is more than welcome I have been researching this for some time but I seem to be stuck.
|
|
|
|
|
In my Application developed with VC6, I load the xml file and the xsl file from a string and put it in the memory, how can I represent the xml file formatted by the xsl file in a HtmlView ?
thanks for your replys!
-- modified at 4:42 Friday 14th April, 2006
|
|
|
|
|
|
appreciate for your help!
but i want to format in MFC programme, by the way, I load the xml file and xsl file from strings(not files), is there any other examples?
|
|
|
|
|
I know that:
LBN_SELCHANGE is sent when the selection state in a list box is about
to change.
I have a single-selection list box with 10 items. An item is selected
and the user clicks a different item. How do I know in the function
OnSelChange()
{ ... }
what item was selected and what item is currently selected. I know
that
m_listbox.GetCurSel();
tells me what current item is selected. How can I figure out what
item use to be selected before this new item was selected?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Simply maintain one variable and save the currently selected item
like this
{
static oldsel=0;
oldsel=lst.getcursel();
}
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
|
You could create a transparent window that covers the MSHTML window such that you can see through it, but it captures all the mouse and keyboard messages. Or you could subclass the MSHTML window and capture any mouse or keyboard messages that go to it.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan you're the man!!! Thanks so much... I like the transparent idea a lot... do you happen to know which dstyle that is off the top of your head ?
Thanks again!!!
|
|
|
|
|
Specify the WS_EX_TRANSPARENT window style, and implement message handlers for WM_ERASEBKGND and WM_PAINT that do nothing.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hey Ryan so I tried that... I am running into two problems:
1) The newly created window is there, but it doesn't take focus, even after I call setFocus(newWindowHdl);... this means that it won't hear any WM_ messages until I actually click the window to make it active.
2) It also overlaps the window below it, and I can't see the window below it until I actually drag the overlayed window somewhere....
ideas?
|
|
|
|
|
You don't need it to have the focus. I shoulda gave more info... sorry.
WS_EX_TRANSPARENT is an extended window style, so you'd pass it in as dwExStyle to the CreateWindowEx() function. Also, specify WS_EX_TOPMOST (also an extended window style) to place the window on top of any other windows. Make sure you don't have WS_BORDER or WS_OVERLAPPEDWINDOW set otherwise the border will overlap other windows. If you've done this and you make the window the full size of the DHTML window, then when you handle WM_PAINT and WM_ERASEBKGND as I mentioned before, your window will be completely transparent, but will capture all the mouse and keyboard messages that would have gone to the window.
By the way, in your WM_ERASEBKGND handler, make sure you return TRUE, and in your WM_PAINT handler, make sure you call BeginPaint() but don't actually do any painting.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan, that's very helpful! Now it works exactly how I want it to.... except
I have to click on the now invisible window once to get it to accept keyboarad input. Just to make things stranger, it accepts mouse input already great, but no keyboard input till I click.
Thus it seems WM_MOUSE events are caputred but WM_KEYDOWN never gets picked up until I click on the newly created invisible window.
Here's my call to the invisible window:
if ((hwnd = CreateWindowEx(WS_EX_TRANSPARENT | WS_EX_TOPMOST, "TransWindow", "An HTML string", WS_POPUP ,
200, 400, 50, 100,
hWnd, NULL, NULL, 0))){
ShowWindow(hwnd, SW_SHOWMAXIMIZED);
}
Also another random thing is that immediately upon launching it closes if I use WM_MOUSEMOVE, even if
I activate the program with <enter>. So, maybe there's a of setting the timer to not check mouse movement for the first couple ms?
Thaanks in advance! I'm almost there!
|
|
|
|
|
chasetoys wrote: have to click on the now invisible window once to get it to accept keyboarad input. Just to make things stranger, it accepts mouse input already great, but no keyboard input till I click.
You can call SetActiveWindow() to fix that.
chasetoys wrote: Also another random thing is that immediately upon launching it closes if I use WM_MOUSEMOVE, even if I activate the program with . So, maybe there's a of setting the timer to not check mouse movement for the first couple ms?
I'm not sure what you mean by this...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
If you're using MFC you can just use the PreTanslateMessage mechanism.
Steve
|
|
|
|
|
appreciate the response, but i can't use MFC
|
|
|
|
|
Hi, I'm converting from Watcom C/C++ 10.6 and I'm receiving the following errors when I try to do this:
<br />
#define LONG long<br />
#define EXPENTRY __declspec(dllexport) __stdcall<br />
...<br />
typedef LONG (EXPENTRY FNWP)(HWND, UINT, WPARAM, LPARAM);<br />
typedef FNWP *PFNWP;<br />
...<br />
PFNWP pfnHeading;<br />
The errors are:
<br />
x:\dev\MCP2003W\usrparms.h(70): error C2059: syntax error : 'type'<br />
x:\dev\MCP2003W\usrparms.h(71): error C2143: syntax error : missing '{' before '*'<br />
x:\dev\MCP2003W\usrparms.h(236): error C2061: syntax error : identifier 'PFNWP'<br />
I don't see what I did wrong and it compiles perfectly under Watcom. How do I do this in Visual C/C++?
Thank you,
Glenn
-- modified at 20:51 Wednesday 12th April, 2006
|
|
|
|
|
gmhanna wrote: typedef LONG (EXPENTRY FNWP)(HWND, UINT, WPARAM, LPARAM);
Is that legal C++? I thought you could only have pointers to functions, since functions aren't object in C++. I'd go with:
typedef LONG (EXPENTRY* PFNWP)(HWND, UINT, WPARAM, LPARAM);
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I believe that is legal in C++.
Steve
|
|
|
|
|
I'm not sure how the Visual C/C++ Compiler works but in the Watcom Compiler it must recgonize the difference between C and C++, as it didn't complain. This stuff is all written in C as I don't know C++, although it probably wouldn't be difficult to learn since I know C#.
Glenn
|
|
|
|
|
Hi Mike,
I tried what you suggested and I still get an error on that line:
<br />
x:\dev\MCP2003W\usrparms.h(70): error C2059: syntax error : 'type'<br />
Why does it say 'type' the only thing I have on that line is typedef?
Thank you,
Glenn
|
|
|
|
|
1. Are they included in compiled files (.obj, .dll,...)
2. What about unused friend functions?
-- modified at 7:41 Thursday 13th April, 2006
Anybody?
Look I know that different compilers optimize code differently, but I would like to know :
A) What does the standard say?
B) What code MSVC 7.1 produces?
|
|
|
|
|
Hi,
I am using the Visual Studio 6. I had the path for a folder with header files included in the Tools->options->Directories. Now I want to remove it from the global setup and put it under the project settings section. So I put the path of that directory under the project->settings - c/c++ - preprocessor section.
but when i build the project, it still gives me the link error:
fatal error RC1015: cannot open include file '*****.h'.
I have checked and double checked and checked the path again and again. can't seem to find anything. There are no spaces in the path.
Thanks,
Ankita
|
|
|
|
|
|
Thank you Michael. I added the derectory in the resource page too. Simply building the exe didn't work, so i am rebuilding the whole project again. It's a big project, so takes some time to compile. I hope it works, or I am doing something else also wrong.
Ankita
|
|
|
|