当前位置:首页
开发技术指南» 文章正文
    引言:

 ·关于读取txt类型的数据文件    »显示摘要«
    摘要: 我现在有一个以.txt提交的数据,格式是这样的,每条个字段是以"|"分割的。如下: xxxxxxx|xxxx|xxxxxx xxxx|xxxxxxxxx|xxx xxxxxxxxx|xxxxxx|xxxxxxxxxx 请问我怎么才能读出每个字段的值?然后把它们写道mssql数据库中。 ......
    摘要: 我用java.util.date regpaydate=rst.getdate("regpaydate");取出,显示用<%=regpaydate%>,只出来了日期,时间怎么也显示出来?还有如何取两个时间的相差分数或小时数? ......


还是窗口处理程序的调用问题

程序是这样的:  
  .386    
  .model   flat,stdcall    
  option   casemap:none    
  include   \masm32\include\windows.inc    
  include   \masm32\include\user32.inc    
  includelib   \masm32\lib\user32.lib                         ;   calls   to   functions   in   user32.lib   and   kernel32.lib    
  include   \masm32\include\kernel32.inc    
  includelib   \masm32\lib\kernel32.lib    
   
  WinMain   proto   :DWORD,:DWORD,:DWORD,:DWORD    
   
  .DATA                                           ;   initialized   data    
  ClassName   db   "SimpleWinClass",0                 ;   the   name   of   our   window   class    
  AppName   db   "Our   First   Window",0                 ;   the   name   of   our   window    
   
  .DATA?                                 ;   Uninitialized   data    
  hInstance   HINSTANCE   ?                 ;   Instance   handle   of   our   program    
  CommandLine   LPSTR   ?    
  .CODE                                 ;   Here   begins   our   code    
  start:    
  invoke   GetModuleHandle,   NULL                         ;   get   the   instance   handle   of   our   program.    
                                                                                                                                                ;   Under   Win32,   hmodule==hinstance   mov   hInstance,eax    
  mov   hInstance,eax    
  invoke   GetCommandLine                                                 ;   get   the   command   line.   You   dont   have   to   call   this   function   IF    
                                                                                                                                                ;   your   program   doesnt   process   the   command   line.    
  mov   CommandLine,eax    
  invoke   WinMain,   hInstance,NULL,CommandLine,   SW_SHOWDEFAULT                 ;   call   the   main   function    
  invoke   ExitProcess,   eax                                                       ;   quit   our   program.   The   exit   code   is   returned   in   eax   from   WinMain.    
   
  WinMain   proc   hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD    
          LOCAL   wc:WNDCLASSEX                                                                                         ;   create   local   variables   on   stack    
          LOCAL   msg:MSG    
          LOCAL   hwnd:HWND    
   
          mov       wc.cbSize,SIZEOF   WNDCLASSEX                                       ;   fill   values   in   members   of   wc    
          mov       wc.style,   CS_HREDRAW   or   CS_VREDRAW    
          mov       wc.lpfnWndProc,   OFFSET   WndProc    
          mov       wc.cbClsExtra,NULL    
          mov       wc.cbWndExtra,NULL    
          push     hInstance    
          pop       wc.hInstance    
          mov       wc.hbrBackground,COLOR_WINDOW+1    
          mov       wc.lpszMenuName,NULL    
          mov       wc.lpszClassName,OFFSET   ClassName    
          invoke   LoadIcon,NULL,IDI_APPLICATION    
          mov       wc.hIcon,eax    
          mov       wc.hIconSm,eax    
          invoke   LoadCursor,NULL,IDC_ARROW    
          mov       wc.hCursor,eax    
          invoke   RegisterClassEx,   addr   wc                                               ;   register   our   window   class    
          invoke   CreateWindowEx,NULL,\    
                                  ADDR   ClassName,\    
                                  ADDR   AppName,\    
                                  WS_OVERLAPPEDWINDOW,\    
                                  CW_USEDEFAULT,\    
                                  CW_USEDEFAULT,\    
                                  CW_USEDEFAULT,\    
                                  CW_USEDEFAULT,\    
                                  NULL,\    
                                  NULL,\    
                                  hInst,\    
                                  NULL    
          mov       hwnd,eax    
          invoke   ShowWindow,   hwnd,CmdShow                               ;   display   our   window   on   desktop    
          invoke   UpdateWindow,   hwnd                                                                   ;   refresh   the   client   area    
   
          .WHILE   TRUE                                                                                                                   ;   Enter   message   loop    
                                  invoke   GetMessage,   ADDR   msg,NULL,0,0    
                                  .BREAK   .IF   (!eax)    
                                  invoke   TranslateMessage,   ADDR   msg    
                                  invoke   DispatchMessage,   ADDR   msg    
        .ENDW    
          mov           eax,msg.wParam                                                                                         ;   return   exit   code   in   eax    
          ret    
  WinMain   endp    
   
  WndProc   proc   hWnd:HWND,   uMsg:UINT,   wParam:WPARAM,   lParam:LPARAM                                                        
   
  传递的参数值从哪看出?  
   
   
   
   
   
          .IF   uMsg==WM_DESTROY                                                       ;   if   the   user   closes   our   window    
                  invoke   PostQuitMessage,NULL                           ;   quit   our   application    
          .ELSE    
                  invoke   DefWindowProc,hWnd,uMsg,wParam,lParam           ;   Default   message   processing    
                  ret    
          .ENDIF    
          xor   eax,eax    
          ret    
  WndProc   endp    
   
  end   start    
  我想问的是wndproc的调用是发生在dispatchmessage,但是他的的参数是怎么传递的,在哪看这些参数的具体值?

NO.1   作者: mydo

~GetMessage   从消息队列中取得消息,并填写   msg   结构,在下面则传递了一个消息结构的地址~  
  ~可以在窗口函数中察看,否则直接察看,只要你能忍受无响应的窗口。~


 ·一个多线程问题 、、、    »显示摘要«
    摘要: 有两个delphi程序(a、b) 1、点击a.exe 的增加按钮时怎么样在另外一个线程里打开b.exe程序 ?????? 2、如何得到b.exe的打开、关闭等信息. ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE