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
S

Sprudling

@Sprudling
About
Posts
67
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Assembly problem (System.Net)
    S Sprudling

    ERROR : "The type or namespace name 'Net' does not exist in the class or namespace 'System' (are you missing an assembly reference?)" I get this error on 'using System.Net;' and I'm obviously not understanding something quite important. I've been doing console-apps in C# for a while now and I have never bumped into this assembly-stuff before. I've searched the net and MSDN without figuring this out. Please help me :-O Edit: I figured it out at last!! (At least I think so) Sprudling

    C# help csharp question

  • Trouble with button
    S Sprudling

    CreateWindowEx(0, "BUTTON", "Test", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, ...

    This creates a checkbox with the text "Test" next to it. The background color becomes the default dialog background color (light gray), however I want it to be white. (Because I have a static control surrounding some of these checkboxes and it has got the SS_WHITERECT style). And how can I get my static control to get that XP-Style look? That is, completely flat (no shadows or 3D effects) and slightly blue. Sprudling

    C / C++ / MFC question

  • How do I toggle the "password" style for an edit box?
    S Sprudling

    SendMessage(hEdit, EM_SETPASSWORDCHAR, 0, 0); // Removes the ES_PASSWORD style

    Sprudling

    C / C++ / MFC question learning

  • Click-through-able window
    S Sprudling

    I want to create a special kind of status window. A transparent window just floating somewhere on the desktop, and I want all mouseclicks to somehow be directed to the window below. In my case I only want the X in the corner to be possible to click. I know this is possible, but I can't figure it out myself. This is taken from the feature list of another app: "Transparent - You can make the desktop preview windows transparent in the form of click-through-able. This means that when you click on a desktop preview window, you're not actually clicking on the desktop preview window, but on the window under it. The only place you can click the preview window is on the header." Sprudling :~

    C / C++ / MFC

  • wait/sleep func for win32 console apps?
    S Sprudling

    I take it there is no such function, and there is no problem really except compiling takes 10 times longer when not using precompiled headers. Sprudling

    C / C++ / MFC question

  • wait/sleep func for win32 console apps?
    S Sprudling

    Does one exist without #including and using Sleep()? Sprudling

    C / C++ / MFC question

  • 'MIIM_STRING' : undeclared identifier
    S Sprudling

    For some reason neither the VC++ SP5 upgrade or the Platform SDK install managed to setup the correct include and lib directories in VC++. Sprudling

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

  • 'MIIM_STRING' : undeclared identifier
    S Sprudling

    error C2065: 'MIIM_STRING' : undeclared identifier Why am I getting this error? I didn't before, but suddenly all my system-tray projects do. I've got WindownXP and I've installed the Microsoft Platform SDK (May 2002). Is there something wrong with my VC++ settings, since MIIM_STRING should exist since Windows98 or something. I am also experiencing other weirdnesses like this: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int This error suddenly came up in one of my projects which previously compiled just fine. The param is a DLGPROC which is declared (and the definition is similar) like this: INT_PTR CALLBACK ConfigDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); This is correct according to the Platform SDK Documentation. INT_PTR is a long obviously but DialogBoxParamA wants it to be an int. What's up?! And I'm sure there are other things; I haven't bothered opening up all my old projects just to check... Please help me. I'm desperate :confused: :confused: :confused: Sprudling

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

  • ON_UPDATE_COMMAND_UI and CDialog's
    S Sprudling

    Thank you VERY much :rose: This actually solves it quite elegant :suss: I like that :-D Sprudling :wtf: :-O

    C / C++ / MFC c++ algorithms help tutorial question

  • ON_UPDATE_COMMAND_UI and CDialog's
    S Sprudling

    I have an MFC dialog based app, and ON_UPDATE_COMMAND_UI just doesn't work. For some reason ON_UPDATE_COMMAND_UI is sent when I actually choose the menu-option (Rather when the menu drops down). After asking around and searching the net it seems like this is a known problem, but I haven't been able to find any good info on why and/or how to make it work. Is there someone here who can? Sprudling ;)

    C / C++ / MFC c++ algorithms help tutorial question

  • CSocket in MFC Console app
    S Sprudling

    I can't see how it needs a window? The class basicly works, and I can use it to send and recieve perfectly, but the OnEvent()-functions just doesn't get called by the MFC framework. Do I need a message loop or anything to make it do so? If this isn't possible, how can I check if there is data ready to be recieved, without halting the program if there isn't any? Sprudling

    C / C++ / MFC c++ help

  • CSocket in MFC Console app
    S Sprudling

    I created a console app supporting MFC to create a small IRC bot. However I can't get my CSocket-derived class to work properly. The AfxSocketInit() call is successful, and so is CMySocket::Create() and CMySocket::Connect(). Using classwizard I overloaded the OnRecieve member to let me know when there is something to recieve. I've done all this in a regular Win32 MFC app before, and it worked as it should. In this console app however it (CMySocket::OnRecieve()) just doesn't get called. I know there is data to recieve because when I call it myself there is. I'm really stuck here... :confused: Sprudling

    C / C++ / MFC c++ help

  • CArray problem
    S Sprudling

    Instead of returning a CArray (which is impossible no matter what you do since it's a template class; but that's another story) do this:

    void CMyClass::MyFunction(CStringArray& a)
    {
    CString str_component = "test";
    a.add(str_component);
    }

    #include "afxtempl.h" to use the class 'CStringArray'. To use 'MyFunction' do like this:

    void CMyClass::AnotherFunction()
    {
    CStringArray myArray;
    this->MyFunction(myArray);
    }

    After the call to 'MyFunction' the string is still added since the array is sent by reference. And there is no need for a copy constructor for the same reason. Sprudling

    C / C++ / MFC help tutorial question

  • ofstream::put() writes 2 bytes instead of 1?!
    S Sprudling

    I'm trying to create a function which just creates a file and fills it with random bytes. I want to be able to specify the size. I do this like this...

    bool CreateRandomFile(const char* pszDest, unsigned int nLen)
    {
    if (!nLen) return false;
    static const nByteSize = sizeof(byte) * 256;
    ofstream fDest(pszDest);
    if (!fDest) return false;
    for (int i = 0; i < nLen; i++)
    fDest.put(byte(::rand() % nByteSize));
    fDest.close();
    return true;
    }

    This doesn't work because when (::rand() % nByteSize) becomes 10, 2 bytes are written instead of just the one. The 2 bytes are the standard "\r\n" thing and I guess it's supposed to be this way. But what should I do to get it to work properly? byte is typedef'ed like this:

    typedef unsigned char byte;

    And btw.: fDest.put(10) writes 2 bytes too, and fDest.put(9) writes 1. I'm using the header "fstream" and namespace std. Sprudling :confused:

    C / C++ / MFC question lounge

  • unresolved external symbol __endthreadex
    S Sprudling

    I'm not sure at all, but I would have checked the Project Settings. Project menu -> Settings... -> C/C++ tab -> Category: 'Code Generation' -> Use run-time library: 'Multithreaded' (or 'Debug multithreaded' for debug mode) Sprudling

    C / C++ / MFC help c++ debugging question workspace

  • Aligning text in CRichEditCtrl
    S Sprudling

    Thanks; how to calculate a font's height? :) And what if I've turned on wrapping (no horizontal scoll). Will that count as a new line or not? (When returned from CRichEditCtrl::GetLineCount()) Sprudling

    C / C++ / MFC question

  • Aligning text in CRichEditCtrl
    S Sprudling

    How could CRichEditCtrl::SetParaFormat help me? Sprudling

    C / C++ / MFC question

  • How to convert to twips...?
    S Sprudling

    Thanks, this was exactly what I wanted :) Sprudling

    C / C++ / MFC question tutorial

  • How to convert to twips...?
    S Sprudling

    CRichEditCtrl wants me to set the fontsize in twips, whatever that is. How can I set the font to something like Verdana 9. Sprudling

    C / C++ / MFC question tutorial

  • Aligning text in CRichEditCtrl
    S Sprudling

    I want the text in a CRichEditCtrl to appear as in a console, with the "latest" line at the bottom and all text bottomaligned, so that if there is just one line it'll be alone at the bottom. Is there a way of implementing this...? Sprudling :confused:

    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