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
C

Cris

@Cris
About
Posts
118
Topics
53
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • UDP Application on Vista: Fail on sendto function
    C Cris

    I have solved the problem... removing the bind() function execution. Acording with the MSDN documentation: "The bind function is used on an unconnected socket before subsequent calls to the connect or listen functions. It is used to bind to either connection-oriented (stream) or connectionless (datagram) sockets. When a socket is created with a call to the socket function, it exists in a namespace (address family), but it has no name assigned to it. Use the bind function to establish the local association of the socket by assigning a local name to an unnamed socket." I understood that the bind function is not necessary, because I only want to send datagrams with a SOCKET to server and receive the responses by the same SOCKET, and the WSAAsyncSelect function grants the data response to the app. This is correct? Thanks, Cris.

    C / C++ / MFC help question

  • UDP Application on Vista: Fail on sendto function
    C Cris

    No, the UAC configuration is not enabled.

    C / C++ / MFC help question

  • UDP Application on Vista: Fail on sendto function
    C Cris

    This is my code: SOCKET m_maSocketOut; struct sockaddr_in m_SockAddrOut; unsigned long m_lInet; . . void init(CString strServer) { unsigned long lInet=0; memset(&m_SockAddrOut, 0, sizeof(m_SockAddrOut)); m_maSocketOut = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); m_SockAddrOut.sin_family = AF_INET; m_SockAddrOut.sin_port = htons(port); struct hostent FAR* hp = gethostbyname((char FAR *) (const char *) strServer); if (hp == NULL) { lInet = inet_addr((const char * ) strServer); if (lInet != INADDR_NONE) { validIP = TRUE; byAddress = TRUE; } } else validIP = TRUE; if (validIP) { if (byAddress) { m_SockAddrOut.sin_addr.s_addr = lInet; m_lInet = lInet; } else { m_SockAddrOut.sin_addr.s_addr = *((unsigned long far *) hp->h_addr); m_lInet = *((unsigned long far *) hp->h_addr); } if (m_maSocketOut != NULL) { bind(m_maSocketOut, (SOCKADDR*)& m_SockAddrOut, sizeof(m_SockAddrOut)); WSAAsyncSelect(m_maSocketOut, hWnd, WM_EXTERNA, FD_READ | FD_CLOSE); } } } void sendData(char szData[], int len) { int result = sendto(m_maSocketOut, (char FAR *) &szData, len, NULL, (PSOCKADDR) &m_SockAddrOut, sizeof(m_SockAddrOut)); m_SockAddrOut.sin_addr.s_addr = INADDR_ANY; if (result < 0) { int erroCode = WSAGetLastError(); //erroCode = 10022 in Windows Vista!! } } Important: This error code is only on Windows Vista, but not all instalations . I don't know which the exat situation, but I observed in Business and Ultimate version. Any idea?

    C / C++ / MFC help question

  • UDP Application on Vista: Fail on sendto function
    C Cris

    Hello, I have UDP app that works fine, except on Windows Vista. The error is WSAEINVAL (10022) on sendto function, and the package did not send :-( Anyone know this problem? Thanks, Cris.

    C / C++ / MFC help question

  • GetPrivateProfileString method: problems on Windows Vista
    C Cris

    Thats right... I have fixed my problem reseting the UAC configuration. But, why the UAC configuration cause this problem? []'s Cris.

    C / C++ / MFC help question

  • GetPrivateProfileString method: problems on Windows Vista
    C Cris

    Hello, I have a problem reading data from a INI file using GetPrivateProfileString method, only on Windows Vista. When I read from a CFG file no problem, but GetPrivateProfileString always return the default value reading a INI file located on Windows directory (C:\Windows). Anybody knows this problem? Thanks, Cris.

    C / C++ / MFC help question

  • CListCtrl::SetBkImage(): how disable the image scroll?
    C Cris

    People, any idea?

    C / C++ / MFC question

  • CListCtrl::SetBkImage(): how disable the image scroll?
    C Cris

    Hello, I have setting a background image into a ListCtrl with SetBkImage() method. But the image is showed with a scroll, like the texts in the rows. How could I disable the scroll of the background image? I hope to put the image fixed in the background of ListCtrl. Any idea? Thanks, Cris.

    C / C++ / MFC question

  • How change the menu background color?
    C Cris

    Hello, I have to find how change the menu background color (menubar and menuitems), but nothing yet. On true, I want to change my dialog based app background color (I am using SetDialogBkColor() method), but the menu (I have a menu in the dialog too) continue with the default system background color. So, I only want to change the menu background color (same color of my dialog background). Could anybody help me? Thanks, Cris.

    C / C++ / MFC help question

  • CMyMenu::DrawItem() - how change background color?
    C Cris

    Hello, Anybody have an idea? I have find in the net, but nothing found. Please take a look in this problem ;-) Thanks again, Cris.

    C / C++ / MFC question

  • CMyMenu::DrawItem() - how change background color?
    C Cris

    Hello, How could I change only the menu background color? I have subscribed the DrawItem method of CMyMenu class (derived from CMenu). Could any show me the code to do this? Thanks, Cris.

    C / C++ / MFC question

  • Skin Tool for VisualC++
    C Cris

    Thanks Paresh!! Do you know this tool? I am receving the message: " ---------------------------------------------------------------------------------------------- The evaluation version of the toolkit only supports DLL configurations. To purchase the full version (with static link support) please visit http://www.codejock.com ---------------------------------------------------------------------------------------------- c:\arquivos de programas\codejock software\mfc\xtreme toolkitpro v11.1.3 for visual studio 6.0\source\xttoolkitpro.h(222) : fatal error C1189: #error : This build configuration is not supported by the evaluation library " Can't I test before buy? []'s Cris.

    C / C++ / MFC c++ question

  • Skin Tool for VisualC++
    C Cris

    Hello, Anybody knows some skin tool to became my APP skinable? I found SkinCrafter and AppFace? Anybody knows these? Thanks, Cris.

    C / C++ / MFC c++ question

  • Choosing a printer and init printing...
    C Cris

    OK, thank you again.

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    The problem is also build a rotine for each file format.

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    It's not possible. An app cannot print a document from disc directly to printer. I should do this with the app that can read the document. :-( Thanks for your atention. []'s

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    But this file can be a .DOC file, with image included and formatted texts (bold, italic,...), then I need to build a app that the user select any file and OK. The app should send the file to a postscript printer for convert to .PS format. Can I do this, only with my app?

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    But my file can be any format, not only text file. I need to print a image too. Any other idea? []'s

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    That's right. I need to do this programatically.

    C / C++ / MFC question

  • Choosing a printer and init printing...
    C Cris

    Thanks for your help. I have a printer device and a file name on hard disc. How can start a print job passing these parameters (printer and file name)? []'s

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

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