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
N

nc3b

@nc3b
About
Posts
57
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Get text from the focused control in another window
    N nc3b

    Thank you!

    C / C++ / MFC help tutorial question

  • Get text from the focused control in another window
    N nc3b

    And then "hwndFocus" will contain the hwnd of the curently focused control? Thanks!

    C / C++ / MFC help tutorial question

  • Get text from the focused control in another window
    N nc3b

    Can you please give an example? Suppose I have a HWND of a window (GetForegroundWindow()) and wnat to get it's focused child. How would I do that? Thank you.

    C / C++ / MFC help tutorial question

  • Get text from the focused control in another window
    N nc3b

    Yes, it's in a different program.

    C / C++ / MFC help tutorial question

  • Get text from the focused control in another window
    N nc3b

    Hello. I have the hwnd of another window and I am trying to get the text. I know how to get text from another window (WM_GETTEXT) but I don't know hot to get the text from the currently focused control in that window. Unfortunately GetFocus() won't work so I am out of ideas.. I would even try using EnumChildWindows, but I don't know how to find out if a particular control is focused. Can anybody help? Thank you in advance.

    C / C++ / MFC help tutorial question

  • error in file 38592
    N nc3b

    You don't need to plug another hard disk in to recover the files on the old one. Come on. You just need a nice linux based live cd. Slax[^] is great for the job and it has a nice and easy gui. And it requires no install whatsoever, it'a a live cd. Check it out :) Cheers.

    System Admin help

  • Problem with getting string from bytes
    N nc3b

    I might as well archive the project and attach it :laugh: But anyways. I don't mind:)private System.Byte[] buffer=new Byte[1024]; private void SetupReceiveCallback(Socket _sock) { AsyncCallback receive=new AsyncCallback(OnReceive); _sock.BeginReceive(buffer,0,buffer.Length,SocketFlags.None,receive,_sock); } private void OnReceive(IAsyncResult result) { try { Socket _sock=(Socket)result.AsyncState; int stop=_sock.EndReceive(result); String str=System.Text.Encoding.ASCII.GetString(buffer,0,stop); MessageBox.Show(str); process(buffer,stop); SetupReceiveCallback(_sock); } catch { MessageBox.Show("Out"); this.Close(); } }
    So? :laugh:

    C# help csharp sysadmin question

  • Problem with getting string from bytes
    N nc3b

    The thing is that it's a lot of code.. Anyways, let's see... :) The BeginReceive sock.BeginReceive(buffer,0,buffer.Length,SocketFlags.None,receive,_sock); The EndReceive int stop=_sock.EndReceive(result); Is it not correct? :confused:

    C# help csharp sysadmin question

  • Problem with getting string from bytes
    N nc3b

    But I already showed more than enough. Since I am able to transmit messages between the server and the client THERE IS NO PROBLEM HERE. Anyway, the server uses fprintf and the client uses BeginReceive - EndReceive (IAsync bla bla). The problem is the way I am handling the array of bytes coming from the server. I suspect EndReceive thinks that a 0 means \0 (as in end of string). So it stops there. I don't know why this happens..

    C# help csharp sysadmin question

  • Problem with getting string from bytes
    N nc3b

    Okay then. Here is the server memcpy(msg,&type,1); memcpy(msg+1,&nr,1); memcpy(msg+2,&online,1); memcpy(msg+3,&p,sizeof(p)); type is 2, nr is 4 online is 0 and p is "Hello world". And on the client I get some unrecognizable characters (those squares you sometimes get). BUT, when online is 1 the string stays in one piece.. What am I supposed to make of this?

    C# help csharp sysadmin question

  • Problem with getting string from bytes
    N nc3b

    Ok here is the problem. I am developing a server in C and a client in C#. The server send streams of data to the client, and the client is responsible for decoding and interpreting these stream. So, if I send a simple "Hello world" from the server to the client, it works. If I send a byte representing an integer (I use memcpy) I can decode it in the client. But, the problems start when after some integers, I also put a string. If I put 2 bytes, each representing some number, I am still able to decode the string that follows using: System.Text.Encoding.ASCII.GetString(buffer,2,length) But if I say 3 bytes, and then the string, I don't get anything (yes, I said buffer,3,length to reflect the server changes), I get garbage.. Can anyone please help me? Thank you.

    C# help csharp sysadmin question

  • OleDB Image
    N nc3b

    I did it. Just omit the first 78 bytes from the file. After this wonderful solution, I believe I won't let anyone persuade me again into writing aspx. Why I don't like aspx.

    ASP.NET database tutorial question

  • OleDB Image
    N nc3b

    I looked into the source again and I tried Response.OutputStream.Write(imagedata,78,1000); But now mozilla doesn't say the immage cannot be displayed, it just doesn't print it.

    ASP.NET database tutorial question

  • OleDB Image
    N nc3b

    There isn't, and more, I say response.Clear(); before BinaryWrite()

    ASP.NET database tutorial question

  • OleDB Image
    N nc3b

    Yes, it's bmp

    ASP.NET database tutorial question

  • OleDB Image
    N nc3b

    Oh come on guys, do I ask that much? I'm sure you know, it's not hard, it's just that I get a picture that "cannot be displayed" and when I look inside (with mozilla) I see /���� ���!�ÿÿÿÿBitmap Image�Paint.Picture���������PBrush����������Õ�BMöÔ�� and more stuff just like that. What am I doing wrong? OleDbCommand command=new OleDbCommand("SELECT imagine FROM produse WHERE produse.cod_produs=10",dbconn); Byte[] imagedata=(byte[])(command.ExecuteScalar()); Response.ContentType = "image/bmp"; Response.BinaryWrite(imagedata); :((

    ASP.NET database tutorial question

  • OleDB Image
    N nc3b

    Please, anybody, I need to display an image from an access database. Can you show me how? I can't seem to get any of the example I've found to work

    ASP.NET database tutorial question

  • Ms Access image
    N nc3b

    Hello. I have a ms access database (mdb) and I want to access it from asp.net, c#. I can access and display normal fields with OleDb. I need to display an image stored in the database. I have googled around a lot, but I can't seem to find something that just works. Please help me. Thank you in advance.:)

    ASP.NET csharp asp-net database help

  • Ugly error
    N nc3b

    Thank you verry much. I found out that the function runs in a new thread (or something like that) and to call a function in the main thread I would use invoke a few hours ago. Still, thank you very much, I'm so happy the program works now :D Cheers :)

    C# help lounge

  • Threading
    N nc3b

    Thank you verry much :)

    C# question help
  • Login

  • Don't have an account? Register

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