Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - share file
Search - share file - List
DL : 0
ex_2.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. ex_2.cpp This is the main application source file.
Date : 2008-10-13 Size : 6.89kb User : xiaofeng

 

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

 

Date : 2009-01-08 Size : 429.52kb User : bluecrest

最近做了一个类似Windows画图板的小程序,拿来和大家分享一下。功能和界面全部模仿于Windows自带的画图板,界面如截图。功能主要有: 手绘线、简单图形、文字输入、图块拖放、重复撤销、画面缩放、打开保存图片文件-Recently made a similar small Windows drawing board procedures used and to share with Members. Features and interfaces in Windows, bringing all to imitate the drawing board, interface, such as screenshots. The main features are: hand-painted lines, simple graphics, text input, drag and drop block, repeated revoked, screen zoom, open the save image file
Date : 2025-12-29 Size : 7.12mb User : maoyi

DL : 0
ex_2.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. ex_2.cpp This is the main application source file.
Date : 2025-12-29 Size : 106kb User : xiaofeng

朱二DotNET工具箱 本人在工作中,经常会使用一些类和函数,为方便使用,特将部分代码整理分类,和朋友们分享。 代码中部分为原创,部分摘自互联网,时间长了,也搞不清除哪些是自己写的哪些不是,具体在每个文件中都做了说明。如涉及侵权,请即时联系小朱。 本人水平有限,源码中难免有所疏漏,请朋友多多指正,也欢迎来技术交流的朋友。 源码只供大家研究学习之用,请勿做它用,由此而产生的一切后果本人概不负责!-Chu 2 DotNET Toolbox I work, often using some classes and functions, to facilitate the use of some special code in order classification, and friends to share. The code part is original, some taken from the Internet, a long time, but also not quite sure what his addition to what is not written in concrete have done in each file are described. Involving infringement, please immediately contact小朱. I is limited, source of inevitable omissions, please friend lot of corrections, are also welcome to technical exchanges friends. Source only learning to use our study, do not do it with, all the consequences arising therefrom, I shall not be liable!
Date : 2025-12-29 Size : 104kb User : 朱二

建立3个学生的数据,建立了一个单程序或子程序,其他用户可以共享- This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally.
Date : 2025-12-29 Size : 180kb User : zhb

DL : 0
c#进度条的使用,还有读取txt文件第m行n列飞方法等等吧,三个程序的源代码,和大家分享下。-c# progress bar to use, as well as read the txt file first m rows n columns, so it fly method, three program' s source code, and share with you.
Date : 2025-12-29 Size : 2kb User : wml

QQLogin AppWizard has created this QQLogin application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application.-======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : QQLogin ======================================================================== AppWizard has created this QQLogin application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your QQLogin application. QQLogin.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. QQLogin.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CQQLoginApp application class. QQLogin.cpp This is th
Date : 2025-12-29 Size : 11kb User : zdocat

动态添加、删除树形控件的节点,获取树形控件的选中项-reeControlDemo.dspThis file (the project file) contains information at the project level andis used to build a single project or subproject. Other users can share the
Date : 2025-12-29 Size : 1.81mb User : chensheng

编码器信号采集VC程序,支持SSI,Endate2.1/2.2协议,可接4路编码器,用户自主设置编码器位数,延时补偿用户设置。-======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : EncoderInterface ======================================================================== AppWizard has created this EncoderInterface application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your EncoderInterface application. EncoderInterface.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. EncoderInterface.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CEncoderInterfac
Date : 2025-12-29 Size : 1.89mb User : shenshengbing

无穷自动机的确定化,有限自动机的最简化Simple DFA-Simple DFA NFA_AND_DFA.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. NFA_AND_DFA.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CNFA_AND_DFAApp application class. NFA_AND_DFA.cpp This is the main application source file that contains the application class CNFA_AND_DFAApp. NFA_AND_DFA.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. NFA_AND_DFA.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses thi
Date : 2025-12-29 Size : 3.85mb User : 毕栋梁

这是一个用c++语言编写的用于读取dxf文件的的程序,是我在codeproject下载下来的,感觉还不错,跟大家分享下。-This is a c++ language program for reading dxf file that I downloaded in codeproject, I feel pretty good, to share with you.
Date : 2025-12-29 Size : 624kb User : Mari

DL : 0
Hi all, Could anyone please share me this file ?
Date : 2025-12-29 Size : 875kb User : linhd13cn1
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.