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

pie

@pie
About
Posts
25
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • "Ownerdraw" in an editbox
    P pie

    Hello. Does anyone have experience in inserting an image as background in an editbox? I've tried, but the final solution took up a lot of cpu. I just want the editbox to look like those in Msn messenger. If it isn't possible to do ownerdraw with an editcontrol, which control must I then use? -Anders.

    C / C++ / MFC question

  • SetScrollInfo
    P pie

    Okay.. I just talked to a guy, who told me that I shouldn't be using CScrollView, because it behaves differently from other views. And true enough. When I switched to a standard CView, SetScrollPos didn't scroll my window anymore. I think that's werid.

    C / C++ / MFC c++ question

  • SetScrollInfo
    P pie

    Because I'm writing an application that behaves like mspaint, and I use SetViewportOrg for scrolling.. Do you have a better suggestion?

    C / C++ / MFC c++ question

  • SetScrollInfo
    P pie

    Hello! It seems to me that setscrollinfo both updates the position of the thumb and scrolls the window. this annoys me very much because I want to scroll the window, and setscrollpos just ruins everything.. Is there a function that only sets the position of the thumb? I'm using mfc.

    C / C++ / MFC c++ question

  • Disabling the OnOK in CDialog
    P pie

    I tried to override OnOK, and yes, the dialog doesn't close, but if I then add an OnKeyDown-handler to my dialog, it never receives any VK_RETURN-notifications.. Is this beacuse MFC "grabs" the VK_RETURN, and sends it to OnOK, or just beacuse I'm doing something wrong?

    C / C++ / MFC question

  • Disabling the OnOK in CDialog
    P pie

    Hello. Is it somehow possible to disable the linking between VK_RETURN and CDialog::OnOK? Whenever I press ENTER in my dialog, it calls the OnOK, and I would like to avoid this.. Is it possible?

    C / C++ / MFC question

  • Using fprintf in sockets
    P pie

    Hello. I once saw a piece of code, which used fprintf instead of send(), to send data via winsock. How can I "convert" my socket-handle into a file-handle, usable in the fprintf-function ? Thank you.

    C / C++ / MFC question

  • CMenu ownerdraw
    P pie

    Hello. I would like to create an owner-drawn CMenu class, and therefore i override DrawItem and MeasureItem, like this: class MyMenu : public CMenu { public: virtual void DrawItem(LPDRAWITEMSTRUCT lpDis); virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMis); }; void MyMenu::DrawItem(LPDRAWITEMSTRUCT lpDis) { } void MyMenu::MeasureItem(LPMEASUREITEMSTRUCT lpMis) { } And then I add a menu to my app's CMainFrame: //MainFrm.h MyMenu TopMenu; //Mainfrm.cpp TopMenu.LoadMenu(IDR_MAINFRAME); for(int i = 0; i<3; ++i) TopMenu.ModifyMenu(ID_DAWS_HEJ+i, MF_OWNERDRAW, ID_DAWS_HEJ+i); SetMenu(&TopMenu); But the problem is that DrawItem and MeasureItem are never called! I do receive WM_DRAWITEM and WM_MEASUREITEM, but they are just not handled by my class. What do I do?

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

  • Add Message Handler in VC7.0
    P pie

    Aah, thank you.. Exactly what I was looking for!

    C / C++ / MFC csharp visual-studio question learning

  • Add Message Handler in VC7.0
    P pie

    But it's not. My book tells me to "Right-click CMainFrame in the ClassView window, select Add Windows Message Handler, double-click WM_CREATE, and click Edit Existing. You'll find yourself in the empty message handler body, poised to type in the finished code. ClassWizard has already done everything else, including adding an ON_WM_CREATE entry to the message map." But there's no "add windows message handler" in VC 7.0(at least I can't spot it)

    C / C++ / MFC csharp visual-studio question learning

  • Add Message Handler in VC7.0
    P pie

    Yes, but I was getting tierd of writing code like that and wanted the wizard to do it for me. I just can't seem to find the "Add Message Handler"-wizard in VC 7.0.

    C / C++ / MFC csharp visual-studio question learning

  • Add Message Handler in VC7.0
    P pie

    Hello.. I'm reading a book that describes how I can use build in wizards in Visual Studio 6.0 to add message handlers. It tells me to right click the class, and click add windows message handler.. But i'm using VC7.0.. Where can I find this functionallity? Specifically I want to add an OnCreate handler.

    C / C++ / MFC csharp visual-studio question learning

  • MFC classes in my class
    P pie

    Thank you, Paul, that was a good answer.

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

  • MFC classes in my class
    P pie

    Yeah, that seems to work.. Thank you(and Navin) :)

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

  • MFC classes in my class
    P pie

    But i'm not looking for speed-improvements. I just want to know why the code i posted doesn't work. MUST I use pointers to make it work ?

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

  • MFC classes in my class
    P pie

    I have: #include #include using namespace std;

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

  • MFC classes in my class
    P pie

    Why did you want to use a pointer in the first place? What is the advantage?

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

  • MFC classes in my class
    P pie

    How smart is it to store a pointer if the object you added to the vector goes out of scope? I know that isn't the case right here, but generally speaking...

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

  • MFC classes in my class
    P pie

    Hello. When I write something like: --- class test{ public: CBrush f; }; int main() { test t; vector hej; hej.push_back(t); } --- I get an error in : ...\include\vector(575): error C2440: 'initializing' : cannot convert from 'const test' to 'test' But if I replace CBrush with one of my own classes, i everything works fine! What is it with those MFC classes?

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

  • operator= understanding problem
    P pie

    Ratio r1, r2; r1 = r2; is equal to: r1.operator=(r2); I guess what the author means is that r1 "owns" the .operator=()-call. But how do you return the r1-object? This is where you need the this-pointer, which points to r1. "this" is defined as "a pointer that points to the object for which the member function is called". I hope that helps, just ask if I didn't explain it good enough.

    C / C++ / MFC c++ json help question learning
  • Login

  • Don't have an account? Register

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