Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Aizaz

@Aizaz
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • form background bitmap
    A Aizaz

    try setting the background brush of the dialog box by usning the setclasslong method use GCL_HBRBACKGROUND as the index in the api.

    C / C++ / MFC graphics help

  • OLE
    A Aizaz

    Hi i am trying to use ole Ipicture interface to load pictures of different formats but the OleloadPicturePath method fails. What i am doing is given below. any help would be appreciated and a lot of thanks in advance. void * CMap::OpenGraphics(char * name) { IPicture *Ipic = NULL; SIZE metric,pixel; const int H_METRIC_PER_INCH = 2540; HDC hdcScreen =GetDC(NULL); HRESULT hr; int SxpixPerInc = GetDeviceCaps(hdcScreen,LOGPIXELSX); int SypixPerInc = GetDeviceCaps(hdcScreen,LOGPIXELSX); unsigned short OlePathName[512]; ReleaseDC(NULL,hdcScreen); mbstowcs(OlePathName,name,23); char s[10]; MessageBox(NULL,itoa(int(OlePathName),s,10),"OLE",MB_OK); hr = OleLoadPicturePath(OlePathName,NULL,0,0,IID_IPicture,(void **)(Ipic)); if(hr) { MessageBox(NULL,"ERROR WHILE LOADING PIC PATH","",MB_OK); return 0; } if(Ipic) { Ipic->get_Height(&metric.cy); Ipic->get_Width(&metric.cx); pixel.cx = (SxpixPerInc*metric.cx + H_METRIC_PER_INCH/2)/H_METRIC_PER_INCH; pixel.cy = (SypixPerInc*metric.cy + H_METRIC_PER_INCH/2)/H_METRIC_PER_INCH; ImageInfo.Ipic = Ipic; ImageInfo.pixel = pixel; ImageInfo.metric=metric; ImageInfo.path = name; return Ipic; } return 0; }

    C / C++ / MFC help com

  • OLE
    A Aizaz

    i am using OLE IPicture interface to load images but i am having troublr with the foolowing line of code "OleLoadPicturePath(OlePathName,NULL,0,0,&IID_IPicture,(void *)(&Ipic));" when i try to compile it the compile genertes a type casting error for parameter 5. i think i am using the correct syntax. Can any one tell me what the problem is. Aizaz

    C / C++ / MFC help com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups