首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <graphics.h>
#include <conio.h>
#include<mmsystem.h>
#pragma comment(lib,"winmm.lib")
void ShowPlate();
void PlayGame();
bool flag=true;
int arr[16][16];
void main()
{
    mciSendString("play 高山流水.mp3",0,0,0);
initgraph(680,680);     //划定屏幕大小为680  680
......................
阅读全部 | 单纯的小孩 贴于 2013年6月3日 16:45     hide bbsi
'近日有本论坛网友问:DataGridView如何实现列标头带数据筛选功能,就象Excel高级筛选功能一样
'今晚正好闲着没事,加之以前也没用到过这个需求,所以就写了个模拟功能,供各位坛友酌情参考。
'VB.NET 2008 环境
'新建一个项目后,只需在Form1中拉一个DataGridView,一个ComboBox,然后将下面代码复制粘贴即可,其它什么也不用做

Public Class Form1
    Dim SelectedCol As Integer = 0, IsFindit As Boolean = True
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataGridView1.ColumnCount = 6
        DataGridView1.Rows.Add(10)
        DataGridView1.AllowUserToAddRows = False
        For i As Integer = 0 To Me.DataGridView1.Columns.Count - 1
......................
阅读全部 | 不说也罢 贴于 2013年5月31日 20:02     hide bbsi
//为啥输出的结果不是10\n100\n1000\n.......
#include <stdio.h>
#include <math.h>
int main()
{ long  m,i;

for(i=1;i<=10;i++){
m=(int)pow(10,i);
printf("%d\n",m);
}
  system("pause");
}
阅读全部 | 很无知 贴于 2013年5月30日 21:06     hide bbsi
MFC摄像头图像捕捉求高手指点
我用MFC做一个视频聊天软件 调用摄像头的时候 在 capSetCallbackOnVideoStream(m_hWndVideo, EncodeCallback); 的EncodeCallback 回调函数中 要怎么去获取图像信息了  
这个是回调函数
LRESULT CALLBACK EncodeCallback(HWND hWnd, LPVIDEOHDR lpVHdr)
{
    CServerDlg *vidcap=(CServerDlg *)capGetUserData(hWnd);
//    lpVHdr->dwBytesUsed; lpVHdr->lpData
//    return 1;
    if (lpVHdr->dwFlags&VHDR_DONE)
    {
        static BOOL bSend = TRUE;
        CServerDlg* pDlg = (CServerDlg*)AfxGetMainWnd();
......................
阅读全部 | yangyin54321 贴于 2013年5月24日 20:19     hide bbsi
#include<stdio.h>
void main()
{
int r[],R[],i,j,k,n,R,I;
scanf("%d%d",&n,&k);
for(i=0;n!=0;i++)
    {
        r[i]=n%k;
        n=(n-r[i])/k;
    }

if(n==0) I=i;
......................
阅读全部 | chenzepeng 贴于 2013年5月23日 18:07     hide bbsi
Dim x1, x2
Private Function f(a, b, fun) 'x()初值,目标函数多项式
   x1 = a
   x2 = b
   f = fun
End Function

Private Sub Command1_Click()
   Label1.Caption = f(2, 2, x1 ^ 2 + 2 * x1 * x2 + x2 ^ 2)
End Sub
阅读全部 | 东方淑通 贴于 2013年5月21日 20:43     hide bbsi
#include<iostream>
#include<string>
using namespace std;
class Document
{
public:
Document(){};
~Document();
Document(char *name);
char *Name;
void PrintNameOf();
};
......................
阅读全部 | 新手多多帮助 贴于 2013年5月21日 11:01     hide bbsi
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
void main()
{
int h,m,s,a,b;
for(h=00;h<24;h++)
{
for(m=00;m<60;m++)
{
for(s=00;s<60;s++)
{
......................
阅读全部 | 《挑灯看书》 贴于 2013年5月19日 16:05     hide bbsi
#include<stdio.h>
#include<time.h>
long Fib_rec(int n)
{
  if(n==0||n==1)return(1);
  else return(Fib_rec(n-1)+Fib_rec(n-2));
}
long Fib_ite(int n)
{
  long fib1,fib2,fib;
  int i;
  fib=1;
......................
阅读全部 | fightingaaa 贴于 2013年5月17日 19:52     hide bbsi
Function sum%(b%())
 Dim i%
 For i = LBound(b) To UBound(b)
  If b(i) < 0 Then
     sum = sum + b(i)
  End If
 Next i
End Function
Private Sub Form_Click()
 Dim a%(10), s%, i%
 For i = 1 To 10
     a(i) = Int(Rnd * 100) - 50
......................
阅读全部 | 无__dao 贴于 2013年5月17日 14:53     hide bbsi
上一页 249 250 251 252 253 254 255 256 257 258 下一页