Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - INT 1
Search - INT 1 - List
DL : 0
程序说明书 一. 各模块的功能: readtxt(),读读者文件writetxt(),写读者文件addreader(reader s) ,添加读者delreader(int number),删除读者searchreader(int number),查找读者readerdata() ,读者数据管理readbtxt(),读图书文件writebtxt(),写图书文件addbook(libook s),添加图书delbook(int number),删除图书searchbook(int number),查找图书bookdata(),图书数据管理borbook(),读者借书retbook(),读者还书main()主函数-a procedure manuals. The module functions : readtxt (), read documents readers writetxt (), write documents addreader readers (reader s), add the readers delreader (int number), the deletion of readers searchreader (int number), you readers readerdata (), data management readbtxt readers ( ), reading books document writebtxt (), write books document addbook (libook s), add the books delbook (int number), the deletion of books searchbook (int number), search for books bookdata (), library data management borbook (), borrowers retbook ( ), readers book main () function main
Date : 2008-10-13 Size : 24.29kb User : 闫斌

Windows编程基础--窗体篇   现在Windows已经成为世界上使用最广泛的操作系统,这使得学习Windows编程变得十分重要.和学习其他 编程语言一样,我们也从一个最简单的例子开始学习Windows编程.这个例子将建立一个Windows窗体并在窗体中间显示\"HELLO\"字符串(见图1).      1.程序的开始和结束 和C语言中的main()函数一样,Windows程序是从WinMain()函数开始和结束的.WinMain()函数是在WINBASE.H中定义的,其原形如下:    int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) 其中第一个参数(HINSTANCE hInstance)是程序的实例句柄,这个实例句柄是程序的唯一标识.第二个参数(HINSTANCE hPrevInstance)是用做检查是否有多个程序实例运行,但由于Windows9X和NT(包括更高版本)是32位操作系统,所以这个参数总是NULL.第三个参数(LPSTR lpCmdLine)是一个指向字符串的指针,用来保存运行程序时的命令行参数.第四个参数(int nShowCmd)用来指
Date : 2008-10-13 Size : 3.71kb User : 地方随

DL : 0
#include <stdio.h> unsigned long int crc32_table[256] unsigned long int ulPolynomial = 0x04c11db7 unsigned long int Reflect(unsigned long int ref, char ch) { unsigned long int value(0) // 交换bit0和bit7,bit1和bit6,类推 for(int i = 1 i < (ch + 1) i++) { if(ref & 1) value |= 1 << (ch - i) ref >>= 1 } return value } init_crc32_table() { unsigned long int crc,temp // 256个值 for(int i = 0 i <= 0xFF i++) { temp=Reflect(i, 8) crc32_table[i]= temp<< 24 for (int j = 0 j < 8 j++){ unsigned long int t1,t2 unsigned long int flag=crc32_table[i]&0x80000000 t1=(crc32_table[i] << 1) if(flag==0) t2=0 else t2=ulPolynomial crc32_table[i] =t1^t2 } crc=crc32_table[i] crc32_table[i] = Reflect(crc32_table[i], 32) } } -# include
Date : 2008-10-13 Size : 795byte User : 海波

算法的基本思路是: 定义结构体:struct PLACE{int x, int y}表示棋盘上的位置。 依题意,马每跳一步之后都可以从七个不同的方向选择下一步的跳马,当然,前提是跳的这一步在棋盘内且它前面的任何一步都没跳到这一格子上(限界),就可以认为这一步跳成功,否则跳马不成功。若跳马不成功,则找下一个方向尝试跳马,若七个方向都跳马不成功,则回溯。 -algorithm for the basic ideas : the structure definition : PLACE struct (int x, int y) expressed position on the chessboard. According to that intended, Ma every step dancing followed from 7 to choose a different direction next vault, of course, the premise is this step jump on the chessboard in front of it, within any step no jumping on the lattice (Bound), that could jump to success, or else vault unsuccessful. Vault if unsuccessful, to find a direction to vault, if the seven directions vault unsuccessful, then backtracking.
Date : 2008-10-13 Size : 46.52kb User : 杨小娜

this utility is used to copy any file to different location in the local area network. this utility keeps record of last added locations into the list.This application uses path.xml file to keep history of locations. This is very simple yet useful utility easpecially if you want to copy your file daily to fixed locations to different computers in the network-this utility is used to copy any file to diff erent location in the local area network. this u tility keeps record of last added locations int o list.This application uses the file path.xml to keep history of locations. This is very simpl e easpecially yet useful utility if you want to c guardian your file daily to fixed locations to differ ent computers in the network
Date : 2008-10-13 Size : 4.11kb User : lii

#include <QtGui/QApplication> #include <QtCore/QTextCodec> #include \"PanGraphRun.h\" int main(int argc, char *argv[]) { QApplication a(argc, argv) QTextCodec::setCodecForTr(QTextCodec::codecForName(\"GBK\")) PanGraphRun w if(argc > 1) { w.loadFile(QObject::tr(argv[1])) } w.showMaximized() a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())) return a.exec() }
Date : 2008-10-13 Size : 14.81kb User : ljh

int PosFromChar(UINT nChar) // 通过指定的字符获得其x轴的位置 int CharFromPos(int nPosX) // 通过给定的x轴的位置获得相应的字符 void CutString() // 剪切字符串 void PasteString() // 粘贴字符串 void CopyString() // 拷贝字符串 void MakeBKGround(CDC *pDC, COLORREF clrBegin, COLORREF clrEnd, CRect rect) // 生成窗口背景 CString m_strEdit // 当前包含的文本。 CString m_strSelect // 当前选择的文本。 CPoint m_ptCursor // 当前光标的位置。 CPoint m_ptTxtBegin // 文本的起始位置。 CPoint m_ptFirst // 鼠标左键按下时的第一点位置。 CPoint m_ptSecond // 鼠标当前的位置。 int m_nCharPos // 当前光标处于第几个字符的后面,从0开始计数。 int m_nShowChar // 在编辑框中第一个显示的字符,从0开始计数。 int m_nMaxShowChars // 在编辑框中一次最多显示的字符数量 。 int m_nSelectBegin // 选择的字符的起始位置。 int m_nSelectEnd // 选择的字符的终止位置。 CBitmap m_BmpBK // 背景图片。 CFont m_TxtFont // 文本的字体。 TEXTMETRIC m_tm // 文本字体的信息。
Date : 2008-10-13 Size : 37.04kb User : yang

 

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

DL : 0
程序说明书 一. 各模块的功能: readtxt(),读读者文件writetxt(),写读者文件addreader(reader s) ,添加读者delreader(int number),删除读者searchreader(int number),查找读者readerdata() ,读者数据管理readbtxt(),读图书文件writebtxt(),写图书文件addbook(libook s),添加图书delbook(int number),删除图书searchbook(int number),查找图书bookdata(),图书数据管理borbook(),读者借书retbook(),读者还书main()主函数-a procedure manuals. The module functions : readtxt (), read documents readers writetxt (), write documents addreader readers (reader s), add the readers delreader (int number), the deletion of readers searchreader (int number), you readers readerdata (), data management readbtxt readers ( ), reading books document writebtxt (), write books document addbook (libook s), add the books delbook (int number), the deletion of books searchbook (int number), search for books bookdata (), library data management borbook (), borrowers retbook ( ), readers book main () function main
Date : 2026-01-07 Size : 24kb User : 闫斌

Windows编程基础--窗体篇   现在Windows已经成为世界上使用最广泛的操作系统,这使得学习Windows编程变得十分重要.和学习其他 编程语言一样,我们也从一个最简单的例子开始学习Windows编程.这个例子将建立一个Windows窗体并在窗体中间显示"HELLO"字符串(见图1).      1.程序的开始和结束 和C语言中的main()函数一样,Windows程序是从WinMain()函数开始和结束的.WinMain()函数是在WINBASE.H中定义的,其原形如下:    int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) 其中第一个参数(HINSTANCE hInstance)是程序的实例句柄,这个实例句柄是程序的唯一标识.第二个参数(HINSTANCE hPrevInstance)是用做检查是否有多个程序实例运行,但由于Windows9X和NT(包括更高版本)是32位操作系统,所以这个参数总是NULL.第三个参数(LPSTR lpCmdLine)是一个指向字符串的指针,用来保存运行程序时的命令行参数.第四个参数(int nShowCmd)用来指
Date : 2026-01-07 Size : 3kb User : 地方随

DL : 0
用TURBOC2.0 编写的在没有汉字系统的DOS下显示汉字的函数,(调用函数:int outhz(int x,int y,char *p,int color),p为所要显示的字符串首址),使用UCDOS的汉字库。-TURBOC2.0 prepared with the Chinese character system in the absence of the DOS display Chinese characters function (function call : int outhz (int x, int y, char* p, int color), p-by to demonstrate that the site of the first string), the use UCDOS Store.
Date : 2026-01-07 Size : 138kb User : 看看

this utility is used to copy any file to different location in the local area network. this utility keeps record of last added locations into the list.This application uses path.xml file to keep history of locations. This is very simple yet useful utility easpecially if you want to copy your file daily to fixed locations to different computers in the network-this utility is used to copy any file to diff erent location in the local area network. this u tility keeps record of last added locations int o list.This application uses the file path.xml to keep history of locations. This is very simpl e easpecially yet useful utility if you want to c guardian your file daily to fixed locations to differ ent computers in the network
Date : 2026-01-07 Size : 4kb User : lii

int PosFromChar(UINT nChar) // 通过指定的字符获得其x轴的位置 int CharFromPos(int nPosX) // 通过给定的x轴的位置获得相应的字符 void CutString() // 剪切字符串 void PasteString() // 粘贴字符串 void CopyString() // 拷贝字符串 void MakeBKGround(CDC *pDC, COLORREF clrBegin, COLORREF clrEnd, CRect rect) // 生成窗口背景 CString m_strEdit // 当前包含的文本。 CString m_strSelect // 当前选择的文本。 CPoint m_ptCursor // 当前光标的位置。 CPoint m_ptTxtBegin // 文本的起始位置。 CPoint m_ptFirst // 鼠标左键按下时的第一点位置。 CPoint m_ptSecond // 鼠标当前的位置。 int m_nCharPos // 当前光标处于第几个字符的后面,从0开始计数。 int m_nShowChar // 在编辑框中第一个显示的字符,从0开始计数。 int m_nMaxShowChars // 在编辑框中一次最多显示的字符数量 。 int m_nSelectBegin // 选择的字符的起始位置。 int m_nSelectEnd // 选择的字符的终止位置。 CBitmap m_BmpBK // 背景图片。 CFont m_TxtFont // 文本的字体。 TEXTMETRIC m_tm // 文本字体的信息。
Date : 2026-01-07 Size : 37kb User : yang

一个实用的仪表控件,用户可以根据需要进行设置或增减功能。 主要函数介绍如下: SetNeedleColor(COLORREF colorNeedle) 设置指针颜色 SetRange(double dMin, double dMax) 设置仪表最大值最小值 SetScaleDecimals(int nDecimals) 设置刻度显示精度(小数点后位数) SetValueDecimals(int nDecimals) 设置数值显示精度(小数点后位数) SetUnits(CString &strUnits) 设置单位 SetColorTick(BOOL bColorTick) 是否显示彩色刻度 SetTicks(int nTicks) 设置主刻度(分几大格) SetSubTicks(int nSubTicks) 设置子刻度(每大格分为几小格) SetAngleRange(int nStartAngleDeg, int nEndAngleDeg) 表盘圆弧起始终止角度-A practical instrument control, the user can set or change functions. The main function as follows: SetNeedleColor (COLORREF colorNeedle) set the target color SetRange (double dMin, double dMax) set the minimum meter maximum SetScaleDecimals (int nDecimals) shows that the accuracy of calibration settings (the median after the decimal point) SetValueDecimals (int nDecimals) set numerical display precision (digits after the decimal point) SetUnits (CString
Date : 2026-01-07 Size : 65kb User : 红枫

有关于传值的一些汇编 比如说弹出窗口想得到父窗口类的一个int。 问题补充: 如果父窗口是MainFrame呢? ((CaaaWnd*))GetParent())->m_parent_var 其中,CaaaWnd是父窗口的类名,m_parent_var是父窗口的成员变量。-Value on the compilation of a number of pop-up window for example, want a parent window class int. Add: If the parent window is then MainFrame? ((CaaaWnd*)) GetParent ())-> m_parent_var which, CaaaWnd is the parent window class name, m_parent_var is a member of the parent window variables.
Date : 2026-01-07 Size : 3kb User : taoye

DL : 0
public class BubbleSort{ static String printArray(int[] a){ String result="" for(int i=0 i<a.length i++) result+=a[i]+" " return result } static int[] bubbleSort(int[] a){ int t for(int i=0 i<a.length i++) { for(int j=0 j<a.length-i-1 j++) //升序排列用大于,降序排列用小于,此处为降序排列。 if(a[j]<a[j+1]) {t=a[j] a[j]=a[j+1] a[j+1]=t } } return a } public static void main(String args[]) { int a[]={25,36,47,32,21,16} System.out.println("排序前的数组\n"+printArray(a)) a=bubbleSort(a) System.out.println("排序后的数组\n"+printArray(a)) } } -public class BubbleSort{ static String printArray(int[] a){ String result="" for(int i=0 i<a.length i++) result+=a[i]+" " return result } static int[] bubbleSort(int[] a){ int t for(int i=0 i<a.length i++) { for(int j=0 j<a.length-i-1 j++) //升序排列用大于,降序排列用小于,此处为降序排列。 if(a[j]<a[j+1]) {t=a[j] a[j]=a[j+1] a[j+1]=t } } return a } public static void main(String args[]) { int a[]={25,36,47,32,21,16} System.out.println("排序前的数组\n"+printArray(a)) a=bubbleSort(a) System.out.println("排序后的数组\n"+printArray(a)) } }
Date : 2026-01-07 Size : 3kb User : jing

定义一个由int型元素所构成的线性表类LinearList(通过数组实现)-Int type element defines a linear form of the composition class LinearList (achieved through the array)
Date : 2026-01-07 Size : 859kb User : sirenqihua

DL : 0
一个基于MFC的简单的屏幕截图工具,其中实现了热键截取-DWORD size=bitmap.bmWidthBytes*bitmap.bmHeight //图片数据大小 LPSTR lpData=(LPSTR)GlobalAlloc(GPTR,size) int panelsize = 0 //记录调色板大小 if(bitmap.bmBitsPixel<16) //判断是否为真彩色位图 panelsize =(int)pow(2,bitmap.bmBitsPixel*sizeof(RGBQUAD)) BITMAPINFOHEADER*pBInfo = (BITMAPINFOHEADER*)LocalAlloc(LPTR, sizeof(BITMAPINFO)+panelsize) //位图头指针 pBInfo->biBitCount = bitmap.bmBitsPixel //位图像素 pBInfo->biClrImportant = 0 pBInfo->biCompression = 0 pBInfo->biHeight = bitmap.bmHeight //位图高 pBInfo->biPlanes = bitmap.bmPlanes pBInfo->biSize = sizeof(BITMAPINFO) pBInfo->biSizeImage = bitmap.bmWidthBytes*bitmap.bmHeight //数据 pBInfo->biWidth = bitmap.bmWidth //位图宽 pBInfo->biXPelsPerMeter = 0 pBInfo->biYPelsPerMeter = 0 GetDIBits(memDC.m_hDC,bmp,0,pBInfo->biHeight,lpData, (BITMAPINFO*)pBInfo,DIB_RGB_COLORS)
Date : 2026-01-07 Size : 6.31mb User : sunwen

for(int i 0 i<10 i++)循环次数 -rwerwe ewrwerwerwe
Date : 2026-01-07 Size : 2.02mb User : 马里

函数 long StrToData(CString strData,int jz) 功能:字符串转为正整数值()
Date : 2026-01-07 Size : 8kb User : asksohrvnouz
« 12 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.