Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

hxhl95

@hxhl95
About
Posts
142
Topics
36
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • .htaccess removing index.php from URLs
    H hxhl95

    Yeah, that. I've tried DirectoryIndex already.

    Web Development help php apache database com

  • .htaccess removing index.php from URLs
    H hxhl95

    Hiya everyone, I've been getting quite a headache over this issue. Basically I just want to remove index.php from URLs, e.g. the URL http://mydomain.com/index.php should be changed to http://mydomain.com/ and http://mydomain.com/folder/index.php should be http://mydomain.com/folder/. However, I also want to preserve any parameters passed to the page, e.g. http://mydomain.com/index.php?id=22&c=1 should be changed to http://mydomain.com/?id=22&c=1 and http://mydomain.com/folder/index.php?id=22&c=1 should be http://mydomain.com/folder/?id=22&c=1. I've tried RewriteRule ^(.*)$ /index.php?/$1 [NC] but that just gives me an HTTP 500. Also tried RewriteRule ^index.php - [NC] but that apparently does nothing. Help? :(( Thanks.

    Web Development help php apache database com

  • CSS Image Sprites in IE7
    H hxhl95

    Thanks! I can't believe I forgot to try that. It's working fine now.

    Web Development javascript css help question

  • CSS Image Sprites in IE7
    H hxhl95

    Hi everyone, I've got a few icons I'm using sprites for, however they seem to work in every single browser except IE7. My code's very simple:

    <div style="display:inline;margin:0 10px">
    <a href="javascript:window.print()" title="Print">
    Print PageĀ <div class="useicon" style="background-position:0px 0px"></div>
    </a>
    </div>

    My useicon class:

    div.useicon {
    display:inline;
    height:16px;
    width:16px;
    background:url('../img/icons.gif') no-repeat 0px 0px;
    padding:0 8px
    }

    Now the problem apparently is the display:inline part of that - the sprites just don't show up as long as that div is inline (if I remove display:inline the sprites show up but the thing is I want everything on the same line). Already tried using span instead of div, unfortunately it appears that as long as the object is inline the sprites won't show up. Any suggestions? The padding: 0 8px is there to keep the width at 16px, because some browsers completely collapse the div because it's empty even though I've specified width:16px. Thanks in advance :)

    Web Development javascript css help question

  • GDI+ JPEG to binary
    H hxhl95

    Thanks, it's working great. Do you have any suggestions on what I can do on the receiving end? I don't want to create a file and I don't want to allocate an entire buffer for the image either. Is there any way I can receive in chunks and still be able to display the whole thing at the end? Sometimes the image gets quite large (>10mb) and I don't want excessive memory usage. edit: nevermind. it's working now. thanks for all your help!

    modified on Sunday, May 23, 2010 12:28 PM

    C / C++ / MFC graphics winforms data-structures

  • GDI+ JPEG to binary
    H hxhl95

    Okay, I've made a little progress:

    Gdiplus::Bitmap bitmap(membit, NULL);
    CLSID clsid;
    GetEncoderClsid(L"image/jpeg", &clsid);
    IStream* tmpbuf = NULL;
    CreateStreamOnHGlobal(NULL, true, &tmpbuf);
    bitmap.Save(tmpbuf, &clsid);
    tmpbuf->Release();

    How do I change the IStream* into a byte* (and how do I determine the size beforehand)?

    C / C++ / MFC graphics winforms data-structures

  • GDI+ JPEG to binary
    H hxhl95

    Hi all, What I am trying to do is transfer a screenshot over a socket. I can get the screenshot into a Bitmap type, and I can even save it as a JPEG file by getting the CLSID of the encoder. However, I want to do this without an intermediatary file - that is, I want to be able to turn the Bitmap into a JPEG binary array and send it directly over the socket. I'm currently stumped at the turning the Bitmap image into a binary JPEG part - any suggestions would be nice. Or, if there is an easier way to do this that I'm missing, please assist. Been googling for a while now to no avail. Thanks :)

    C / C++ / MFC graphics winforms data-structures

  • mciSendString from inside a DLL?
    H hxhl95

    So why does it work from an EXE but not a DLL? And what should I do to fix it? :confused:

    C / C++ / MFC data-structures testing beta-testing question

  • mciSendString from inside a DLL?
    H hxhl95

    Not quite sure where I should ask this...I mean, this site really needs a Windows programming section, doesn't it? Anyways, here goes. I have this DLL trying to call mciSendString (command passed as a parameter). The call works fine in an EXE, but it refuses to do anything on a DLL (I'm testing with "set cdaudio door open"). The function gets called but it hangs. Forever. Stack, if it helps:

    ntkrnlpa.exe!ExAllocatePoolWithTag+0x8ab
    ntkrnlpa.exe!MmIsDriverVerifying+0xa08
    ntkrnlpa.exe!MmIsDriverVerifying+0x12ea
    ntkrnlpa.exe!PoShutdownBugCheck+0x32ce
    ntkrnlpa.exe!KeSynchronizeExecution+0x10c
    ntdll.dll!KiFastSystemCallRet
    !WaitForSingleObject+0x12
    !waveOutWrite+0x50c
    !mci32Message+0x526
    !mciSendCommandW+0x10b
    !mciSendCommandW+0x48e
    !mciSendStringW+0x31
    !mciSendStringA+0x87

    Thanks! :)

    C / C++ / MFC data-structures testing beta-testing question

  • Forcing overflowing floats onto one line
    H hxhl95

    Hiya everyone, I have a dynamically generated (using the innerHTML property) set of list items that're floated into a 4-column list like follows:

    <ul>
    <li style="width:40%">text</li>
    <li style="width: 20%">text</li>
    <li style="width: 30%">text</li>
    <li style="width: 10%">text</li>
    </ul>

    The container that this list is in has to be able to dynamically resize. I've added overflow:auto to add scrollbars when the content in the box overflows. BUT, when the container is resized small enough, instead of having a horizontal scrollbar (the vertical one works fine) the rightmost <li> gets pushed down to the next line instead of staying on one line with the other 3 <li>s and overflowing off the side of the window, making a scrollbar appear. I've already tried white-space:nowrap in half a dozen places. Refuses to work. I can't use a table either, as dynamically writing a table causes a runtime error in IE and I want this code to be as compatible as possible. Any help would be greatly appreciated (note the extreme emphasis on greatly)

    Web Development help docker

  • CWinApp <-> DLL communication
    H hxhl95

    Oh, I should've said this in my first post - I'm injecting this dll into selected processes, so the event that has to trigger a dialog box in my app could or could not happen and I don't know when it will happen. Hope that helps? :)

    C / C++ / MFC help c++ tutorial

  • CWinApp <-> DLL communication
    H hxhl95

    I'm using LoadLibrary/GetProcAddress in the InitInstance of my class.

    C / C++ / MFC help c++ tutorial

  • CWinApp <-> DLL communication
    H hxhl95

    Hi there everyone, So I have my DLL that needs to communicate with my app. What I want to do is have the dll send my CWinApp derived class a message, and then the CWinApp should call DoModal with the dialog. Problem is, I've never messed with the app part of mfc, only the dialog class, so I have no clue how to set up the handler for the message. As well, since there is no hWnd yet, I need to use PostThreadMessage instead of the normal SendMessage, but in my DLL I need to get the return value and then continue processing (like there would be with SendMessage/DefWindowProc). Any help on how to do so would be nice. ^^ :)

    C / C++ / MFC help c++ tutorial

  • Applicatio crash
    H hxhl95

    Looks awfully like a remote keylogger. :~

    C / C++ / MFC help debugging

  • "Virtual" Command Prompt
    H hxhl95

    Okay, that doesn't work either because the only ways I can actually call the command is ShellExecute or system() - they both cannot change the current directory. I'm going to try ShellExecute instead now, I think that might work. Thanks again for your help.

    C / C++ / MFC help question

  • "Virtual" Command Prompt
    H hxhl95

    No, I haven't because I don't see how would I receive the output of any command with that method. I don't see how I can input stuff into it either...:confused: EDIT: aha, I see now. Going to try it right now. Thanks! :)

    modified on Saturday, March 13, 2010 6:40 PM

    C / C++ / MFC help question

  • "Virtual" Command Prompt
    H hxhl95

    Oh, and I can't distinguish between a successful command and an unsuccessful one (whether that command even exists or not).

    C / C++ / MFC help question

  • Detecting Hooks [modified]
    H hxhl95

    Yes, I've been exploring that and I think I can continue from here. Thanks a lot for your help Baltoro! :-D

    C / C++ / MFC data-structures help question

  • "Virtual" Command Prompt
    H hxhl95

    Hi All, I am trying to add a cmd functionality into my app, however it's not working very well and I am looking for alternate methods. What I'm going right now is taking an input command and using CreateProcess with cmd /C *command* > outputFile, then reading the file and displaying the output. However, the problem with this approach is that if I want to start an app, lets say Notepad, I would not be able to do anything else until Notepad closes. As well, the cd command is rendered useless, as when cmd exits and I call another command, the new cmd created by CreateProcess is still at the same directory. Does anyone have any suggestions for a different approach - perhaps somehow piping the input/output from the cmd window directly to my app? Thanks very much. :)

    C / C++ / MFC help question

  • Detecting Hooks [modified]
    H hxhl95

    "Also, if the application uses LoadLibrary and GetProcAddress to find the addresses of functions, your IAT hook will not work." Does that mean if I compare the addresses of HookedFunction() and LoadLibrary(HookedFunction) I would be able to detect IAT hooks in my process? If so, any suggestions on how I might generalize this to every running process?

    C / C++ / MFC data-structures help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups