На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
! Правила раздела Visual C++ / MFC / WTL (далее Раздела)
1) На Раздел распространяются все Правила Форума.
2) Перед тем, как создать новый топик, убедитесь, что Вы читали Правила создания тем в Разделе.
3) Вопросы, не связанные с программированием (настройки MS Visual Studio, книги, библиотеки и т.д.),
обсуждаются в разделе C/C++: Прочее
4) Вопросы разработки .NET (Windows Form, C++/CLI и т.п.) приложений на Visual C++/C# обсуждаются в разделе .NET.
5) Нарушение Правил может повлечь наказание со стороны модераторов.

Полезные ссылки:
user posted image FAQ Раздела user posted image Обновления для FAQ Раздела user posted image Поиск по Разделу user posted image MSDN Library Online
Модераторы: ElcnU
  
> Взять DC свернутого окна
    Как это сделать?
    Сообщение отредактировано: Wolkodaw -
      А точно так-же, как и развернутого.
      Находишь окно, и берешь его DC
        GetDC(...) - клиентская область окна
        GetWindowDC(...) - вся область окна, вроде бы...
          Drawing a Minimized Window
          You can draw your own minimized windows rather than having the system draw them for you. Most applications define a class icon when registering the window class for the window, and the system draws the icon when the window is minimized. If you set the class icon to NULL, however, the system sends a WM_PAINT message to your window procedure whenever the window is minimized, enabling the window procedure to draw in the minimized window.

          In the following example, the window procedure draws a star in the minimized window. The procedure uses the IsIconic function to determine when the window is minimized. This ensures that the star is drawn only when the window is minimized.

          POINT aptStar[6] = {50,2, 2,98, 98,33, 2,33, 98,98, 50,2};

           .
           .
           .

          case WM_PAINT:
             hdc = BeginPaint(hwnd, &ps);

             // Determine whether the window is minimized.

             if (IsIconic(hwnd))
             {
                 GetClientRect(hwnd, &rc);
                 SetMapMode(hdc, MM_ANISOTROPIC);
                 SetWindowExtEx(hdc, 100, 100, NULL);
                 SetViewportExtEx(hdc, rc.right, rc.bottom, NULL);
                 Polyline(hdc, aptStar, 6);
             }
             else
             {
                 TextOut(hdc, 0,0, "Hello, Windows!", 15);
             }
             EndPaint(hwnd, &ps);
             return 0L;
          You set the class icon to NULL by setting the hIcon member of the WNDCLASS structure to NULL before calling the RegisterClass function for the window class.

          0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
          0 пользователей:


          Рейтинг@Mail.ru
          [ Script execution time: 0,0206 ]   [ 16 queries used ]   [ Generated: 2.05.24, 07:47 GMT ]