Welcome![Sign In][Sign Up]
Location:
Search - window

Search list

[Firewall-SecurityWindow防火墙与网络封包截获技术一书配套源程序2

Description: Window防火墙与网络封包截获技术一书配套源程序2-Window firewall and network packet technology intercepted a book supporting source 2
Platform: | Size: 1015500 | Author: 大灰熊 | Hits:

[GUI Developwindow

Description: window窗口编程 用API 实现并有实例 详细注解 游戏编程初级源码-window window with API programming examples and a detailed explanation of primary-source programming games
Platform: | Size: 96374 | Author: 朝阳 | Hits:

[Internet-Network网页编程window.open()

Description:

网页编程window.open()的详细用法


Platform: | Size: 18393 | Author: lovelymm | Hits:

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[VC/MFCWindows程序设计(第5版)(中文CHM)

Description: “对于Windows程序员来说,从《Window程序设计》一书中寻找答案。”几乎成了一句至理名言。而《Windows程序设计》第5版是专门为在Microsoft Windows 98、Microsoft Windows NT 4和 Windows NT 5下编程的开发人员编写的。内容博大精深,并有大量的源代码来帮助读者掌握Windows编程。本书覆盖了Windows编程的方方面面,是广大编程人员和学习Windows编程的读者必备的一本好书。
Platform: | Size: 3076519 | Author: divi2001 | Hits:

[Windows Kernel进程间通讯(一):Window下使用内存映射文件共享数据的例子

Description: Window下使用内存映射文件共享数据的例子 CreateFileMapping OpenFileMapping MapViewOfFile UnFileMapping等函数的具体应用。比较经典,可以直接拷到工程中应用。 使用过程中有问题。发邮件给我帮你解答,39514004@qq.com
Platform: | Size: 53120 | Author: cnzhuhai | Hits:

[SourceCode进程间通讯(二):Window下使用消息机制共享数据的例子

Description: Window下使用消息机制共享数据的例子 主要通过WM_COPYDATA在进程间通信 可以直接拷进工程中使用,使用过程中有问题。 发邮件给我帮你解答,39514004@qq.com
Platform: | Size: 107819 | Author: cnzhuhai | Hits:

[TCP/IP stack进程间通讯(三):Window下使用socket进行通信的例子

Description: Window下使用socket进行通信的例子 介绍了windows下socket的应用,例子vs2008编译,可以直接运行。 比较简洁经典。
Platform: | Size: 12755 | Author: cnzhuhai | Hits:

[.net基于Window 操作系统的扩展编程

Description: VC.netWindeoSystem 基于Window 操作系统的扩展编程的源码
Platform: | Size: 145537 | Author: gdzsyyz | Hits:

[Windows DevelopTransparentWindow_demo

Description: 透明窗口-The example of transparent window
Platform: | Size: 23552 | Author: 站长 | Hits:

[ApplicationsHideIt_src

Description: 一个可以管理当前窗口显示和隐藏的完整程序--A entire program which can make current window show or hide
Platform: | Size: 100352 | Author: 站长 | Hits:

[Multimedia DevelopMPlayer2

Description: 可以提供拖入播放目录进行播放文件的自动查找播放等。播放使用的是 Window Media Play-Can provide into play to play the file directory to find the auto shows. Players are using the Window Media Play
Platform: | Size: 25600 | Author: 段延松 | Hits:

[SourceCodeChangeTitle

Description: 随时改变窗口标题栏的内容,使标题栏的内容更适合自己的需要-change the window title at any time and make the title text according to your own demand
Platform: | Size: 71680 | Author: 王志强 | Hits:

[Multimedia Developwmfsdk9

Description: window media SDK
Platform: | Size: 4072448 | Author: 赵鑫 | Hits:

[Windows Developwinddk

Description: window ddk 驱动开发文档-window each Driver Development Documents
Platform: | Size: 1520640 | Author: 何力 | Hits:

[DocumentsdFreeze Window Manager

Description: dFreeze Window Manager.zip
Platform: | Size: 70656 | Author: 零壹 | Hits:

[DocumentsWindow 消息大全使用详解

Description: windows 消息详细文档-windows news detailed documentation
Platform: | Size: 6144 | Author: 黄安 | Hits:

[Windows DevelopSplitWindowDoc

Description: split window program in c
Platform: | Size: 1024 | Author: 王国 | Hits:

[ELanguagepcyacc

Description: WINDOW版的YACC編譯軟體-WINDOW version YACC 鈻♀枴鈻♀枴
Platform: | Size: 1116160 | Author: 黃依封 | Hits:

[Internet-Networkqian6

Description: 实现arq滑动窗口协议-Sliding Window Protocol achieve arq
Platform: | Size: 1273856 | Author: 李玄 | Hits:
« 1 2 34 5 6 7 8 9 10 ... 50 »

CodeBus www.codebus.net