about.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. #ifndef _ABOUT_H_
  2. #define _ABOUT_H_
  3. #include <math.h>
  4. #pragma warning(disable : 4731)
  5. static HWND about_hwnd;
  6. #ifndef NO_ABOUT_EGG
  7. #define BITMAP_W 100
  8. #define BITMAP_H 64
  9. static HDC m_hdc;
  10. static HBITMAP m_hbm;
  11. static char *m_dib;
  12. static char ge_fbuf[(BITMAP_H+1)*BITMAP_W+1];
  13. static int ge_tmp;
  14. #define M_NUM_FX 9
  15. static int m_effect;
  16. #define BLOBS_NPOINTS 8
  17. static int BLOBPOINTS[4*BLOBS_NPOINTS];
  18. static int fire_textcnt,fire_textpos;
  19. static char *fire_texts[]={
  20. "nsvplay",
  21. "Nullsoft 2003-8",
  22. "",
  23. "greets to",
  24. "winamp forums",
  25. "#nullsoft",
  26. "britney spears",
  27. "p.s.",
  28. "DrO was here",
  29. " <3",
  30. "",
  31. };
  32. static HDC scrolldc;
  33. static HBITMAP scrollbitmap;
  34. static char *scrolldib;
  35. static const char scrolltext[]="nullsoft presents you nSVpLAY hidden part! cracked by rOn +5 trainer by deadbeef ";
  36. static int scrolloffs;
  37. static char *rototmp;
  38. #endif //NO_ABOUT_EGG
  39. static INT_PTR CALLBACK aboutProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam)
  40. {
  41. switch (uMsg)
  42. {
  43. case WM_INITDIALOG:
  44. #ifndef NO_ABOUT_EGG
  45. {
  46. HBITMAP about_bmp = NULL;
  47. m_effect=M_NUM_FX-1;
  48. // try to use the localised image and then revert to the normal dll image
  49. about_bmp = (HBITMAP)LoadImage((HINSTANCE)lParam,MAKEINTRESOURCE(IDB_BITMAP1),IMAGE_BITMAP,0,0,LR_SHARED);
  50. if(about_bmp == NULL){
  51. about_bmp = (HBITMAP)LoadImage(g_hInstance,MAKEINTRESOURCE(IDB_BITMAP1),IMAGE_BITMAP,0,0,LR_SHARED);
  52. }
  53. // set on control with id of -1 (0xFFFFFFFF) or 0xFFFF (not sure how/why this happened)
  54. SendDlgItemMessage(hwndDlg,0xFFFF,STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)about_bmp);
  55. SendDlgItemMessage(hwndDlg,-1,STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)about_bmp);
  56. }
  57. #endif
  58. SetDlgItemText(hwndDlg,IDC_VERSION,WNDMENU_CAPTION);
  59. break;
  60. case WM_COMMAND:
  61. switch (LOWORD(wParam))
  62. {
  63. case IDCANCEL:
  64. case IDOK:
  65. #ifndef MODAL_ABOUT
  66. DestroyWindow(hwndDlg);
  67. #else
  68. EndDialog(hwndDlg,1);
  69. #endif
  70. return FALSE;
  71. }
  72. break;
  73. case WM_DESTROY:
  74. about_hwnd=NULL;
  75. #ifndef NO_ABOUT_EGG
  76. if (m_hbm) DeleteObject(m_hbm);
  77. if (m_hdc) DeleteDC(m_hdc);
  78. if (scrollbitmap) DeleteObject(scrollbitmap);
  79. if (scrolldc) DeleteDC(scrolldc);
  80. m_hbm=0;
  81. m_hdc=0;
  82. scrollbitmap=0;
  83. scrolldc=0;
  84. if (rototmp) free(rototmp);
  85. rototmp=NULL;
  86. #endif
  87. break;
  88. #ifndef NO_ABOUT_EGG
  89. case WM_LBUTTONDBLCLK :
  90. //easter eggs :)
  91. if (++m_effect >= M_NUM_FX) m_effect=1;
  92. KillTimer(hwndDlg,0x1234);
  93. if (m_hbm) DeleteObject(m_hbm);
  94. if (m_hdc) DeleteDC(m_hdc);
  95. if (scrollbitmap) DeleteObject(scrollbitmap);
  96. if (scrolldc) DeleteDC(scrolldc);
  97. scrollbitmap=0;
  98. scrolldc=0;
  99. if (rototmp) free(rototmp);
  100. rototmp=NULL;
  101. {
  102. struct
  103. {
  104. BITMAPINFO bmi;
  105. RGBQUAD more_bmiColors[256];
  106. LPVOID data;
  107. } m_bitmap;
  108. m_hdc = CreateCompatibleDC(NULL);
  109. m_bitmap.bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
  110. m_bitmap.bmi.bmiHeader.biPlanes = 1;
  111. m_bitmap.bmi.bmiHeader.biBitCount = 8;
  112. m_bitmap.bmi.bmiHeader.biCompression = BI_RGB;
  113. m_bitmap.bmi.bmiHeader.biSizeImage = 0;
  114. m_bitmap.bmi.bmiHeader.biClrUsed = 256;
  115. m_bitmap.bmi.bmiHeader.biClrImportant = 256;
  116. m_bitmap.bmi.bmiHeader.biWidth = BITMAP_W;
  117. m_bitmap.bmi.bmiHeader.biHeight = -BITMAP_H;
  118. m_bitmap.bmi.bmiHeader.biSizeImage = BITMAP_W*BITMAP_H;
  119. memset(ge_fbuf,0,BITMAP_W*(BITMAP_H+1));
  120. fire_textcnt=0;
  121. if (m_effect < 3)
  122. {
  123. unsigned char *t=(unsigned char *)m_bitmap.bmi.bmiColors;
  124. int x=255;
  125. int adj=!!m_effect;
  126. t[0]=t[1]=t[2]=0;
  127. t+=4;
  128. while (x)
  129. {
  130. if (m_effect == 2)
  131. {
  132. if (x > 128)
  133. {
  134. t[0]=0;
  135. t[1]=((256-x)*2)/3;
  136. t[2]=(256-x)*2;
  137. }
  138. else
  139. {
  140. t[0]=256-x*2;
  141. t[1]=255/3 + ((256-x)*2)/3;
  142. t[2]=255;
  143. }
  144. }
  145. else
  146. {
  147. int a=x*2;
  148. if (a>255) a=255;
  149. t[0]=a;
  150. t[2-adj]=a;
  151. a+=a;
  152. if (a > 255) a=255;
  153. t[1+adj]=a;
  154. }
  155. t+=4;
  156. x--;
  157. }
  158. }
  159. if(m_effect==0)
  160. {
  161. //sine scroll
  162. struct
  163. {
  164. BITMAPINFO bmi;
  165. RGBQUAD more_bmiColors[1];
  166. LPVOID data;
  167. } m_bitmap;
  168. scrolldc = CreateCompatibleDC(NULL);
  169. m_bitmap.bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
  170. m_bitmap.bmi.bmiHeader.biPlanes = 1;
  171. m_bitmap.bmi.bmiHeader.biBitCount = 8;
  172. m_bitmap.bmi.bmiHeader.biCompression = BI_RGB;
  173. m_bitmap.bmi.bmiHeader.biSizeImage = 0;
  174. m_bitmap.bmi.bmiHeader.biClrUsed = 1;
  175. m_bitmap.bmi.bmiHeader.biClrImportant = 1;
  176. m_bitmap.bmi.bmiHeader.biWidth = 128;
  177. m_bitmap.bmi.bmiHeader.biHeight = -32;
  178. m_bitmap.bmi.bmiHeader.biSizeImage = 128*32;
  179. scrollbitmap = CreateDIBSection(scrolldc,&m_bitmap.bmi,DIB_RGB_COLORS, &m_bitmap.data, NULL, 0);
  180. SelectObject(scrolldc,scrollbitmap);
  181. SetBkMode(scrolldc,TRANSPARENT);
  182. scrolldib = (char *)m_bitmap.data;
  183. scrolloffs = 0;
  184. }
  185. if (m_effect == 1)
  186. {
  187. int *t=BLOBPOINTS;
  188. int a=BLOBS_NPOINTS;
  189. while (a)
  190. {
  191. t[0]=(rand()&127) - 64;
  192. t[2]=(rand()&127) - 64;
  193. t[1]=t[3]=a;
  194. t+=4;
  195. a--;
  196. }
  197. }
  198. if((m_effect >= 3 && m_effect <= 8)) //rotozooms
  199. {
  200. rototmp=(char *)malloc(65536+256);
  201. //generate noise texture
  202. memset(rototmp,0xd0,65536+256);
  203. __asm
  204. {
  205. mov cx,0ffffh
  206. xor ax,ax
  207. xor ebx,ebx
  208. xor dx,dx
  209. mov edi,[rototmp]
  210. TEXGEN:
  211. mov bx,cx
  212. add ax,cx
  213. rol ax,cl
  214. mov dh,al
  215. sar dh,5
  216. adc dl,dh
  217. adc dl,[edi+ebx+255]
  218. shr dl,1
  219. mov [edi+ebx],dl
  220. not bh
  221. mov [edi+ebx],dl
  222. loop TEXGEN
  223. }
  224. if ((!!(GetAsyncKeyState(VK_SHIFT)&0x8000)) ^ (m_effect==5)) // secondary easter egg, hah!
  225. for (int x = 0; x < 256*256; x ++) rototmp[x] = 0x40 + ((x^(x>>8)) & 0x1F);
  226. rototmp[0]=rototmp[1];
  227. rototmp[0xff00]=rototmp[0xff01];
  228. //generate palette
  229. unsigned char *t=((unsigned char *)(&m_bitmap.bmi.bmiColors[0x40]));
  230. for(int i=0;i<0x20;i++)
  231. {
  232. int r,g,b;
  233. switch(m_effect)
  234. {
  235. case 3: r=i*4; g=i*5; b=i*8; break;
  236. case 4: r=i*4; g=i*7; b=i*8; break;
  237. case 5: r=i*8; g=i*2; b=i*2; break;
  238. case 6: r=i*6; g=i*8; b=i*6; break;
  239. case 7: r=i*8; g=i*6; b=i*8; break;
  240. case 8: r=i*6; g=i*6; b=i*8; break;
  241. }
  242. t[0]=b;
  243. t[1]=g;
  244. t[2]=r;
  245. t+=4;
  246. }
  247. }
  248. m_hbm = CreateDIBSection(m_hdc,&m_bitmap.bmi,DIB_RGB_COLORS, &m_bitmap.data, NULL, 0);
  249. SelectObject(m_hdc,m_hbm);
  250. m_dib = (char *)m_bitmap.data;
  251. SetTimer(hwndDlg,0x1234,35,NULL);
  252. }
  253. break;
  254. case WM_TIMER:
  255. {
  256. int nomemcpy=0;
  257. static float inc=0;
  258. inc++;
  259. if (m_effect == 0) // oldsk00l sine scroll
  260. {
  261. double blah=3.14/BITMAP_W;
  262. double val1=1;
  263. double val2=(BITMAP_H-16)/2;
  264. static double vinc=0;
  265. __asm
  266. {
  267. mov edi, offset ge_fbuf
  268. mov ecx, BITMAP_W*BITMAP_H
  269. xor eax, eax
  270. rep stosb
  271. }
  272. for(int j=0;j<8;j++) {
  273. for(int k=0;k<16;k++) {
  274. int col=255-k*(256/16);
  275. if(col<128) col=128+(128-col);
  276. memset(ge_fbuf+(k+(int)((BITMAP_H-16)*(cos(vinc+(j*8)*3.14/50)+1)/2))*BITMAP_W,col,BITMAP_W);
  277. }
  278. }
  279. __asm
  280. {
  281. mov edi, offset ge_fbuf
  282. mov ecx, 0
  283. mov esi, dword ptr [scrolldib]
  284. SINELOOP:
  285. mov [ge_tmp], ecx
  286. fild dword ptr [ge_tmp]
  287. fmul qword ptr [blah]
  288. fadd qword ptr [vinc]
  289. fcos
  290. fadd qword ptr [val1]
  291. fmul qword ptr [val2]
  292. fistp dword ptr [ge_tmp]
  293. mov eax, [ge_tmp]
  294. mov ebx, eax
  295. mov edx, BITMAP_W
  296. mul edx
  297. mov dh, bl
  298. push ecx
  299. mov ebx, 0
  300. mov ecx, 16
  301. SINELOOP2:
  302. cmp byte ptr [esi+ebx],0
  303. je SINECONT
  304. mov dl,0ffh
  305. sub dl,dh
  306. sub dl,cl
  307. mov [edi+eax], dl
  308. SINECONT:
  309. add eax, BITMAP_W
  310. add ebx, 128
  311. loop SINELOOP2
  312. pop ecx
  313. inc esi
  314. inc edi
  315. inc ecx
  316. cmp ecx, BITMAP_W
  317. jl SINELOOP
  318. mov edi, [scrolldib]
  319. mov esi, edi
  320. inc esi
  321. mov ebx, 32
  322. SINESCROLL:
  323. mov ecx, 127
  324. rep movsb
  325. inc edi
  326. inc esi
  327. dec ebx
  328. jnz SINESCROLL
  329. }
  330. vinc+=0.2;
  331. scrolloffs++;
  332. if((scrolloffs&7)==7)
  333. {
  334. int o=scrolloffs/8;
  335. if(!scrolltext[o]) scrolloffs=0;
  336. else TextOutA(scrolldc,100,0,&scrolltext[o],1);
  337. }
  338. }
  339. else if (m_effect == 1) // blobs
  340. {
  341. int *blobptr=BLOBPOINTS;
  342. int i=BLOBS_NPOINTS*2;
  343. while (i--)
  344. {
  345. if (blobptr[0] > 0) blobptr[1]--;
  346. else blobptr[1]++;
  347. int a=blobptr[1];
  348. if (rand()&1) a++;
  349. else a--;
  350. blobptr[0]+=a/8;
  351. blobptr+=2;
  352. }
  353. int y=BITMAP_H;
  354. unsigned char *p=(unsigned char *)ge_fbuf;
  355. while (y--)
  356. {
  357. int x=BITMAP_W;
  358. while (x--)
  359. {
  360. blobptr=BLOBPOINTS;
  361. i=BLOBS_NPOINTS;
  362. double sum=0.0;
  363. while (i--)
  364. {
  365. double as=(x-(BITMAP_W/2)) - blobptr[0];
  366. double bs=(y-(BITMAP_H/2)) - blobptr[2];
  367. sum+=sqrt(as*as + bs*bs);
  368. blobptr+=4;
  369. }
  370. sum *= 6.0/BLOBS_NPOINTS;
  371. int a=(int)sum;
  372. if (a > 0xff) a= 0xff;
  373. *p++=a;
  374. }
  375. }
  376. }
  377. else if(m_effect==2) //gayfire
  378. {
  379. unsigned char *p=(unsigned char *)ge_fbuf;
  380. int x;
  381. unsigned char *t=p + BITMAP_W*BITMAP_H;
  382. for (x = 0; x < BITMAP_W; x ++)
  383. {
  384. int a=*t - 10;
  385. if ((rand()&0x7) == 7) a+=100;
  386. if (a < 0) a=0;
  387. else if (a > 192) a=192;
  388. *t++=a;//rand()&0xf0;
  389. }
  390. int y;
  391. for (y = 0; y < BITMAP_H; y ++)
  392. {
  393. *p++=p[0]/4 + p[BITMAP_W]/2 + p[BITMAP_W+1]/4;
  394. for (x = 1; x < BITMAP_W-1; x ++)
  395. *p++=p[0]/4 + p[BITMAP_W]/4 + p[BITMAP_W-1]/4 + p[BITMAP_W+1]/4;
  396. *p++=p[0]/4 + p[BITMAP_W]/2 + p[BITMAP_W-1]/4;
  397. }
  398. if (fire_textcnt-- <= 0)
  399. {
  400. memcpy(m_dib,ge_fbuf,BITMAP_W*BITMAP_H);
  401. SetBkMode(m_hdc,TRANSPARENT);
  402. SetTextColor(m_hdc,RGB(255,255,255));
  403. RECT r={0,0,BITMAP_W,BITMAP_H};
  404. DrawTextA(m_hdc,fire_texts[fire_textpos%(sizeof(fire_texts)/sizeof(fire_texts[0]))],-1,&r,DT_CENTER|DT_VCENTER|DT_SINGLELINE);
  405. if (fire_textcnt < -30)
  406. {
  407. memcpy(ge_fbuf,m_dib,BITMAP_W*BITMAP_H);
  408. fire_textpos++;
  409. fire_textcnt=30;
  410. }
  411. else nomemcpy=1;
  412. }
  413. }
  414. else if (m_effect == 3) //rotozoom
  415. {
  416. char *p=ge_fbuf;
  417. static float angle=0;
  418. for(int j=-32;j<32;j++)
  419. for(int i=-50;i<50;i++)
  420. {
  421. //rotozoom
  422. double x=(i*cosf(angle)-j*sinf(angle))*(2+cosf(angle*1.4f));
  423. double y=(i*sinf(angle)+j*cosf(angle))*(2+cosf(angle*1.4f));
  424. //slime
  425. x+=cos(angle*x)*4;
  426. y+=sin(angle*y)*4;
  427. int x2=(int)x & 0xff;
  428. int y2=(int)y & 0xff;
  429. *p++=rototmp[256*y2+x2];
  430. }
  431. angle+=0.01f;
  432. }
  433. else if (m_effect == 4) //rotozoom 2
  434. {
  435. char *p=ge_fbuf;
  436. double angle=cos(inc*0.01f)*2;
  437. for(int j=-32;j<32;j++)
  438. for(int i=-50;i<50;i++)
  439. {
  440. //position
  441. double x=i-cos(inc*0.013f)*64;
  442. double y=j+sin(inc*0.013f)*64;
  443. //slime
  444. x+=cos((angle+i)*50)*cos(angle)*4;
  445. y+=sin((angle+j)*50)*cos(angle)*4;
  446. //rotozoom
  447. double x3=(x*cos(angle)-y*sin(angle))*(2+cos(angle*1.4f));
  448. double y3=(x*sin(angle)+y*cos(angle))*(2+cos(angle*1.4f));
  449. int x2=(int)x3 & 0xff;
  450. int y2=(int)y3 & 0xff;
  451. *p++=rototmp[256*y2+x2];
  452. }
  453. }
  454. else if (m_effect == 5) //3d rotozoom
  455. {
  456. char *p=ge_fbuf;
  457. static float angle=0;
  458. const double b=50;
  459. for(int j=-32;j<32;j++)
  460. for(int i=-50;i<50;i++)
  461. {
  462. //rotozoom
  463. double x=(i*cos(angle)+j*sin(angle));//*(2+cos(angle*1.4f));
  464. double y=(i*sin(angle)-j*cos(angle));//*(2+cos(angle*1.4f));
  465. //gay z-projection
  466. x*=b/(((double)j+32));
  467. y*=b/(((double)j+32));
  468. //position
  469. x-=cos(inc*0.013f)*64;
  470. y+=sin(inc*0.013f)*64;
  471. int x2=(int)x & 0xff;
  472. int y2=(int)y & 0xff;
  473. char c=rototmp[256*y2+x2];
  474. *p++=0x40+((c-0x40)*(j+32)/56);
  475. }
  476. angle+=0.01f;
  477. //b++;
  478. }
  479. else if (m_effect == 6) //tunnel
  480. {
  481. const double TINYNUM=1.0E-6;
  482. const double CONE_RADIUS=128;
  483. const double FOV=120.0;
  484. #define sqr(a) ((a)*(a))
  485. char *p=ge_fbuf;
  486. for(int y=-32;y<32;y++)
  487. for(int x=-50;x<50;x++)
  488. {
  489. double originx=cos(inc*0.025f)*20;
  490. double originy=sin(inc*0.04f)*20;
  491. double originz=inc*4;
  492. double dirx=x/FOV;
  493. double diry=y/FOV;
  494. double dirz=1;
  495. //normalize dir vector
  496. {
  497. double l=1.0f/sqrt(sqr(dirx)+sqr(diry)+sqr(dirz));
  498. dirx*=l;
  499. diry*=l;
  500. dirz*=l;
  501. }
  502. //y-axis rotation
  503. {
  504. double rot=inc*0.015f;
  505. double dirx2=dirx*cos(rot)+dirz*sin(rot);
  506. dirz=dirx*sin(rot)-dirz*cos(rot);
  507. dirx=dirx2;
  508. }
  509. //tunnel algo shit
  510. double a=sqr(dirx)+sqr(diry);
  511. double b=2*(originx*dirx + originy*diry);
  512. double c=sqr(originx)+sqr(originy)-sqr(CONE_RADIUS);
  513. double delta=sqrt(sqr(b)-(4*a*c));
  514. double t1=(-b+delta)/(2*a+TINYNUM);
  515. double t2=(-b-delta)/(2*a+TINYNUM);
  516. double t=t1>0?t1:t2;
  517. double intx=originx+dirx*t;
  518. double inty=originy+diry*t;
  519. double intz=originz+dirz*t;
  520. //tex. coords
  521. int u=(int)(fabs(intz)*0.6);
  522. int v=(int)(fabs(atan2(inty,intx)*256/3.14159265));
  523. //depth
  524. t=20000.0/t;
  525. int z=(int)(t>63?63:t);
  526. u&=0xff;
  527. v&=0xff;
  528. z&=0xff;
  529. {
  530. char c=rototmp[256*u+v];
  531. *p++=0x40+((c-0x40)*z/64);
  532. }
  533. }
  534. }
  535. else if(m_effect==7) //washing machine
  536. {
  537. char *p=ge_fbuf;
  538. for(int j=-32;j<32;j++)
  539. for(int i=-50;i<50;i++)
  540. {
  541. double dist=sqrt(double(sqr(i)+sqr(j))); // pythagoras rules :)
  542. double angle=cos(dist*0.05f)*(cos(inc*0.1f)) + inc*0.07f;
  543. //rotozoom
  544. double x=(i*cos(angle)-j*sin(angle));
  545. double y=(i*sin(angle)+j*cos(angle));
  546. int x2=(int)x & 0xff;
  547. int y2=(int)y & 0xff;
  548. *p++=rototmp[256*y2+x2];
  549. }
  550. }
  551. else if(m_effect==8) //reflection-like(?) effect
  552. {
  553. char *p=ge_fbuf;
  554. for(int j=-32;j<32;j++)
  555. for(int i=-50;i<50;i++)
  556. {
  557. double dist=sqrt(double(sqr(i)+sqr(j)));
  558. double zoom=cos(dist*0.05f)*(cos(inc*0.02f)*8)+1;
  559. //rotozoom
  560. double x=i*zoom+inc;
  561. double y=j*zoom+inc;
  562. int x2=(int)x & 0xff;
  563. int y2=(int)y & 0xff;
  564. *p++=rototmp[256*x2+y2];
  565. }
  566. }
  567. if (!nomemcpy) memcpy(m_dib,ge_fbuf,BITMAP_W*BITMAP_H);
  568. if (hwndDlg != NULL)
  569. {
  570. HDC h = GetDC(hwndDlg);
  571. BitBlt(h, 11, 11, BITMAP_W, BITMAP_H, m_hdc, 0, 0, SRCCOPY);
  572. ReleaseDC(hwndDlg, h);
  573. }
  574. }
  575. break;
  576. #endif
  577. }
  578. return 0;
  579. }
  580. static void do_about(HWND hwnd, HINSTANCE hinst) {
  581. #ifndef MODAL_ABOUT
  582. if(about_hwnd) {
  583. SetForegroundWindow(about_hwnd);
  584. return;
  585. }
  586. about_hwnd=CreateDialogParam((!hinst?g_hInstance:hinst),MAKEINTRESOURCE(IDD_ABOUT),hwnd,aboutProc,(LPARAM)hinst);
  587. ShowWindow(about_hwnd,SW_SHOW);
  588. #else
  589. #ifdef LOC_MODAL_ABOUT
  590. WASABI_API_DIALOGBOXPARAMW(IDD_ABOUT,hwnd,aboutProc,(LPARAM)hinst);
  591. #else
  592. DialogBoxParam((!hinst?g_hInstance:hinst),MAKEINTRESOURCE(IDD_ABOUT),hwnd,aboutProc,(LPARAM)hinst);
  593. #endif
  594. #endif
  595. }
  596. #endif//_ABOUT_H_