摘要:HWNDm_hWndParent;BOOLm_fullscreen;voidCDialog::SwitchFullScreen(void){LONGstyle=::GetWindowLong(this->m_hWnd,GWL_STYLE);if(m_fullscreen==false){//隐藏系统任务栏CWnd*wnd=FindWindow("Shell_TrayWnd",NULL);wnd->SetWindowPos(NULL,0,0,0,0,SWP_HIDEWINDOW);m_hWndParent=::GetParent(m_hWnd);:
阅读全文
随笔分类 - C/C++
摘要:#include"qt_xsp.h"#include<iostream>#ifdef__cplusplusextern"C"{#endifHRESULTexternWINAPIWFPCancelAsyncRequest(HSERVICEhService,REQUESTIDRequestID){returnWFS_SUCCESS;}HRESULTexternWINAPIWFPClose(HSERVICEhService,HWNDhWnd,REQUESTIDReqID){returnWFS_SUCCESS;}HRESULTexternWINAPI
阅读全文
摘要:发送消息DELPHI代码 View Code 1//VCUnicode项目2var3wData:String;4h:HWND;5cds:TCopyDataStruct;6begin7wData:='1234567890'+Chr(0);8cds.dwData:=0;9cds.cbData:=Length(wData);10cds.lpData:=PWideChar(wData);11SendMessage(h,WM_COPYDATA,0,LongWord(@cds));12end1314//非VCUnicode项目15var16wData:WideString;17h:HWND
阅读全文
摘要:项目为Unicode字字符集,调用inet_addr错误信息inet_addr cannot convert parameter1 from CString to const char*代码修改如下通过:serverip="192.168.0.9";charcip[30]wcstombs(cip,serverip,serverip.GetLength()*2);unsignedlongip=ntohl(inet_addr(cip))参考:wcstombs wcstombs - 将宽字符转换成多字符头文件:#include <stdlib.h>原型size_t w
阅读全文