随笔分类 -  VC/MFC/QT

摘要:好东西。。。 http://pan.baidu.com/s/1BtZ4s 阅读全文
posted @ 2017-08-27 17:03 Dsp Tian 阅读(577) 评论(0) 推荐(0)
摘要:1.下载安装mingw32 2.将mingw下bin和msys\1.0下bin设置为系统path 3.启动msys.bat 4.cd到项目目录 5.输入./configure 6.输入make 7.输入make install 8.cd C:\MinGW\msys\1.0\local\lib 9.a 阅读全文
posted @ 2017-08-27 17:03 Dsp Tian 阅读(3726) 评论(0) 推荐(0)
摘要:#include #include #include #include #include class MyApp : public wxApp { public: virtual bool OnInit(); void OnAddText(wxThreadEvent &event); wxGauge *g; }; class MyThread : publ... 阅读全文
posted @ 2017-08-27 17:02 Dsp Tian 阅读(1623) 评论(0) 推荐(0)
摘要:库的核心是FIBITMAP数据结构,里面包含像素和exif等信息。 得到图像格式函数FREE_IMAGE_FORMST fif=FreeImage_GetFileType(filename); 读图像函数FIBITMAP *dib=FreeImage_Load(fif,filename,0); 写图 阅读全文
posted @ 2017-08-27 17:02 Dsp Tian 阅读(3797) 评论(0) 推荐(0)
摘要:EVT_LEFT_DOWN(func) 用来处理wxEVT_LEFT_DOWN事件, 在鼠标左键按下的时候产生. EVT_LEFT_UP(func) 用来处理wxEVT_LEFT_UP事件, 在鼠标左键被释放的时候产生. EVT_LEFT_DCLICK(func) 用来处理wxEVT_LEFT_DC 阅读全文
posted @ 2017-08-27 17:01 Dsp Tian 阅读(1706) 评论(0) 推荐(0)
摘要:#include "MainFrame.h" BEGIN_EVENT_TABLE(MyFrame,wxFrame) EVT_MENU(wxID_FILE,MyFrame::OnMenuEvt) END_EVENT_TABLE() MyFrame::MyFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title) ... 阅读全文
posted @ 2017-08-27 17:01 Dsp Tian 阅读(705) 评论(0) 推荐(0)
摘要:http://docs.wxwidgets.org/trunk/classwx_u_i_action_simulator.html 阅读全文
posted @ 2017-08-27 17:00 Dsp Tian 阅读(394) 评论(0) 推荐(0)
摘要:#include #include #include void main( void ) { /* Check for existence */ if( (_access( "D:\\a.txt", 0 )) != -1 ) { printf( "File ACCESS.C exists\n" ); /* Check for write p... 阅读全文
posted @ 2017-08-27 16:59 Dsp Tian 阅读(1861) 评论(0) 推荐(0)
摘要:#include #include class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ int max = 500; wxFrame* f... 阅读全文
posted @ 2017-08-27 16:58 Dsp Tian 阅读(973) 评论(0) 推荐(0)
摘要:现在计算机的cpu一般都是多核的,而很多程序都没有进行多核优化,这就没有办法充分利用cpu的性能了。比如用vs2010中写一个while(1)循环,在旧电脑上cpu运行是占100%的,而在新的4核电脑上运行则只占25%,似乎没办法再高了。很多地方说用openmp可以发挥多核处理的能力,不过我在程序中... 阅读全文
posted @ 2014-08-02 12:51 Dsp Tian 阅读(2742) 评论(2) 推荐(0)
摘要:做图像处理,最耗时间的运算应该就是卷积运算那一步了。以后如果有机会在用c++做图像处理的项目的话,那么这个卷积部分还是要优化的。Matlab因为是验证算法,其实是没必要优化的。所以我就把卷积这一部分单独列出一个函数,用汇编实现了。我可是电子工程出身,汇编当然不在话下。 函数是用汇编写的,用的是c++内嵌asm汇编,相同功能的c++代码也实现了,不过注释掉了,去掉注释能得到相同的结果。 读和显示图像用了opencv函数库,话说上一个项目结束之后好像就没怎么用过这个库了,毕竟,单单调用库中的函数是没办法真正理解原理的。#include <iostream>#include " 阅读全文
posted @ 2012-11-28 21:39 Dsp Tian 阅读(3607) 评论(0) 推荐(0)
摘要:#include <iostream>#include <windows.h>int main(int argc, char* argv[]){ char VolumeInfo[100]; DWORD VolNameSize=100; DWORD VolSerialNumber; DWORD VolMaxComponentLength; DWORD VolFileSystemFlags; char FileSystemNameBuffer[100]; DWORD F... 阅读全文
posted @ 2012-05-21 20:22 Dsp Tian 阅读(768) 评论(0) 推荐(0)
摘要:#include <windows.h>#include <process.h> /* _beginthread, _endthread */#include <iostream>#include <fstream>#include <string>using namespace std;ofstream out("out.txt");void ThreadFunc1(PVOID param){ while(1) { char *p; p=(char *) param; Sleep(10); out<< 阅读全文
posted @ 2012-04-27 15:41 Dsp Tian 阅读(1481) 评论(0) 推荐(0)
摘要:send.cpp:#include <WinSock2.h>#include <stdio.h>#include <Windows.h>#pragma comment(lib,"ws2_32.lib")int main(){ unsigned long ip; ip=inet_addr("127.0.0.1"); short port; port=8000; printf("Connecting to 127.0.0.1:8000...."); WSADATA wsa; if (WSAStartup 阅读全文
posted @ 2012-04-20 18:28 Dsp Tian 阅读(4184) 评论(0) 推荐(0)
摘要:#include <Windows.h>#include <tchar.h>#include "resource.h"TCHAR DlgName[]=TEXT("MyDialog");TCHAR AppName[]=TEXT("Dialog");;//TCHAR TestString[]=TEXT("hello world");TCHAR buffer1[512];TCHAR buffer2[512];TCHAR *buffer3=NULL;int a=0,b=0,c=0;HINSTANCE 阅读全文
posted @ 2012-03-16 16:20 Dsp Tian 阅读(1697) 评论(0) 推荐(0)
摘要:#include <windows.h>LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ static TCHAR szAppName[] = TEXT ("HelloWin") ; HWND hwnd ; MSG msg ; WNDCLASS wc ; wc.sty... 阅读全文
posted @ 2012-03-15 13:03 Dsp Tian 阅读(739) 评论(0) 推荐(0)
摘要:#include "windows.h"int WINAPI WinMain(HINSTANCE HInstance,HINSTANCE hPrevInstance,PSTR szCmdLine,int CmdShow){ MessageBox(NULL,TEXT("hello world"),TEXT("sdk"),0); return 0;} 阅读全文
posted @ 2012-03-15 12:42 Dsp Tian 阅读(584) 评论(0) 推荐(0)
摘要:#include <iostream>using namespace std;#include <Windows.h>#include "MSR_NuiApi.h"//#include "highgui.h"int main(int argc,char **argv){// IplImage *im 阅读全文
posted @ 2012-03-14 20:53 Dsp Tian 阅读(1071) 评论(0) 推荐(0)
摘要:lianDlg.cpp#include "lmain.h"void ClianDlg::OnBnClickedButton1(){ // TODO: 在此添加控件通知处理程序代码 CWinThread *m_edit; m_edit=AfxBeginThread(lmain,&(m_hWnd),THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED,NULL); m_edit->m_bAutoDelete=TRUE; m_edit->ResumeThread();}lmain.hUINT lmain(LPVOID lpPara 阅读全文
posted @ 2012-01-19 13:26 Dsp Tian 阅读(835) 评论(0) 推荐(0)
摘要:trayDlg.h:afx_msg LRESULT onShowTask(WPARAM wParam,LPARAM lParam);void Tdehide();void dehide();trayDlg.cpp:#define WM_SHOWTASK WM_USERBEGIN_MESSAGE_MAP(CtrayDlg, CDialogEx) ON_MESSAGE(WM_SHOWTASK,onShowTask)END_MESSAGE_MAP()void CtrayDlg::OnBnClickedButton1(){ // TODO: 在此添加控件通知处理程序代码 dehide... 阅读全文
posted @ 2011-10-22 16:06 Dsp Tian 阅读(551) 评论(0) 推荐(0)