MagiXSphere

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

122 Neutral

About MagiXSphere

  • Rank
    Member
  1. Yeah, I could do that, but it should work using the parser. And essentially it should be the parser’s task not mine. Standalone xml files are more common than schema ones and ignoring white-space makes more sense in a standalone file. I really want to know why it won’t work.
  2. I'm trying to parse xml files for a application im building using xerces xml library. I'm having trouble getting it to ignore whitespace characters in text nodes. I've set the includeIgnorableWhitespace property to false and it works when parsing a xml file with a schema but not on standalone xml files (no dtd or schema). Heres the code I use to parse the xml files //Error handling not included XMLPlatformUtils::Initialize(); XercesDOMParser* parser = new XercesDOMParser(); ErrorHandler* errHandler = (ErrorHandler*) new HandlerBase(); parser->setErrorHandler(errHandler); parser->setDoNamespaces(true); parser->setDoSchema(true); parser->setValidationScheme(XercesDOMParser::Val_Always); parser->setIncludeIgnorableWhitespace(false); parser->parse("test.xml"); As I mentioned the code works on xml files with schemas and removes leading/trailing whitespace characters and also ignores text nodes that only consist of whitespace characters when building the xml tree, but I can't get it to do the same thing with standalone xml files. Any help?
  3. Icon button

    I'm trying to create a button control with a transparent icon overlay in a c++ application that is using the xp visual style. However, when I set the icon parameter of the button control using the BM_SETIMAGE message the button is rendered as a flat windows 98 style button. What's the easiest way of creating a xp style button with a transparent icon overlay? I've been trying to use NM_CUSTOMDRAW to paint the icon onto the button but it wont send the CDDS_POSTPAINT draw state message. Here's the code that I'm using: case WM_NOTIFY: { LPNMHDR pNMHDR = (LPNMHDR)lParam; switch(pNMHDR->code) { case NM_CUSTOMDRAW: LPNMCUSTOMDRAW pNMCustomDraw = (LPNMCUSTOMDRAW)lParam; switch(pNMCustomDraw->dwDrawStage) { case CDDS_PREPAINT: return CDRF_NOTIFYPOSTPAINT; case CDDS_POSTPAINT: //Paint icon } } break; } Does anyone know a solution to this/what's causing it?