解决方案:10分
解决方案:10分
解决方案:10分
在本ID眼里,写几行到几十万行代码实现某个功能和用WinExec(“外部命令行工具.exe 命令行参数 …”,SW_HIDE);调用外部命令行工具实现同样功能没有本质区别。
解决方案:10分
在PowerPoint 2003中开始记录宏,手动完成所需功能,结束记录宏,按Alt+F11键,查看刚才记录的宏对应的VBA代码。
仅供参考:
仅供参考:
public sub InTurn() dim p as integer dim i as integer dim n as integer n=ActivePresentation.Slides.Count for i=1 to n debug.print ActivePresentation.Slides(i).SlideShowTransition.EntryEffect next end sub
解决方案:20分
http://dag.wiee.rs/home-made/unoconv/
解决方案:10分
## First converts your presentation to PDF
unoconv -f pdf presentation.ppt
## Then convert your PDF to jpg
convert presentation.pdf presentation_%03d.jpg
unoconv -f pdf presentation.ppt
## Then convert your PDF to jpg
convert presentation.pdf presentation_%03d.jpg
解决方案:10分
解决方案:10分
说到流,参考下面:
#pragma comment(lib,"user32")
#pragma comment(lib,"gdi32")
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <conio.h>
#include <windows.h>
#include <atlimage.h>
#include <objidl.h>
void DrawPic(HDC hdc,char *buf,int len) {
HGLOBAL hMem=GlobalAlloc(GMEM_FIXED,len);
BYTE* pMem=(BYTE*)GlobalLock(hMem);
memcpy(pMem,buf,len);
IStream* pStream;
HRESULT hr=CreateStreamOnHGlobal(pMem,FALSE,&pStream);
CImage img;
img.Load(pStream);
img.Draw(hdc,CPoint(0,0));
img.Destroy();
pStream->Release();
GlobalUnlock(hMem);
GlobalFree(hMem);
}
//HWND WINAPI GetConsoleWindow();
void HideTheCursor() {
CONSOLE_CURSOR_INFO cciCursor;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleCursorInfo(hStdOut, &cciCursor)) {
cciCursor.bVisible = FALSE;
SetConsoleCursorInfo(hStdOut, &cciCursor);
}
}
void ShowTheCursor() {
CONSOLE_CURSOR_INFO cciCursor;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleCursorInfo(hStdOut, &cciCursor)) {
cciCursor.bVisible = TRUE;
SetConsoleCursorInfo(hStdOut, &cciCursor);
}
}
int main() {
HWND hwnd;
HDC hdc;
HFONT hfont;
HBITMAP hbm;
HDC hdcBits;
BITMAP bm;
system("color F0");
system("cls");
HideTheCursor();
hwnd = GetConsoleWindow();
hdc = GetDC(hwnd);
hfont = CreateFont(48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "华文楷体");
SelectObject(hdc,hfont);
TextOut(hdc,10,10,"这是泡泡",8);
DeleteObject(hfont);
hbm=(HBITMAP)LoadImage(0,"C:\Windows\Soap Bubbles.bmp",IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
if (hbm) {
hdcBits = CreateCompatibleDC(hdc);
GetObject (hbm, sizeof(BITMAP), &bm);
SelectObject(hdcBits,hbm);
BitBlt(hdc,200,10,bm.bmWidth, bm.bmHeight,hdcBits,0,0,SRCCOPY);
DeleteDC(hdcBits);
DeleteObject(hbm);
}
getch();
FILE *f;
f=fopen("c:\new\tmp.jpg","rb");
if (f) {
int fl=filelength(fileno(f));
char *buf=(char *)malloc(fl);
if (buf) {
fread(buf,fl,1,f);
}
fclose(f);
if (buf) {
DrawPic(hdc,buf,fl);
free(buf);
}
}
ReleaseDC(hwnd,hdc);
getch();
system("color 07");
system("cls");
ShowTheCursor();
return 0;
}