|
What's all this code for? Are you expecting someone to wade through it all?
Joe Friday: "Just the facts, ma'am."
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Alright, I wrote a wrapper class for expat (the XML parser). I wrote it in a console application project, it compiles fine, and still does. But then I had to demo the technology that uses the wrapper class, and for that I went with an MFC application. But when I try to compile in my wrapper class, the expat .c files give me hundreds of errors. here's a chunk of it to look at:
c:\program files\microsoft visual studio\myprojects\testrunfortestbed\xmltok_impl.c(91) : error C2143: syntax error : missing ')' before '*'
c:\program files\microsoft visual studio\myprojects\testrunfortestbed\xmltok_impl.c(91) : error C2143: syntax error : missing '{' before '*'
c:\program files\microsoft visual studio\myprojects\testrunfortestbed\xmltok_impl.c(91) : error C2059: syntax error : 'type'
c:\program files\microsoft visual studio\myprojects\testrunfortestbed\xmltok_impl.c(92) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio\myprojects\testrunfortestbed\xmltok_impl.c(129) : error C2143: syntax error : missing ')' before '*'
And here's some code so you can have a little context for the errors:
static<br />
int PREFIX(scanComment)(const ENCODING *enc, const char *ptr, const char *end,<br />
const char **nextTokPtr)<br />
{<br />
if (ptr != end) {<br />
if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {<br />
*nextTokPtr = ptr;<br />
return XML_TOK_INVALID;<br />
}<br />
ptr += MINBPC(enc);<br />
while (ptr != end) {<br />
switch (BYTE_TYPE(enc, ptr)) {<br />
INVALID_CASES(ptr, nextTokPtr)<br />
case BT_MINUS:<br />
if ((ptr += MINBPC(enc)) == end)<br />
return XML_TOK_PARTIAL;<br />
if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {<br />
if ((ptr += MINBPC(enc)) == end)<br />
return XML_TOK_PARTIAL;<br />
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {<br />
*nextTokPtr = ptr;<br />
return XML_TOK_INVALID;<br />
}<br />
*nextTokPtr = ptr + MINBPC(enc);<br />
return XML_TOK_COMMENT;<br />
}<br />
break;<br />
default:<br />
ptr += MINBPC(enc);<br />
break;<br />
}<br />
}<br />
}<br />
return XML_TOK_PARTIAL;<br />
}
I'm pretty stumped. Anybody know what the problem is?
|
|
|
|
|
the_augy wrote: ENCODING
Are you including the header file where this is defined ?
~RaGE();
|
|
|
|
|
Well, here's the thing. I creating my classes in a project that was just a console application, then I made the MFC project for the demo. I moved all the files from the console application project into the MFC project folder, and when I tried compiling it didn't work, i got the errors listed. All the same stuff is included. I'm guessing there's a project setting somewhere that gets set one way for console and another way for MFC projects, and I need to switch it.
|
|
|
|
|
But the compiler is complaining about ENCODING . Where is it defined?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I need to implement Drag and Drop of files between my namespace extension and windows folders. In cases where a file is dragged from my namespace extension and dropped on a windows folder, can someone tell me how I can find out which windows folder the file was dropped on?
Thanks and Regards,
Anil
|
|
|
|
|
Does anyone know how to create a tooltip popup when we point a mouse over a "text" for a period of time. This is normally seen in visual studio. When we point the mouse on a function name or so for a period of time, it will show its declaration in a small tooltip popup window. How can we customize this to show some tooltip information, upon pointing to some of the words for which we want some info. I want to create this as plugin/add-in in
Visual Studio .NET so that on pointing to certain words I can get some information about those words.Coding in either VC++/C#(preferrably VC++). I need some help for this urgently...can anyone help me out???
AKG
|
|
|
|
|
Why don't you try the same using the key strokes, like Ctrl+Shift+Space or something.
One thing i can you can try is, to load all the Words and corresponding toot tips,(when u load the file) and then over write MFC's tool tips. but Iam not exactly sure of wat function is to be over written. May be you can try on TVN_GETINFOTIP..
thnx,
KAB
|
|
|
|
|
I am using 2 images, one at a time. Is there a way to hide the other image while the other one is visible?
Thanks for all the help!
waxiegurl
|
|
|
|
|
|
Are the images part of a static or picture control? If so, just use ShowWindow(SW_HIDE) .
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
This does not work. I've already tried this one.
waxie
|
|
|
|
|
hi folks,
ok, i hope i can describe this in a way that will be understandable
so here's what i plan to do: i want to display a splash screen with an alpha channel. neither the bitmaps rectangle nor the surrounding color of my graphic should visible. i.e. i need to set the surrounding color to be drawn 100% transparent. not difficult so far. but here's the tough part. namely, i want the splash screen to appear like it comes from nowhere. it should start with a opacity of 0% (i.e. 100% transparence) and within a few seconds it should become more and more visible until it has a final opacity of 100%. confused ? me too
i'm only able to display the graphic without the surrounding stuff (alpha value) when the graphics opacity is set to 100%. but when it comes to the piont where i need to set the opacity to a lower value and still want to make the surrounding color of my graphic completely invisible i'm starting to freak out. i don't know how to achieve this.
i would be very glad about some hints ... any hints
thanks in advance.
|
|
|
|
|
Some ideas:
1: Do a screen grab of the area your splash screen will cover. In memory use the grabbed bitmap as the background, draw your splash screen on it. Blit that bitmap to the screen. Not true transparency, but it will appear that way to the user.
2: Use a window region (HRGN) that corresponds to the opaque part of your splash screen.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
nice idea, actually. and i've already tried it. there is just one problem. the graphic i want to show is not rectangular (neither elliptic) it's a custom hand drawn one. so if i draw my splash on the background image and make it slightly transparent the whole graphic (including the surrounding alpha color) will be visible on it. you understand ? but the alpha color should be complete invisible during the entire appearance procedure.
|
|
|
|
|
Use an intermediate step. Use two memory bitmaps containing the background image. On one draw your splash screen with TransparentBlt() (Image is 100% opaque, alpha colour 100% transparent), then draw that image at the transparency you want onto the second bitmap. Because the "transparent" parts are the same colour the alpha blending will appear transparent.
As for the window region idea, you should be able to adapt the code found at http://www.codeproject.com/buttonctrl/irregular_buttons.asp[^] to create the reguired window region for your splash screen.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
yeah. i use it already.
AlphaBlend and SetLayeredWindowAttributes are the two main functions with those i'm trying to get this done. But they don't last out.
|
|
|
|
|
|
selecting rectangular bitmaps and AlphaBlending them is not my problem. i need to get it done with non-rectangular bitmaps.
|
|
|
|
|
|
|
yesss that's it! thanks a lot!!
... AnimateWindow was completely new to me
|
|
|
|
|
I have a button in my dialog. When I disable it using m_button.EnableWindow(FALSE) while other control has the focus, other control loses the focus it seems the disabled button gets the focus because after pressing arrow key the control next to button gets focus.
Is this by desing or some bug ? How to avoid this ? SetFocus() to previous control does not work
Thanks !
rrrado
|
|
|
|
|