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
P

Parthi_Appu

@Parthi_Appu
About
Posts
237
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to fix Static contol width at run time?
    P Parthi_Appu

    Le@rner wrote:

    rcText.right = min(rcText.right, sizeText.cx);

    try this for the above statement,

    rcText.right = rcText.left + sizeText.cx

    and try to avoid using unwanted temporary variables, you can simply have as below,

    CRect rcLabel;
    m_label.GetWindowRect(rcLabel); //get screen co-ordinate for static ctrl
    rcLabel.right = rcLabel.left + sizeText.cx; //increase/decrease the rect width
    ScreenToClient(rcLabel); // convert screen co-ordinate to client co-ordinate
    m_label.MoveWindow(rcLabel); //move the static ctrl to new position


    Do your Duty and Don't Worry about the Result

    C / C++ / MFC help css tutorial question

  • error c2071: illegal storage class
    P Parthi_Appu

    First regarding error C2660, who have used the MFC version of SetDlgItemText, which is a wrapper for Win32 API. If your function is a member of dialog class then the handle to the dialog is passes as a first param. So to get rid of C2660 pass the handle of the dialog as first param and then pass the next two params. And regarding C2664 the declaration is incorrect. Your callback function should return void with calling convention as CV_CDECL (or equivalent basic calling conevention, check this in your code)


    Do your Duty and Don't Worry about the Result

    C / C++ / MFC help c++

  • How to add Message for dynamically created control(CListCtrl)
    P Parthi_Appu

    Simply you cannot have some random IDs for your control but you can have some range of IDs that can be used dynamically, Say from 1001(IDC_MYLIST_START) to 1101 (IDC_MYLIST_END) and use any of this IDs for you list control and make sure you did not have more than one list with the same ID in a given time. For this you have to use ON_NOTIFY_RANGE macro and your message map entry will look like,

    ON_NOTIFY_RANGE(NM_CLICK, IDC_MYLIST_START, IDC_MYLIST_END, OnMyListClick)

    And you message handler will be,

    VOID OnMyListClick(UINT id, NMHDR * pNotifyStruct, LRESULT * result)

    The variable "id" will have the list control ID which has been clicked.


    Do your Duty and Don't expect the Result

    C / C++ / MFC help tutorial

  • How to implement WebSocket Client in C
    P Parthi_Appu

    Thanks for the reponses.. guess i'm not clear with my question.. I'm clear about the WinSocket APIs.. just need to know the WebSocket Handshake details.. I got the below header from Wikipedia & i want to know what are all the things are variable values in this header?

    GET /demo HTTP/1.1
    Upgrade: WebSocket
    Connection: Upgrade
    Host: example.com
    Origin: http://example.com
    Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5
    Sec-WebSocket-Key2: 12998 5 Y3 1 .P00

    ^n:ds[4U

    As far as i know the /demo in first line, Host & Origin will change.. but exactly what will be the values? Will the values of Key1, Key2 & the last 8 byte values also change? I have to hit the server which has the format as ws://xxx.xxx.xxx.xxx:8181/websock Also is it possible to send any extra information in the above handshake header? if so what will be its format? Thanks Again.


    Do your Duty and Don't expect the Result

    C / C++ / MFC sysadmin tutorial

  • How to implement WebSocket Client in C
    P Parthi_Appu

    Thanks for the reply.. but i'm not looking for normal Socket implementation. Any way i got little help here http://en.wikipedia.org/wiki/WebSockets[^]


    Do your Duty and Don't expect the Result

    C / C++ / MFC sysadmin tutorial

  • How to implement WebSocket Client in C
    P Parthi_Appu

    Hi All, I have to hit a WebSocket server and have to maintain the connection alive. Please share some article about implementing a WebSocket Client application in C. Thanks All.


    Do your Duty and Don't expect the Result

    C / C++ / MFC sysadmin tutorial

  • update structure in a vector of structures
    P Parthi_Appu

    Hi, If the interger values are going to be unique then you can go for,

    std::map<int, struct S>


    Do your Duty and Don't expect the Result

    C / C++ / MFC tutorial question graphics docker announcement

  • Draw Using Graphics object from Window Handle
    P Parthi_Appu

    I hope the window you are finding is not the foreground window? Is that correct? Here is the reason, even though we get separate DC for each window, keep it in mind that the screen space is shared by all the windows. So if you try to get the DC of window which is not in foreground and when we paint it other than in WM_PAINT cycle then it'll be painted on the shared screen space. This is why you are seeing the bitmap image at top of all the windows and not in the found window.


    Do your Duty and Don't expect the Result

    C / C++ / MFC graphics question

  • How to convert Time Zone
    P Parthi_Appu

    Hi All, I want to know an API which can convert time in certain time zone to GMT/UTC. Not the API which will use local system time zone to convert to GMT. My input time may be in EST, CST, etc... And I know the time zone of the time object I have, so I need an API which can convert this time to GMT. I came across below API but I'm not sure about how to use it, mainly the first paramater. SystemTimeToTzSpecificLocalTime Thanks


    Do your Duty and Don't expect the Result

    C / C++ / MFC json tutorial

  • How to use GDI+ 1.1?
    P Parthi_Appu

    Hi Iain, Thanx for the info. Actually i have to develope a simple photo editing tool. so i was looking for the APIs in GDI+ and i found some of them interesting, unfortunatly they are of version 1.1 :~


    Do your Duty and Don't expect the Result

    C / C++ / MFC

  • How to use GDI+ 1.1?
    P Parthi_Appu

    Hi All, Is there a way we can startup the GDI+ 1.1 version? If so what changes are required to use GDI+ 1.1? Thanx.


    Do your Duty and Don't expect the Result

    C / C++ / MFC

  • Is there an API to return parent directory
    P Parthi_Appu

    thanx.. i'm looking for this API..


    Do your Duty and Don't expect the Result

    C / C++ / MFC json

  • Is there an API to return parent directory
    P Parthi_Appu

    Hi All, Say if i give, C:\\Level 1\\Level 2\\abc.txt, the return value i'm expecting is C:\\Level 1\\Level 2. Is there an API to return the parent directory from the given path, something like PathFindFileName API, or we should extract on our own. Thanx.


    Do your Duty and Don't expect the Result

    C / C++ / MFC json

  • copy CString value to char
    P Parthi_Appu

    To add with Maxwell's answer, In your code you used 'char' and not 'char*'.. Try using as Maxwell said or you can allocate memory at runtime with the lenght of CString object and copy the string (but don't forget to release/delete the memory allocated)


    Do your Duty and Don't expect the Result

    C / C++ / MFC help tutorial

  • MoveWindow
    P Parthi_Appu

    RisKhan wrote:

    i create a window which show irregular shape draw in OnPaint

    If you paint irregular shapes in OnPaint, its not meaning that you are making the window shape irregular. The window will be rectangle. To make your window irregular in shape you have create a region of the shape you wanted and use

    SetWindowRgn(..)

    This will slove your problem.. Hope this'll help you..


    Do your Duty and Don't expect the Result

    C / C++ / MFC help tutorial

  • where to find NM_CUSTOMDRAW in VS2005
    P Parthi_Appu

    You won't get WM_CUSTOMDRAW message for all the controls.. and also to customize the control you have to derive your own control class from the control base class


    Do your Duty and Don't expect the Result

    C / C++ / MFC tutorial question

  • bitblt problem
    P Parthi_Appu

    Tommaso Maggioli wrote:

    BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC,

    How your are selecting the bitmap in pSrcDC and in which DC you are coping?.. It will be clear if you post your code little bit...


    Do your Duty and Don't expect the Result

    C / C++ / MFC help c++ graphics question

  • How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc.
    P Parthi_Appu

    Before going into your question, GetWindowRect(..) will return the window rect with respect to screen cooridates. GetClientRect(..) will return the client area of the window, that is regardless of its position the top left point is 0, 0 and right, bottom point is its width and height respectivly Now for Question 1: You got the screen coordinate of OK button, now you have to find its coordinate with respect to the dialog and not with the listbox. For Question 2: As i said earlier, if you use GetClientRect(..), simply it will return width and height. By knowing only the width and height you can't find its starting (top,left) coordinate.


    Do your Duty and Don't expect the Result

    C / C++ / MFC c++ tutorial question

  • Resizing the dialog box controls
    P Parthi_Appu

    You should have a message handler for WM_SIZE message in your CDialog class. While resizing, the handler will be called with the dialog's width and height value. Deciside where to place your controls with respect to the size. To position the controls you can use

    SetWindowPos(...)
    or
    MoveWindow(...)


    Do your Duty and Don't expect the Result

    C / C++ / MFC c++ tutorial

  • socket programming
    P Parthi_Appu

    laggraw wrote:

    on reciever end some unwanted data(ìÿ¼³W|l) it is also appending in the correct data

    Set the receiving buffer to zero or append a null('\0') charecter at the end the receiving data. the end can be found out by the return value of the recv function. Hope it will help you..


    Do your Duty and Don't expect the Result

    C / C++ / MFC csharp visual-studio 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