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
R

Redeemer dk

@Redeemer dk
About
Posts
48
Topics
31
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do i draw 4:2:0 YUV data on the screen?
    R Redeemer dk

    thanks

    C / C++ / MFC question

  • How do i create a random number?
    R Redeemer dk

    Is there a function for retreiving a random integer lying in the range from one integer to another? I'm using Win32... THanks in advance.

    C / C++ / MFC question lounge

  • What is wrong with this way of displaying a bitmap on a window?
    R Redeemer dk

    I'm trying to display a bitmap on my window. Here's my code:

    BITMAPINFO biBitmap = {0};
    BITMAPINFOHEADER bihBitmap = {0};

    bihBitmap.biSize = sizeof(BITMAPINFOHEADER);
    bihBitmap.biWidth = 16;
    bihBitmap.biHeight = 16;
    bihBitmap.biPlanes = 1;
    bihBitmap.biBitCount = 24;
    bihBitmap.biCompression = BI_RGB;
    bihBitmap.biSizeImage = 0;
    bihBitmap.biClrUsed = 0;
    bihBitmap.biClrImportant = 0;

    biBitmap.bmiHeader = bihBitmap;

    PAINTSTRUCT ps;
    HDC hdc = BeginPaint(ghWnd, &ps);
    HDC hdcMem = CreateCompatibleDC(NULL);

    HBITMAP hbm = CreateDIBitmap(hdcMem, &bihBitmap, CBM_INIT, finalrgb, &biBitmap, NULL);
    HBITMAP hbmT = (HBITMAP)SelectObject(hdcMem, (HBITMAP)hbm);

    BitBlt(hdc,60,60,16,16,hdcMem,0,0,SRCCOPY);

    SelectBitmap(hdcMem,hbmT);
    DeleteDC(hdcMem);

    EndPaint(ghWnd,&ps);

    finalrgb is a pointer to an array of unsigned chars containing RGB values for a 16 by 16 pixels picture. What am i doing wrong? Thankyou!

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

  • Is it possible to make Visual Studio break whenever a given variable gets a specific value?
    R Redeemer dk

    Hey all. Just wanted to ask if it is possible to make Visual Studio break whenever a given variable gets a specific value? Thanks in advance. -Rune Svendsen

    C / C++ / MFC csharp visual-studio question

  • What function should i use for displaying movies on a screen?
    R Redeemer dk

    It's an MPEG2 file, but i'm decoding the file myself.

    C / C++ / MFC graphics question

  • What function should i use for displaying movies on a screen?
    R Redeemer dk

    I'm currently developing a program for displaying movie contents on a screen. This means that i could have to change the contents of the graphics up to 60 times per second. Which functions are best suited for this? Thanks in advance. -Rune SVendsen

    C / C++ / MFC graphics question

  • How to resume the file download
    R Redeemer dk

    To resume a download you need to use the REST command: REST The REST command will make the server start at a give byte offsett and not at the start of the file. When you send that command the server will reply with either a negative response, or the code 350, which means it will start at the byte offsett you've specified. NOTE: The REST command must be followed by a service command (RETR or STOR). -Rune SVendsen

    C / C++ / MFC question sysadmin algorithms help tutorial

  • Which API's do i need to get the hWnd of the control under the cursor?
    R Redeemer dk

    I'm making a program where i need the hWnd of the control that is currently under the cursor, but i'm in doubt of which API's i should use. I've tried checking around but i can't seem to find the answer. Thanks in advance

    C / C++ / MFC json question

  • Error no. 87 when trying to read from a drive...
    R Redeemer dk

    I'm trying to open a drive, by specifying the lpFileName argument to be of the format "\\.\:" in CreateFile. But when i use ReadFile to read from the disk, i get an error, number 87 which means invalid parameter, anyone know what's wrong?

    char test\[32\];
    HANDLE hDrive = CreateFile("\\\\\\\\.\\\\H:", GENERIC\_READ, FILE\_SHARE\_WRITE /\* | FILE\_SHARE\_READ\*/ , NULL, OPEN\_EXISTING, FILE\_ATTRIBUTE\_NORMAL, NULL);
    DWORD dwBytesRead;
    
    ReadFile(hDrive, &test, 32, &dwBytesRead, NULL);
    
    CloseHandle(hDrive);
    

    Thanks all! -Rune SVendsen

    C / C++ / MFC help question

  • FTP without Wininet
    R Redeemer dk

    I used this: cliky here

    C / C++ / MFC tutorial question

  • Ring upp ???
    R Redeemer dk

    So you want a program you can use as a phone that can dial up a normal phone, so you can talk with them for free?

    C / C++ / MFC question

  • Ring upp ???
    R Redeemer dk

    You mean your program has to dial up to itself via a phone line or what?

    C / C++ / MFC question

  • How do i automatically scroll to the bottom of a edit control when text gets added?
    R Redeemer dk

    I have an edit control working as a log, but when new text gets added to the control that makes the scrollbar active, it scrolls to the top so you can't see what has happened. Is it possible to set it to scroll to the bottom automatically, or is there a message you can send so it does it? I'm programming Win32 BTW. Thanks all.

    C / C++ / MFC question

  • Is there a way to translate your C++ code to assembly code in VS?
    R Redeemer dk

    then i get an exe - machine code. not assembly code...

    C / C++ / MFC c++ visual-studio question

  • Is there a way to translate your C++ code to assembly code in VS?
    R Redeemer dk

    thanks :)

    C / C++ / MFC c++ visual-studio question

  • Is there a function in C++ that will split a char array delimited by a specific character?
    R Redeemer dk

    If i for example have this string: "192,168,135,97,51,156" is it possible to split that into 6 integers containing the values delimited by the comma? thanks all :)

    C / C++ / MFC c++ data-structures tutorial question

  • Is there something wrong with my DirectX SDK?
    R Redeemer dk

    When i try to use the RenderFile function on an IGraphBuilder i get a ton of errors. I've also tried downloading a sample file that is guaranteed to work, but i still get the errors. Here's the code from the sample:

    #include <windows.h>
    #include <objbase.h>
    #include <dShow.h>

    int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    {
    HRESULT hr;
    IGraphBuilder* pGraphBuilder;
    IMediaControl* pMediaControl;
    WCHAR MediaFile[MAX_PATH];

    CoInitialize(NULL);
    
    hr = CoCreateInstance(CLSID\_FilterGraph, NULL, CLSCTX\_ALL, IID\_IGraphBuilder, (void\*\*)&pGraphBuilder);
    if (FAILED(hr))
    	return -1;
    
    MultiByteToWideChar(CP\_ACP, 0, lpCmdLine, -1, MediaFile, MAX\_PATH);
    hr = pGraphBuilder->RenderFile(MediaFile, NULL);
    if (FAILED(hr))
    	return -2;
    
    hr = pGraphBuilder->QueryInterface(IID\_IMediaControl, (void\*\*)&pMediaControl);
    if (FAILED(hr))
    	return -3;
    
    hr = pMediaControl->Run();
    if (FAILED(hr))
    	return -4;
    
    Sleep(10000);
    
    pMediaControl->Stop();
    pMediaControl->Release();
    pGraphBuilder->Release();
    
    CoUninitialize();
    
    return 0;
    

    }

    I set up VS .NET so the commandline contains a valid media file. When it performs the RenderFile function it loads in a sec or so and comes with a bunch of erros like these:

    ASSERT failed.
    g_cFGObjects == 0
    At line 6002 d:\xpclient\multimedia\dshow\filters\core\filgraph\filgraph\filgraph.cpp
    Continue? (Cancel to debug)

    ASSERT failed.
    Executable: DShowTut1.exe Pid 720 Tid 2cc. Module quartz.dll, 26 objects left active!
    At line 317 of d:\xpclient\multimedia\published\dxmdev\dshowdev\base\dllentry.cpp
    Continue? (Cancel to debug)

    sometimes it also pops up with additional erros like:

    m_dwRecursionCount == 0 && m_dwOwnerThreadId == 0
    At line 58 of d:\xpclient\multimedia\dshow\filters\core\filgraph\filgraph\msgmutex.cpp
    Continue? (Cancel to Debug)

    And then exits. Anyone know what could be wrong? Thanks all! -Rune Svendsen

    C / C++ / MFC csharp c++ asp-net visual-studio graphics

  • Is it possible to enumrate all the system's DirectShow filters?
    R Redeemer dk

    Thankyou. Do you know how i add a filter to IFilterGraph if i only know the name of the filter? -Rune Svendsen

    C / C++ / MFC help question announcement

  • Window being minimized
    R Redeemer dk

    Take a look at the WM_SYSCOMMAND message. If the wParam parameter is SC_MINIMIZE, then the window is about to be minimized.

    C / C++ / MFC tutorial question

  • Is it possible to enumrate all the system's DirectShow filters?
    R Redeemer dk

    I've tried the code on MSDN but that doesen't give me any filters. I was told it may be because i hadn't performed a RenderFile action on the IGraphBuilder. But isn't there another way of just enumerating all the available filters on the system? Here's my code, when it comes to the pEnum->Next procedure for the first time, it returns S_FALSE which means that the number of filters requested couldn't be found.

    IGraphBuilder *pGraph = NULL;
    IEnumFilters *pEnum = NULL;
    IBaseFilter *pFilter = NULL;
    ULONG cFetched;

    CoInitialize(NULL);
    CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder,(void**)&pGraph);
    pGraph->EnumFilters(&pEnum);

    while((err = pEnum->Next(1, &pFilter, &cFetched)) == S_OK)
    {
    FILTER_INFO fiFilterInfo;
    char szFilterName[256];

    pFilter->QueryFilterInfo(&fiFilterInfo);
    WideCharToMultiByte(CP\_ACP, 0, fiFilterInfo.achName, -1, szFilterName, 256, 0, 0);
    SendMessage(GetDlgItem(ghWnd, IDC\_FILTERS), LB\_INSERTSTRING, -1, (LPARAM)szFilterName);
    
    fiFilterInfo.pGraph->Release();
    pFilter->Release();
    

    }

    pEnum->Release();
    pGraph->Release();
    CoUninitialize();

    So i'm asking if there's a way to enumerate all the available filters on the system. All help appreciated :) -Rune Svendsen

    C / C++ / MFC help question announcement
  • Login

  • Don't have an account? Register

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