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
D

daavena

@daavena
About
Posts
63
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PaintDesktop
    D daavena

    Hello, I want to obtain desktop background, so I would like to use PaintDesktop(hdc) function; SDK says: The PaintDesktop function fills the clipping region in the specified device context with the desktop pattern or wallpaper HRGN hReg = CreateRectRgn(0,0,10,10); HDC hdcD = GetWindowDC(GetDesktopWindow()); hdc = CreateCompatibleDC(hdcD); SelectObject(hdc,hReg); bResult = PaintDesktop(hdc); But PaintDesktop function always returns false. What am I doning wrong? Could you give me a hint. Thank you.

    C / C++ / MFC regex question

  • Desktop wallpaper/background
    D daavena

    Hi, thanks for your reply, Try HDC hdc = CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL) instead but as you said this capture whole screen with all windows - I do not need this. What I need is screen backgroud without any windows. Because I need copy a part of screen backgroud to my window. I know SystemParametersInfo function. It gives me the name of wallpaper only.

    C / C++ / MFC help tutorial question

  • Desktop wallpaper/background
    D daavena

    Hi gentlemen, is there an option how to obtain desktop wallpaper/background. I need to use it in the BitBlt function. I need to copy part of Desktop wallpaper/background to my appl. I've tried: hDesktopWindow = GetDesktopWindow(); HDC hdc = GetDC(hDesktopWindow) or HDC hdc = GetDC(NULL) and than I used hdc in the BitBlt function as source hdc - but It doesn't work because I got desktop with all opened windows - I need only wallpaer without windows. I've also tried PaintDesktop() function. It gets me the same result - results desktop with all windows. or HDC hdc = GetDC(GetDesktopWindow()) int iResult = GetObject(hdc,sizeof(HBITMAP), &hBitmap) iResult is allways 0 and GetLastError gets 6 = ERROR_INVALID_HANDLE Any idea? Thanks.

    C / C++ / MFC help tutorial question

  • The strange behaviour of the text.
    D daavena

    Hello gentlemen, I am drawing text directly onto the desktop-I am using hooks. I am capturing these messages from desktop - WM_ERASEBKGND and WM_PAINT and this is the drawing function: DrawText(hdc, pszText, strlen(pszText), &rcWindow, DT_RIGHT); Everythink is working fine - I see text on the desktop. But if I move with a window(which is currently open/active) the text will get bold. Even if I click on the desktop the text on the desktop will get bold. But if I hit F5 and the desktop is active - the text is normal. Can you give me a hind, what I am doing wrong? Thank you.

    C / C++ / MFC graphics question

  • How to disable minimzing?
    D daavena

    I use spy++, but when I hit win+D there is no message for my dialog(nothing about minimizing). _Superman_ wrote Win+D does not mean minimize. It means show desktop. maybe that is the reason why I can not capture the proper message.

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

  • How to disable minimzing?
    D daavena

    Thanks for reply, my dialog must be at the bottom of the Z order. I have dialog with text and the bg of the dialog is transparent.So it looks like the text is written directly on the desktop(but it isn't). The problem is when I hit win. key+D so the dialog is minimized. I know, it can be done using of windows hooks. I want to avoid of that(if it's possible).

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

  • How to disable minimzing?
    D daavena

    Hello gentlemen, Is there any option to disable/prevent window minimizing when I press window key(between Ctrl and Alt) + D? I have one dialog without tile with transparent backgroud, I don't use MFC. I am capturing these windows messages case WM_WINDOWPOSCHANGING: return true; break; case WM_WINDOWPOSCHANGED: return true; break; case WM_SIZE: if(wParam == SIZE_MINIMIZED) { return true; } break; Thank you.

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

  • Picture Control
    D daavena

    SendDlgItemMessage(hDlg,IDC_LOGO, STM_SETIMAGE,(WPARAM)IMAGE_BITMAP,(LPARAM) LoadIcon(ghInstance,MAKEINTRESOURCE(IDI_ICON1))); I see nothing; GetLasterror returns - The specified resource type cannot be found in the image file. But this icon - IDI_ICON1 is there because I use it as icon for exe file and for title bar. I am giving up. Thanks for you time.

    C / C++ / MFC help question learning

  • Picture Control
    D daavena

    I checked it all over again - when I change the value to 2000 I see nothing, to 113 I se different cursor(pen). In the type properties there is value Icon. There are no curors in the my resource. I see the icon in the Icon folder in the Resource viewer(there are no cursors).

    C / C++ / MFC help question learning

  • Picture Control
    D daavena

    I cleaned the solution and rebuilt that againt - It's same - I see nothing.

    C / C++ / MFC help question learning

  • Picture Control
    D daavena

    Hi, thanks for reply. When I changed the value to 2000 so I see nothing. There is no icon.

    C / C++ / MFC help question learning

  • Picture Control
    D daavena

    Hi, I have problem with Picture control in my project. I am using 3 dialogs. When I put Picture control on my dialog and set properties: Type to Icon, Image is icon ID from resource so I see icon icon in the Picture control - everything looks ok. But when I build the program so I see different icon in the Picture control - I see a cursor icon(white arrow with question mark) instead of my icon from resource. This is definition of Picture control from my resource: ICON IDI_ICON2,IDC_STATIC_ICON,181,154,20,20,0 The value of IDI_ICON2 is 112 I tried create a new project with one dialog box. It was working without any problems. What am I doing wrong. Thanks.

    C / C++ / MFC help question learning

  • windows message - when the window was displayed
    D daavena

    Thaks for reply, WM_SHOWWINDOW WPARAM wParam LPARAM lParam; Parameters wParam Specifies whether a window is being shown. If wParam is TRUE, the window is being shown. If wParam is FALSE, the window is being hidden. lParam is still 0 when I capture WM_SHOWWINDOW so wParam is always 1 -the window is being shown. My function always runs first. Then I see the window. This function takes a time - 10sec, that is reason why I need to see the window first. WM_SHOWWINDOW message is called only once. I think it is not possible to do that.

    C / C++ / MFC help question

  • windows message - when the window was displayed
    D daavena

    Thanks for reply. I need message when window/dialog has been shown - I need to see the window first and then run my function(only once).

    C / C++ / MFC help question

  • windows message - when the window was displayed
    D daavena

    when I click on the button I need: show window/dialog with message "Loading profile it can take several minutes" inside and than when the window is shown(is visible) I need to run the function - but only once.

    C / C++ / MFC help question

  • windows message - when the window was displayed
    D daavena

    Hello, I am using dialog boxes and I need to capture window message when the window/dialog was displayed I tried WM_SHOWWINDOW but the help says: WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown. I can not fint the proper message.Can you give me a hind? Thank you very much.

    C / C++ / MFC help question

  • Tab control - the big fight
    D daavena

    Hi, I am fighting with tab control. I can not show a dialog from resource on a tab control. I don't use MFC. I have two dialogs main with tab control and second: ///definition of my second dialog from resource file IDD_LOADPROFILE DIALOGEX 0, 0, 87, 46 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT on this message I am trying to show second dialog case WM_INITDIALOG: TCITEM tc; tc.mask = TCIF_TEXT | TCIF_PARAM; tc.pszText = "Current setting"; tc.lParam = IDD_LOADPROFILE;/// this is ID from my resource SendDlgItemMessage(hDlg,IDC_TAB1,TCM_INSERTITEM,0,(LPARAM)&tc); I see only the tab with label "Current settings", but I dont see second dialog. Thank you very much.

    C / C++ / MFC c++ learning

  • Comunication between form an appl. and a service.
    D daavena

    Thank you. I will check it.

    C# question

  • Comunication between form an appl. and a service.
    D daavena

    Hello gentlemen, I would like to write a service and an form appl.I need to obtain data from service to my form application(some information). Is it possible? If yes, could you give me a hint? Thank you very much.

    C# question

  • A function pointer.
    D daavena

    It's working. Thank you.

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

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