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

Paddy

@Paddy
About
Posts
46
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Serial Port
    P Paddy

    Thanks for the help. For some reason I don't actually have that control in my visual studio. Think it is only with the older versions? Paddy

    C / C++ / MFC help question

  • Serial Port
    P Paddy

    Thanks for the help but I'm actually using win32, non MFC Paddy

    C / C++ / MFC help question

  • Serial Port
    P Paddy

    Thanks you were right! I changed it and it has *nearly* solved the problem, it got rid of the random 0x0D in the output file but it still won't write 0x11 and 0x13 to the file. Maybe it is that it isn't reading these values from the port? Any ideas? Thanks

    C / C++ / MFC help question

  • Serial Port
    P Paddy

    Hi hope someone can help me out here. I have a program that recieves data from the serial port of the PC and saves it into a file using: byte rec; : : : for(i=0;i<512;i++) { ReadFile(handlePort, &rec, 1, (LPDWORD)&bytes, NULL); fprintf(out, "%C", rec); } The problem is that it wont save the hex values 0x11 and 0x13 to the file when they are received from the serial port, I'm pretty sure it is because they are control characters, maybe? Also every so often it saves 0x0D to the file! Any ideas how I can get around this problem? Thanks in advance, Paddy

    C / C++ / MFC help question

  • Passing arrays to functions(Simple question)!
    P Paddy

    Thanks for the help thats exactly what I was looking for! No my compiler didn't like the double[] void Window(double data[]) attempt, ha ha! paddy

    C / C++ / MFC question data-structures help

  • Passing arrays to functions(Simple question)!
    P Paddy

    Hi, hope someone can help me out here! Is it possible to pass an array to a function? I have a double data[32768] and I want to process it in some other function but I'm not sure of the syntax used to pass the array to another function. I tried double[] void Window(double data[]) { return data[]; } but obviously that didn't work! Thanks in advance, Paddy

    C / C++ / MFC question data-structures help

  • Displaying a bitmap?
    P Paddy

    Excellent, thanks. Paddy.

    C / C++ / MFC question graphics help tutorial learning

  • Displaying a bitmap?
    P Paddy

    Thanks for the help Brian. I forgot to mention I'm not using MFC but I presume you use the same process anyway? 1) Create temporary DC 2) Select new bitmap into it 3) BitBlt from temp into controlDC Or is it different do you know? Paddy

    C / C++ / MFC question graphics help tutorial learning

  • Displaying a bitmap?
    P Paddy

    Hope some one can help me out here. What is the simplest way to display a bitmap in your client area? For example if I have created a bitmap with the resource editor eg IDB_BITMAP. How would I bitblt this to my client area? Thanks in advance, Paddy

    C / C++ / MFC question graphics help tutorial learning

  • Toolbar question!
    P Paddy

    Thanks for the help, So if I have a button on my toolbar IDT_BUTTON1, I can put in a Case IDT_BUTTON1: in my main WndProc and it should work? Paddy

    C / C++ / MFC question

  • Toolbar question!
    P Paddy

    Can anybody please tell me what message is sent from a toolbar control to the main window when a button is clicked on a toolbar? Thanks in advance, Paddy

    C / C++ / MFC question

  • ListBox Question (non-MFC)
    P Paddy

    I understand what you are saying, they are not the same thing but for this particular case changing the background colour will work fine for me. Thanks, Paddy.

    C / C++ / MFC question c++

  • ListBox Question (non-MFC)
    P Paddy

    Thanks that exactly what I was looking for. I knew there was some simple way of doing it but I didn't know what to look for! Paddy.

    C / C++ / MFC question c++

  • ListBox Question (non-MFC)
    P Paddy

    I have created a List box using CreateWindow in my app's client area. Is there any way I can make the background of my list box transparent so that it is the same color as the background of my main window? Thanks in advance, Paddy.

    C / C++ / MFC question c++

  • Dialog Box Question
    P Paddy

    Thanks for the help. It's non-MFC I'm using. Does this mean that my main window can't do anything until EndDialog is called? Paddy

    C / C++ / MFC question announcement

  • Dialog Box Question
    P Paddy

    When a modal dialog box is closed using EndDialog does it's parent window recieve a message to notify it that the dialog has closed? I want to update some info in my status bar as soon as the dialog is closed. Thanks in advance, Paddy

    C / C++ / MFC question announcement

  • Status Bar
    P Paddy

    Thanks for the help, I was calling InitCommonControls() but I forgot to include the WS_VISIBLE flag when I was creating the status bar!

    C / C++ / MFC wpf data-structures help question

  • Status Bar
    P Paddy

    Hi, Hope someone can help me out here please. I'm trying to create a status bar in my app so I added the function: // DoCreateStatusBar - creates a status bar and divides it into // the specified number of parts. // Returns the handle to the status bar. // hwndParent - parent window for the status bar. // nStatusID - child window identifier. // hinst - handle to the application instance. // nParts - number of parts into which to divide the status bar. HWND DoCreateStatusBar(HWND hwndParent, int nStatusID, HINSTANCE hinst, int nParts) { HWND hwndStatus; RECT rcClient; HLOCAL hloc; LPINT lpParts; int i, nWidth; // Ensure that the common control DLL is loaded. InitCommonControls(); // Create the status bar. hwndStatus = CreateWindowEx( 0, // no extended styles STATUSCLASSNAME, // name of status bar class (LPCTSTR) NULL, // no text when first created SBARS_SIZEGRIP | // includes a sizing grip WS_CHILD, // creates a child window 0, 0, 0, 0, // ignores size and position hwndParent, // handle to parent window (HMENU) nStatusID, // child window identifier hinst, // handle to application instance NULL); // no window creation data // Get the coordinates of the parent window's client area. GetClientRect(hwndParent, &rcClient); // Allocate an array for holding the right edge coordinates. hloc = LocalAlloc(LHND, sizeof(int) * nParts); lpParts = (LPINT)LocalLock(hloc); // Calculate the right edge coordinate for each part, and // copy the coordinates to the array. nWidth = rcClient.right / nParts; for (i = 0; i < nParts; i++) { lpParts[i] = nWidth; nWidth += nWidth; } // Tell the status bar to create the window parts. SendMessage(hwndStatus, SB_SETPARTS, (WPARAM) nParts, (LPARAM) lpParts); // Free the array, and return. LocalUnlock(hloc); LocalFree(hloc); return hwndStatus; } Which I got from MSDN. Then in my wndproc case: WM_CREATE I put in: statusbar = DoCreateStatusBar(hwnd, ID_STATUSBAR, hInst, 4); Everything compiles fine but unfortunately I don't get a status bar, is there some message I have to send it to make it display itself?

    C / C++ / MFC wpf data-structures help question

  • Help with Tracking Tooltips
    P Paddy

    Hi, Hope someone can help me out here. I'm trying to add a tracking tooltip to my app, so I got the required code from the vS help files and then added it to my code. So basically I have: HWND WINAPI CreateTT(HWND hwndOwner) { // Code for creating tool tip } in my wndproc I added case WM_MOUSEMOVE: if(g_bIsVisible){ #define X_OFFSET 15 #define Y_OFFSET X_OFFSET GetCursorPos(&point); SendMessage(g_hwndTT, TTM_TRACKPOSITION, 0, (LPARAM)MAKELPARAM(point.x + X_OFFSET, point.y + Y_OFFSET)); } return 0; I then added to my CASE WM_CREATE: g_hwndTT = CreateTT(hwnd); When I compile my app I get a "Run-Time Check Failure #3 - The variable 'g_hwndTT' is being used without being defined." whenever I move the mouse. I don't understand why I get this error when I'm defining g_hwndTT using g_hwndTT = CreateTT(hwnd); I'm sure it is something simple I'm missing. Any help appreciated, Thanks in advance, Paddy.

    C / C++ / MFC help visual-studio

  • List Box(simple Question)
    P Paddy

    Thanks Dave, For some reason I can't add any member variables, the "variables" menu item is grayed out when I right click on a control in the dialog editor! It's ok coz I found an easier way of doing it using: SendDlgItemMessage(hDlg, ID_MYLIST, LB_ADDSTRING, 0, (LPARAM)"Hi there!"); Thanks for the help, Paddy.

    C / C++ / MFC question tutorial
  • Login

  • Don't have an account? Register

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