正在加载...
 
无语20081126  

日子还在在过。最近在安科做教网页的.真的有种感觉,原来有些事情必须自己亲自体验才能有所感觉。上课说话,不注意听,不做笔记,这些让我感觉自己的课不被喜欢,总有种失落感。我现在才明白自己原来做学生的时候上课说话老师心里是何其的不舒服。假如自己还能做学生的话,我会知道怎么样了 ..

浏览数(10) | 评论数(0) | 11-26 13:22
无瓖  

想追一个女孩,但回应却是泠冰冰的寂静,算了,该干什么就干什么吧。先做完这个LIVECHAT程序,然后继续我的17739。

有些事我真的很不明白 ...I need passion and diligent...Sometimes decline is luxury, the luxury of grief....

浏览数(9) | 评论数(0) | 11-25 09:15
修改QQ昵称代码为空  

__javascript:alert(ttinfo.document.infomation_main.Update.start("uin=2049235&nickname=\n&sex=1&isfullage=0&age=23&birthday=10-28&astro=0&bloodtype=0&province=%CC%EC%BD%F2&city=%BA%CD%C6%BD&hp=%BA%D3%B1%B1&hc=%CC%C6%C9%BD&marriage=1&grade=41&pageindex=1"))

只是用在QQ空间上的。它只用的JS验证....

浏览数(12) | 评论数(0) | 11-24 14:38
She is emotionally unavilable  

She told me she was emotionally unavilable...

I am in dilemma,continue to my dream or looking for a new one....

 

浏览数(12) | 评论数(1) | 11-19 12:29
livehat c sdk process updated  

#define WIN32_LEANAND_MEAN
#pragma comment(lib,"wsock32.lib")

#include <winsock2.h>

#define UWM_SYSTRAY 100//(WM_USER + 1)
#define WM_SOCKET_NOTIFY WM_USER+12
#define DEFAULT_BUFFER 4096
#define SERVERLISTINGPROT 2000

HWND hInst,hwnd;//hInst pop win instance
char dispalyText[30];
char dispalyTextEx[30];
int iIsOnline = 0;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
LRESULT CALLBACK popProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
typedef union taw
{
 int x;
 char *y;
};
BOOL SetIcon(PSTR pszTip , int nAction)
{             
 //UINT  uIcon; // Icon ID buffer
 DWORD dMsg;  // Message buffer (ADD/DELETE/MODIFY)

 NOTIFYICONDATA ni;
 ni.cbSize = sizeof(ni);
 ni.uID = 0;
 lstrcpyn(ni.szTip, pszTip, sizeof(ni.szTip));
 ni.hWnd = hwnd;
 ni.uFlags = NIF_MESSAGE | NIF_TIP | NIF_ICON; // We want to use icon, tip, and callback message
 ni.uCallbackMessage = UWM_SYSTRAY;      // Our custom callback message (WM_APP + 1)
   
    switch (nAction){
        case 0:// Remove tray icon
                return Shell_NotifyIcon(NIM_DELETE, &ni);
           break;
        case 1://Add icon in tray
                //uIcon=APP_ICON; // Set tray icon
                dMsg=NIM_ADD; // Add tray icon       
           break;
        case 2:// Modify current icon in tray
                //uIcon=TRAY_ICON; // Set new tray icon 
                dMsg=NIM_MODIFY; // Modify tray icon    
           break;              
        case 3:// Modify current icon in tray
                //uIcon=APP_ICON; // Set new tray icon 
                dMsg=NIM_MODIFY; // Modify tray icon     
           break;                               
     }
    
     //Load selected icon
     //ni.hIcon = (HICON)LoadIcon((HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE), MAKEINTRESOURCE(uIcon));
     ni.hIcon = LoadIcon( NULL, IDI_APPLICATION );                                                
     // Windooows, ohohooo, we have changed icon! :)                                               
     return Shell_NotifyIcon(dMsg, &ni);      
    
    
}
char * strcatEx(char *src,union taw d,int type)
{
 char temp[1024];
 if(type==0)//int
 {
  _itoa(d.x,temp,10);
  return strcat(src,temp);
 }else{
  return strcat(src,d.y); 
 }
}
void popMsnWindow(HINSTANCE hInstance)
{
 int width = 260,height = 100;
 RECT rc;
 char strHeight[10];
 int TotalHeight;
 int padding = 2;
 WNDCLASS wc;

 wc.style = CS_VREDRAW | CS_HREDRAW;
 wc.lpfnWndProc = (WNDPROC)popProc;
 wc.cbClsExtra = 0;
 wc.cbWndExtra = 0;
 wc.hInstance = hInstance;
 wc.hIcon = LoadIcon( hInstance, IDI_APPLICATION );
 wc.hCursor = LoadCursor( NULL, IDC_ARROW );
 wc.hbrBackground = GetStockObject(WHITE_BRUSH);
 wc.lpszMenuName = NULL;
 wc.lpszClassName = "pop";
 RegisterClass( &wc );
 SystemParametersInfo(SPI_GETWORKAREA,0,&rc,0);
 TotalHeight = GetSystemMetrics(SM_CYSCREEN);
 _itoa(TotalHeight-rc.bottom,strHeight,10);

 hInst = CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TOPMOST,"pop",NULL,WS_POPUP,GetSystemMetrics(SM_CXSCREEN)-width-padding,rc.bottom - height-padding,width,height,NULL,NULL,NULL,NULL);
}
int closeTips()
{
 KillTimer(hInst,5000);
 ShowWindow(hInst,SW_HIDE);
 return 1;
}
int showTips()
{
 SetTimer(hInst,5000,5000,0);
 ShowWindow(hInst,SW_SHOW);
 return 1;
}

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
 static TCHAR szAppName[] = TEXT ("HelloWin") ;
 MSG          msg ;
 WNDCLASS     wndclass ;

 wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
 wndclass.lpfnWndProc   = WndProc ;
 wndclass.cbClsExtra    = 0 ;
 wndclass.cbWndExtra    = 0 ;
 wndclass.hInstance     = hInstance ;
 wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;
 wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;
 wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
 wndclass.lpszMenuName  = NULL ;
 wndclass.lpszClassName = szAppName ;

 if (!RegisterClass (&wndclass))
 {
  MessageBox (NULL, TEXT ("This program requires Windows NT!"),szAppName, MB_ICONERROR) ;
  return 0 ;
 }
 hwnd = CreateWindow (szAppName,TEXT ("The Hello Program"),WS_OVERLAPPEDWINDOW,400,             
     300,400,200,NULL,NULL,hInstance,NULL) ;
 SetIcon("buglol",1); 
 while (GetMessage (&msg, NULL, 0, 0))
 {
  TranslateMessage (&msg) ;
  DispatchMessage (&msg) ;
 }
 return msg.wParam ;
}

LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
 HDC         hdc ;
 PAINTSTRUCT ps ;
 RECT        rect ;
 static SOCKET sListen,sClient;
 static struct sockaddr_in local,client;

 WORD wEvent, wError ;
 static WSADATA wd;

 int ret;
 int len;
 char cMessages[DEFAULT_BUFFER];
 char lpLinkString[500];


 switch (message)
 {
  case WM_CREATE:
   popMsnWindow(((LPCREATESTRUCT) lParam)->hInstance);
   if (WSAStartup(MAKEWORD(2,2),&wd)!=0)
   {
    _itoa(WSAGetLastError(),lpLinkString,10);
    MessageBox(NULL,lpLinkString,"WSAStartup",MB_ICONERROR);
    return TRUE ;  
   }
   sListen = socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
   if(sListen == SOCKET_ERROR)  
   {
    _itoa(WSAGetLastError(),lpLinkString,10);
    MessageBox(NULL,lpLinkString,"Error:socket",MB_ICONERROR);
    closesocket (sListen) ;
    WSACleanup () ;
    return TRUE ;  
   }
   if (SOCKET_ERROR == WSAAsyncSelect (sListen, hwnd, WM_SOCKET_NOTIFY,FD_ACCEPT | FD_READ))
   {
    _itoa(WSAGetLastError(),lpLinkString,10);
    MessageBox(NULL,lpLinkString,"Error:WSAAsyncSelect",MB_ICONERROR);
    closesocket (sListen) ;
    WSACleanup();
    return TRUE ;
   }
   local.sin_addr.s_addr = htonl(INADDR_ANY);
   local.sin_family = AF_INET;
   local.sin_port = htons(SERVERLISTINGPROT);
   if(bind(sListen, (struct sockaddr *)&local,sizeof(local)) == SOCKET_ERROR)  
   {
    _itoa(WSAGetLastError(),lpLinkString,10);
    MessageBox(NULL,lpLinkString,"Error:bind",MB_ICONERROR);
    closesocket (sListen) ;
    WSACleanup() ;
    return TRUE ;
   }
   if(SOCKET_ERROR==listen(sListen,8))
   {
    _itoa(WSAGetLastError(),lpLinkString,10);
    MessageBox(NULL,lpLinkString,"Error:listen",MB_ICONERROR);
    closesocket (sListen) ;
    WSACleanup () ;
    return TRUE ;
   }
   return 0 ;
  case WM_PAINT:
   hdc = BeginPaint (hwnd, &ps) ;
   GetClientRect (hwnd, &rect) ;
   DrawText (hdc, TEXT ("Hello, Windows 98!"), -1, &rect,DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;
   EndPaint (hwnd, &ps) ;
   return 0 ;
  case WM_DESTROY:
   SetIcon("buglol",0);
   closesocket(sListen);  
   WSACleanup();
   PostQuitMessage(0);
   break;

  case UWM_SYSTRAY:
   switch (lParam)
   {
    case WM_RBUTTONUP:
     //DestroyWindow(hwnd);
     PostQuitMessage(0);
     break;

    case WM_LBUTTONUP:
     strcpy(dispalyText,"xexbugl");strcpy(dispalyTextEx,"body");
     showTips();
     break;

    case WM_LBUTTONDBLCLK:
     ShowWindow(hwnd, SW_RESTORE);
     break;
   }
   return TRUE;

 

  case WM_SOCKET_NOTIFY:
   wEvent = WSAGETSELECTEVENT (lParam);   // ie, LOWORD
   wError = WSAGETSELECTERROR (lParam);   // ie, HIWORD
   switch (wEvent)
   {
    case FD_ACCEPT:
     len = sizeof(client);
     if ((sClient=accept(sListen,(struct sockaddr *)&client,&len)) != INVALID_SOCKET)  
     {
      strcpy(dispalyTextEx,inet_ntoa(client.sin_addr));
      _itoa(ntohs(client.sin_port),lpLinkString,10);
      strcpy(dispalyText,lpLinkString);
      showTips();
     } else{
       _itoa(WSAGetLastError(),lpLinkString,10);
       MessageBox(NULL,lpLinkString,"Error:Accept",MB_ICONERROR);
     }
     break;
    case FD_READ:
     ret = recv(sClient,cMessages,DEFAULT_BUFFER,0);
     if (ret == 0)break;  
     else if (ret == SOCKET_ERROR)  
     {  
       _itoa(WSAGetLastError(),lpLinkString,10);
       MessageBox(NULL,lpLinkString,"Error:recv",MB_ICONERROR);
       break;  
     }
     cMessages[ret] = '\0';
     MessageBox(NULL,cMessages,"Your message",0);
     break;

   }

 }
 return DefWindowProc (hwnd, message, wParam, lParam) ;
}
LRESULT CALLBACK popProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
 HDC hdc,hdcMem;
 PAINTSTRUCT ps;
 static HBITMAP bitmap;
 switch( message )
 {
  case WM_CREATE:
   bitmap=(HBITMAP)LoadImage(((LPCREATESTRUCT) lParam)->hInstance,"c.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
   break;

  case WM_LBUTTONDOWN:
   
   ShowWindow(hInst,SW_SHOW);
   break;

  case WM_RBUTTONDOWN:

   ShowWindow(hInst,SW_HIDE);
   break;  
  case WM_PAINT:

   hdc=BeginPaint( hInst,&ps );
   hdcMem = CreateCompatibleDC (hdc) ;
   SelectObject (hdc,CreatePen(PS_SOLID, 3, RGB (123, 150, 198)));
   Rectangle(hdc,0,0,260,100);
   SelectObject (hdcMem, bitmap) ;
   BitBlt (hdc, 25, 25, 50, 50, hdcMem, 0, 0, SRCCOPY) ;
   TextOut(hdc, 85, 15, dispalyText, strlen(dispalyText));
   TextOut(hdc, 85, 40, dispalyTextEx, strlen(dispalyTextEx));
   DeleteDC (hdcMem) ;

   EndPaint( hInst, &ps );
   break;
  case WM_TIMER:
   KillTimer(hInst,5000);
   closeTips();
   break;
 }
 return DefWindowProc(hWnd, message, wParam, lParam);
}

浏览数(10) | 评论数(0) | 11-15 14:45
The luxury of grief  

For all his bluster, it is the sad province of Man that he cannot choose his triumph. He can only choose how he will stand when the call of destiny comes. Hoping that he'll have the courage to answer.

 

You see, I think there comes a time when a man as to ask himself whether he wants a life of happiness or a life of meaning.

 

Can't be done. Two very different paths. I mean, to be truly happy, a man must live absolutely in the present. No thought of what's gone before and no thought of what lies ahead. But a life of meaning, a man is condemned to wallow in the past and obsess about the future.

 

When a change comes, some species feel the urge to migrate.They call it zugunruhe. The pull of the soul to a far-off place. Following a scent in the wind, a star in the sky.The ancient message comes,calling the kindred to take flight and to gather together. Only then can they hope to survive the cruel season to come.

 

The earth is large. Large enough that you think you can hide from anything. From fate. From god. If only you found a place far enough away. So you run to the edge of the earth Where all is safe again,quiet and warm. The solace of salt air. The peace of danger left behind.The luxury of grief. And maybe for a moment... You believe you have escaped.

 

You can run far. You can take your small precautions. But have you really gotten away? Can you ever escape? Or is the truth that you do not have the strength or cunning to hide from destiny? What? Nothing. But the world is not small. You are. And fate can find you anywhere.

浏览数(13) | 评论数(0) | 11-13 09:17
最近好忙啊  

我想恢复原来的生活...

最近真是很迷惑....

英语很长时间没有学了...

数据结构也一样...

我喜欢C语言...

浏览数(18) | 评论数(0) | 11-07 09:13
sdk demo richediit c  

#include <winsock2.h>
#define padding 5
#define separator 10
#define roundRectHeight 8
#define topPercentOfHeight 65
#define midSeparator 20
#define sendBtnWidth 78
#pragma comment(lib,"wsock32.lib")
WNDPROC  sendEditorProc;
LRESULT CALLBACK editProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
 HWND hTop;
 char str[2000];
 switch(message)
 {
  case WM_KEYDOWN:
   hTop = GetDlgItem(GetParent(hwnd),2);
   GetWindowText(hwnd,str,2000);
   SetWindowText(hTop,str);
   if(GetKeyState(VK_SHIFT)<0)
   {
    if(wParam == VK_RETURN)
    {
     MessageBox(NULL,"TAW","TEST",0);
    }
   }
  break;
 }
 return CallWindowProc(sendEditorProc,hwnd, message, wParam, lParam) ;
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
 HDC hdc ;
 //long exStyle;
 PAINTSTRUCT ps ;
 static HWND recvFrame,recvEditor,sendFrame,sendEditor,sendBtn;
 char str[20];
 static int width,height;

 switch (message)
 {
  case WM_CREATE:
   //create receive edit
   recvEditor = CreateWindowEx (
    WS_EX_LEFT,
    TEXT ("RichEdit"),
    "vvvvvvvvvvvvv\r\ntaw",
    WS_CHILD | WS_CLIPCHILDREN | ES_WANTRETURN | ES_MULTILINE | WS_VISIBLE | ES_LEFT|WS_VSCROLL   ,//|WS_BORDER,
    0,
    0,
    0,
    0,
    hwnd,
    (HMENU) 1,
    ((LPCREATESTRUCT) lParam) -> hInstance,
    NULL
   ) ;

   sendEditor = CreateWindowEx (
    WS_EX_LEFT,
    TEXT ("RichEdit"),
    "sos",
    WS_CHILD | WS_CLIPCHILDREN | ES_WANTRETURN | ES_MULTILINE | WS_VISIBLE | ES_LEFT|WS_VSCROLL,//|WS_BORDER ,
    20,
    30,
    470,
    160,
    hwnd,
    (HMENU) 2,
    ((LPCREATESTRUCT) lParam) -> hInstance,
    NULL
   ) ;
   sendBtn = CreateWindow(
    TEXT("button"),
    "Send",
    WS_CHILD | WS_VISIBLE |BS_DEFPUSHBUTTON,
    0,
    0,
    sendBtnWidth,
    sendBtnWidth,
    hwnd,
    (HMENU) 10,
    ((LPCREATESTRUCT) lParam) -> hInstance,
    NULL
   ) ;
   
   sendEditorProc = (WNDPROC)SetWindowLong(sendEditor,GWL_WNDPROC,(LONG)editProc);
   return 0 ;
  case WM_SETFOCUS:
   SetFocus(sendEditor);
   return 0;


  case WM_PAINT:
   _itoa(width,str,10);
   //MessageBox(hwnd,str,"test",1);
   //SetWindowText(recvEditor,str);
   hdc = BeginPaint (hwnd, &ps) ;
   SelectObject (hdc,GetStockObject (WHITE_BRUSH))  ;
   SetPolyFillMode (hdc, WINDING) ;
   RoundRect(hdc, 10, 10,width - 2*padding,height - 2*padding,20,20) ;
   SelectObject (hdc,CreatePen (PS_NULL, 0, RGB (255, 0, 0)));
   
   SelectObject (hdc,GetStockObject (DKGRAY_BRUSH))  ;
   SetPolyFillMode (hdc, WINDING) ;
   Rectangle(hdc,0,(int)(height * topPercentOfHeight/100 + separator + roundRectHeight),width,(int)(height * topPercentOfHeight/100 + separator + roundRectHeight + midSeparator)) ;
   EndPaint (hwnd, &ps) ;
   return 0 ;
  case WM_SIZE:
   _itoa(HIWORD(lParam),str,10);
  // MessageBox(hwnd,str,"test",0);
   width = LOWORD(lParam);
   height = HIWORD(lParam);
   MoveWindow(
    recvEditor,
    padding + separator,
    separator + roundRectHeight,
    width - 2 * padding -2*separator,
    (int)(height * topPercentOfHeight/100),
    1
   );
   MoveWindow(
    sendEditor,
    padding + separator,
    (int)(height * topPercentOfHeight/100) + separator + roundRectHeight + midSeparator ,
    width - 2 * padding -2*separator - sendBtnWidth,
    height - separator - roundRectHeight - (int)(height * topPercentOfHeight/100)  - midSeparator - separator - roundRectHeight,
    1
   );
   MoveWindow(
    sendBtn,
    padding + separator + width - 2 * padding -2*separator - sendBtnWidth,
    (int)(height * topPercentOfHeight/100) + separator + roundRectHeight + midSeparator + 3,//3把按钮微往下调
    sendBtnWidth ,
    height - separator - roundRectHeight - (int)(height * topPercentOfHeight/100)  - midSeparator - separator - roundRectHeight,
    1
   );
   return 0;
  case   WM_COMMAND :

   

   return 0 ;


  case WM_DESTROY:
   PostQuitMessage (0) ;
   return 0 ;
 }
 return DefWindowProc (hwnd, message, wParam, lParam) ;

}

int WINAPI WinMain(
 HINSTANCE hInstance,
 HINSTANCE hPrevInstance,
 LPSTR lpCmdLine,
 int showState
){
 static TCHAR szAppName[] = TEXT ("HelloWin") ;
 HINSTANCE   hRichEdit;
 HWND   hwnd ;
 MSG    msg ;
 WNDCLASS wndclass ;
 wndclass.style = CS_HREDRAW | CS_VREDRAW ;
 wndclass.lpfnWndProc  = WndProc ;
 wndclass.cbClsExtra   = 0 ;
 wndclass.cbWndExtra   = 0 ;
 wndclass.hInstance    = hInstance ;
 wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
 wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
 wndclass.hbrBackground= (HBRUSH)(GetStockObject(DKGRAY_BRUSH));//COLOR_BTNFACE
 wndclass.lpszMenuName  = NULL ;
 wndclass.lpszClassName= szAppName ;
 if (!RegisterClass (&wndclass))
 {
  MessageBox (NULL, TEXT ("This program requires Windows NT!"),szAppName, MB_ICONERROR) ;
  return 0 ;
 }
 
 hRichEdit = LoadLibrary("RICHED32.DLL");

 hwnd = CreateWindow(
  szAppName,
  TEXT ("The Hello Program"),
  WS_OVERLAPPEDWINDOW,
  228,
  150,
  600,
  420,
  NULL,
  NULL,
  hInstance,
  NULL
 ) ;

 ShowWindow (hwnd, showState) ;
 UpdateWindow (hwnd) ;
 while (GetMessage (&msg, NULL, 0, 0))
 {
  TranslateMessage (&msg) ;
  DispatchMessage (&msg) ;
 }

 FreeLibrary(hRichEdit);
 return 0;

}

浏览数(24) | 评论数(0) | 10-26 17:08

Powered by Haiwit