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
W

Ward 0

@Ward 0
About
Posts
29
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to get computer IP that connect to my Pocket-PC ?
    W Ward 0

    Are you using Active Sync to connect your PC to your mobile device?

    Ward

    Mobile csharp tutorial question

  • Use .Net library in C++
    W Ward 0

    I've searched some documentation and I was able to do it. The trick is to register the .Net dll as a COM server. But to be able to register it as a COM server you must first have a tlb file of it. This tlb file you can create with the visual studio tool tlbexp.exe. From the command prompt: tlbexp dotNET.dll /win32 /out:dotNET.tlb Once you have the tlb file you can use regasm to register the .Net dll as a COM server. You will not be able to run regasm from the windows command prompt. You must launch the visual studio command prompt to do this. In the visual studio command prompt type: regasm dotNET.dll /tlb:dotNET.tlb From this point you can use the classes and functions of the .Net dll is whatever language that understands COM. Kind regards,

    Ward

    C# question csharp c++

  • Use .Net library in C++
    W Ward 0

    How can I use a .NET dll in a C++ application?

    Ward

    C# question csharp c++

  • Play simple Avi file in WIN32 API C++
    W Ward 0

    The AVI functions that you brought up where all created with the purpose of editing the AVI file. The application I was looking for was to play an AVI file. I've searched before in all the information that Sarath gave my a link to and I've also looked at the example that you've (DavidCrow) linked me too. But the functions and the example did not provided a simple solution. The purpose for me was to have a simple solution to play an avi, not the implement a complete engine using the AVI-functions. I'm sure that I would be able to accomplish that, but it had to be implemented in a very short period of time. I understand your remarks, and I hope you understand mine as well. kind regards, Ward

    C / C++ / MFC csharp c++ graphics game-dev json

  • Play simple Avi file in WIN32 API C++
    W Ward 0

    Final solution. I'm sorry to say that all you were able to reply on this topic was simply a result of some high level searching the internet. None of them showed me a nice clean piece of code that actually did it. Finally I found it on my own using a common control of ICC_ANIMATE_CLASS. This window class is able to to it by using simple functions like Animate_Open and Animate_Play. For those who are really interested, I can post a nice clean example of it. Just ask for it and I'll post here here. kind regards, Ward -- modified at 8:55 Friday 30th June, 2006

    C / C++ / MFC csharp c++ graphics game-dev json

  • Play simple Avi file in WIN32 API C++
    W Ward 0

    OK, can you show example code where you can load and show an avi on a HWND, not containing any controls? Ward

    C / C++ / MFC csharp c++ graphics game-dev json

  • Play simple Avi file in WIN32 API C++
    W Ward 0

    Yes, those functions I already found, but there is no example (or at least I can't see one) that shows the use of these functions to open an avi-file and display it on a window. I've explored the MCI api (a little higher in the treeview of the link you gave me), but this is also not exactly what I need. MCIWnd gives me a complete window (including a bucn of controls), but that I don't need that. Ward

    C / C++ / MFC csharp c++ graphics game-dev json

  • Play simple Avi file in WIN32 API C++
    W Ward 0

    Hi, What API can I use to play a simple avi-file on the window (HWND)? Please not using DirectX (DirectShow). thanks in advance, Ward Ward

    C / C++ / MFC csharp c++ graphics game-dev json

  • listview: click on columnheader
    W Ward 0

    Ok, I found it: if(e.Column == 0) { //... } else if(e.Column == 1) { //... } Ward

    C# question csharp

  • listview: click on columnheader
    W Ward 0

    Yes, I was that far. But how can I detect if it was column[0] or column[1] that has been clicked on? Ward

    C# question csharp

  • listview: click on columnheader
    W Ward 0

    I have a listview-control in detail mode with two columns. The columnheaders are clickable, but how can I detect which columnheader was clicked. And which event should I check? thanks, Ward

    C# question csharp

  • Color of scrollbar of a listbox
    W Ward 0

    Does anyone know how to set the color of the scrollbar of a listbox. I'm using win32. I've already tried several WM_CTLCOLOR... messages, but this did not work. Changing the colors of buttons and other controls works fine. Ward

    C / C++ / MFC csharp tutorial

  • Customizing a toolbar
    W Ward 0

    I've used the following code to create the toolbar window: hToolbar = CreateWindowEx(0,TOOLBARCLASSNAME,"MyToolbar",CCS_ADJUSTABLE|WS_CHILD|WS_VISIBLE|TBS_TOOLTIPS,0,0,0,0,hWnd/*this is a dialog*/,0,g_hInstance,NULL); SendMessage(hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); SendMessage(hToolbar,TB_SETBITMAPSIZE, 0,(LPARAM)MAKELONG(32,32)); SendMessage(hToolbar, TB_AUTOSIZE,0,0); I've added some bitmaps to the toolbar using several calls of SendMessage(hToolbar,TB_ADDBITMAP,1,(LPARAM)&bit); with bit of type TBADDBITMAP Finally added all my buttons to the toolbar using SendMessage(hToolbar, TB_ADDBUTTONS, NUMBEROFTOOLBARBUTTONS, (LPARAM)&tbb); I've added 5 buttons to the toolbar. The toolbar is perfectly visible and I've even managed to show a toolbar for each button by returning the appropriate data in the TTN_GETDISPINFO notification message. Now when I send the TB_CUSTOMIZE to the toolbar, I receive following notifications: TBN_BEGINADJUST: I simply return TRUE here Then 7(?!: I have only five buttons) TBN_QUERYINSERT notification I've printed the iItem value of the structure NMTOOLBAR for each notification: iItem = 5 iItem = 5 (why is this one send twice) iItem = 4 iItem = 3 iItem = 2 iItem = 1 iItem = 0 I return TRUE for each TBN_QUERYINSERT. And finally I get the notification TBN_ENDADJUST. Now where did the notifications TBN_QUERYDELETE and above all TBN_GETBUTTONINFO gone too?? I hope someone can help me out here, kind regards, Ward

    C / C++ / MFC csharp help question

  • Customize a toolbar in win32
    W Ward 0

    Ok, I will give it an in depth look Ward

    C / C++ / MFC csharp c++ tutorial question

  • Customize a toolbar in win32
    W Ward 0

    This I already found by myself. But thanks anyway for doing the trouble to do the search. Ward

    C / C++ / MFC csharp c++ tutorial question

  • Customize a toolbar in win32
    W Ward 0

    TB_CUSTOMIZE is to be send to the toolbar itself. The toolbar then sends notifications to the sender of TB_CUSTOMIZE. When you properly return data on these notifications, a customize dialog pops up. But this last part is the trickiest. Ward

    C / C++ / MFC csharp c++ tutorial question

  • Customize a toolbar in win32
    W Ward 0

    This was what I already found myself on the msdn site. But it is not a very complete example, is it? It is somewhat the only example I was able to find on the Internet. But thanks anyway, Ward

    C / C++ / MFC csharp c++ tutorial question

  • Customize a toolbar in win32
    W Ward 0

    Anyone familiar with the TB_CUSTOMIZE message? I'm looking for an example in Win32 C++ code. Thanks in advance, Ward

    C / C++ / MFC csharp c++ tutorial question

  • Using a mask for drawing non rectangular bitmaps
    W Ward 0

    Well, at first I've tried DrawIcon, but when I wanted to use the bitmap hBitmap5 as the bitmap for a toolbar button (used in TB_ADDBUTTON-message) the area which was supposed to be the background color of the toolbarbuttons, were turned in white. I did found a solution last friday (at last). First I fill the hBitmap5 with the color of the toolbar buttons. The color of the toolbar buttons I was able to retreive using GetSysColor. Then I used the DrawIcon on this hBitmap5. And finally I passed this hBitmap5 to the toolbar with the TB_ADDBUTTON-message. The final result is now exact what I wanted. Anyway, thanks for your reply. kind regards, Ward -- modified at 16:09 Sunday 25th December, 2005

    C / C++ / MFC graphics help csharp question

  • Using a mask for drawing non rectangular bitmaps
    W Ward 0

    I have a problem with drawing a non rectangular bitmap using a mask bitmap. The two bitmaps are derived from an icon file in the resources. I want to create a HBITMAP object that contains the correct result of the masked drawing. HICON hIcon5 = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON12)); GetIconInfo(hIcon5, &iinfo);//retreive the BITMAP bm; GetObject(iinfo.hbmColor,sizeof(bm),&bm); HDC hdcToolbar = GetDC(hToolbar);//hToolbar is a window HDC hdcBitmap5 = CreateCompatibleDC(hdcToolbar); HDC hdcMask = CreateCompatibleDC(hdcToolbar) ; HDC hdcColor = CreateCompatibleDC(hdcToolbar) ; HBITMAP hBitmap5 = CreateCompatibleBitmap(hdcBitmap5,bm.bmWidth,bm.bmHeight); HGDIOBJ hOldBitmap5 = SelectObject(hdcBitmap5, hBitmap5); HGDIOBJ hOldMask = SelectObject(hdcMask, iinfo.hbmMask) ; HGDIOBJ hOldColor = SelectObject(hdcColor, iinfo.hbmColor); //Now comes the difficult part where I can't find the solution BitBlt (hdcBitmap5, 0, 0, bm.bmWidth,bm.bmHeight, NULL, 0, 0, WHITENESS); BitBlt (hdcBitmap5, 0, 0, bm.bmWidth,bm.bmHeight, hdcMask, 0, 0, 0x220326);//found this code in Pedzold, chapter 14) BitBlt (hdcBitmap5, 0, 0, bm.bmWidth,bm.bmHeight, hdcColor, 0, 0, SRCPAINT) ; SelectObject(hdcMask, hOldMask) ; SelectObject(hdcColor, hOldColor); SelectObject(hdcBitmap5, hOldBitmap5); DeleteDC(hdcMask); DeleteDC(hdcColor); DeleteDC(hdcBitmap5); ReleaseDC(hToolbar, hdcToolbar); Download the icon i used for the test here Can someone help me please? thanks in advance, Ward

    C / C++ / MFC graphics help csharp 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