|
|
|
[求助]c++新手,怎么利用vc编一个最简单的软件,带界面的
说mfc的都是俗手,而不是熟手。 |
|
[分享]简短有趣的一个C程序
这种算有创意的话,那创意真是“'\\','|','/','-'”满天飞了。 |
|
[求助]C++大牛进
“小生练武有段时间了,老感觉心里不踏实,请少林方丈指点,比如着重点啦,拜谢” |
|
|
|
|
|
|
|
[求助]一段简单的汇编代码
取差值,作为地址偏移量。 |
|
[求助]一段简单的汇编代码
比较全局变量是否等于函数参数 |
|
用VC6.0写的SetTimer不成功收不到WM_TIMER消息??
SetTimer的时候hTraviaWnd=0 不如放在 case IDC_BUTTON1: hTraviaWnd = FindWindow(NULL, "Travia"); 后面 case IDC_BUTTON1: hTraviaWnd = FindWindow(NULL, "Travia"); SetTimer(hTraviaWnd, Timer, 1000, NULL); |
|
[原创]从最小的LoadPic开始(IPICTURE接口)。。
继续增加: 5:命令行支持: p=GetCommandLine(); if(*p=='"') { do { p++; } while(*p!='"'); } do { p++; } while((*p!='\0')&&(*p!=' ')); p--; do { p++; } while(*p==' '); if(*p=='"') { q=p; p++; *q=' '; do { q++; } while(*q!='"'); *q='\0'; } if(*p!='\0') { LoadPictureFile(p); } 6:添加图标 选用acdsee32经典图标 有了以上2步,可以文件关联了: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.JPG] @="JPGFile" [HKEY_CLASSES_ROOT\JPGFile] @="JPG Image File" [HKEY_CLASSES_ROOT\JPGFile\DefaultIcon] @="LoadPic.exe,1" [HKEY_CLASSES_ROOT\JPGFile\Shell] @="Open" [HKEY_CLASSES_ROOT\JPGFile\Shell\Open\Command] @="LoadPic.exe %l" 替代系统的jpg文件浏览器,效果如何? 编译后大小:4.90k(5024字节) 源码下载: LoadPic.zip |
|
[原创]Delphi编写的LPK.DLL专杀,可清理RAR
没有暂停,停止,中止是个问题。 |
|
|
|
[原创]从最小的LoadPic开始(IPICTURE接口)。。
增加以下功能: 1:启动画面不用默认,使用黑色背景,400*300大小,居中显示 wndclass.hbrBackground = (HBRUSH)(GetStockObject (BLACK_BRUSH)); dl=(GetSystemMetrics(SM_CXFULLSCREEN)-400)/2; dt=(GetSystemMetrics(SM_CYFULLSCREEN)-300)/2; dx=400; dy=300; hWnd = CreateWindow ("MyWindowClass","LoadPic", WS_MAXIMIZEBOX|WS_MINIMIZEBOX|WS_SYSMENU|WS_SIZEBOX, dl,dt,dx,dy,NULL,NULL,hInstance,NULL); 2:支持拖放 DragAcceptFiles(hWnd,TRUE); if (!GetOpenFileName(&ofn)) { break; } case WM_DROPFILES: if(message==WM_DROPFILES) { DragQueryFile((HDROP)wParam, 0, szFileName, 255); } LoadPictureFile(szFileName); break; 3:全图显示 sx=SrcX; sy=SrcY; dx=GetSystemMetrics(SM_CXFULLSCREEN); dy=GetSystemMetrics(SM_CYFULLSCREEN); while((sx>dx)&&(sy>dy)) { sx=sx>>1; sy=sy>>1; } dl=-4; dt=-4; if(dx>sx) { dl=(dx-sx-8)>>1; dx= sx; } if(dy>sy) { dt=(dy-sy)>>1; dy=sy; } dx=dx+8; dy=dy+27; EndDeferWindowPos(DeferWindowPos(BeginDeferWindowPos(1),hWnd,HWND_TOP,dl,dt,dx,dy,SWP_NOZORDER)); gpPicture->Render(hDC, 0, 0, sx, sy, 0, hmHeight, hmWidth, -hmHeight, NULL); 4:窗口大小限制 case WM_GETMINMAXINFO: ((LPMINMAXINFO)lParam)->ptMaxPosition.x=dl; ((LPMINMAXINFO)lParam)->ptMaxPosition.y=dt; ((LPMINMAXINFO)lParam)->ptMaxSize.x=dx; ((LPMINMAXINFO)lParam)->ptMaxSize.y=dy; ((LPMINMAXINFO)lParam)->ptMaxTrackSize.x=dx; ((LPMINMAXINFO)lParam)->ptMaxTrackSize.y=dy; break; 显示效果图: 编译后大小:2688字节 下载: LoadPic.zip |
|
|
|
[原创]从最小的LoadPic开始(IPICTURE接口)。。
几点说明: 1:link选项: /entry:"WinMain" /align:16 2: 用CreateWindow,不用CreateWindowEx 3:消息循环: while (GetMessage(&msg, NULL, 0, 0)) { DispatchMessage(&msg); } 配合 case WM_DESTROY: ExitProcess(0); 4:用OleLoadPicturePath,不用OleLoadPicture 5:目录单斜杠\转双斜杠\\: i=0; j=0; do { szPath[j]=point[i]; if(szPath[j]=='\\') { j++; szPath[j]='\\'; } i++; j++; }while(point[i-1]!='\0'); |
|
[求助][求助]win32asm编写程序中RichEdit无法显示?
是程序界面无法显示还是richedit中的内容无法显示? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值