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
A

aquawicket

@aquawicket
About
Posts
56
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to use this lib?
    A aquawicket

    ** BUMP ** I've been tring to get aubio to compile in Visual Studio 2005 myself. No GO. :( I've been trying for 3 days. Any help on this matter would be great.

    C / C++ / MFC question beta-testing tutorial

  • Advanced Pointers and References [modified]
    A aquawicket

    I FIXED IT !!!! :) it was not a problem with pointers, classes, member pointers or references at all. I had an event that was triggering before any data was set and it was in fact NULLifying the value. Thanks for the help

    C / C++ / MFC help

  • Advanced Pointers and References [modified]
    A aquawicket

    ok.. but how do I get the reference into the scope of the intire class. I was using member pointers to do it. is their another way? class Class1 { int *m_ptr; } Class1::Class1(int& num) { m_ptr = # } Class1::func1() { //I have access to the reference m_ptr = 5; }

    C / C++ / MFC help

  • Advanced Pointers and References [modified]
    A aquawicket

    the point is, The pointer in Class2 shows that it is pointing to the write place, because when I set it in Class 2 it works. And In Class1, setting the value by pointer works also, so I know that one is pointing to the right place to. It is the value that is set in the main function that is somehow getting overwritten or NULL'ed, and i can't understand why.

    C / C++ / MFC help

  • Advanced Pointers and References [modified]
    A aquawicket

    srry.. had to edit the code a little bit. I can't post the entire code so i'm trying to break it down. the pointers in the functions are actually member pointers so the entire class has scope of the pointer. By the time Class to is created myst1[0].str no longer has data. I will edit the code one more time to be more specific.

    C / C++ / MFC help

  • Advanced Pointers and References [modified]
    A aquawicket

    I have multiple levels of functions that I would like to have pointing to the same data. I have things set up like so. I have an issue that when I get into func2.. str1[0].myStr does not have data; I'm screwing this up somewhere. struct myStruct{ int myInt; CString myStr; }; void main() { myStruct *st1 = new myStruct[10]; st1[0].myStr = "test1"; Class1 *cls1 = new Class1(st1[0]); } /////// CLASS 1 class Class1 { myStruct *m_pSt1; } void Class1:Class1(myStruct &st2) { m_pSt1 = &st2; Class2 *cls2 = new Class2(m_pSt1->myStr); } void Class1::OnFileSave() { //get value of str MessageBox(m_pSt1->myStr); //this has no data!! but is fine if Class2::OnEventFunc2() gets processed or is omitted } /////// CLASS 2 class Class2 { CString *pMyStr; }; void Class2::Class2(CString &myStr2) { m_pMyStr = &myStr2 } void Class2::OnEventFunc2() { *m_pMyStr = "test3"; //when this is omitted everything works ok //if it is there, str1[0].myStr does not have data, even if this //function is never called. } Thanks in advance for any help on this :) -- modified at 11:33 Monday 8th October, 2007

    C / C++ / MFC help

  • Resizing a dynamic pointer array
    A aquawicket

    I think I will use vector. But just to check, here is my own way revised. number *n - NULL; //create n = new number[2]; //allocate ////We need more room number *temp = NULL; //create temp temp = new number[4]; //allocate for(register int i=0; i<4; i++){ //transfer old into temp temp[i] = n[i]; } delete[] n; //delete old n = temp; // point to new data

    C / C++ / MFC data-structures question

  • How to get CPU temperature.
    A aquawicket

    not all machines can support reading of the cpu temperature, it's a function of your BIOS software. Sometimes the bios manufacturer will supply dll's that you can reference to call the required function and return the details.

    C / C++ / MFC help tutorial

  • Resizing a dynamic pointer array
    A aquawicket

    I am using a dynamic array that I often need to resize. I've tried a few way to resize it and so far this is what works. But their MUST be a better way. Ideas? int *n = NULL; // Pointer to int, initialize to nothing. n = new int[2]; // allocate needed room ///////////////////////////////////// /// Time to make more room!! int *temp = NULL; //Create a temp :( temp = new temp[4]; //allocate for(register int i=0; i<4; i++){ //transfer data to temp temp[i] = n[i]; } delete n; //delete old n = new int[4]; //make new one for(register int i=0; i<4; i++){ //transfer the data back n[i] = temp[i]; } delete temp; //delete temp

    C / C++ / MFC data-structures question

  • Child dialog dependant on SP2 :(
    A aquawicket

    Thanks Mark.. I'm working on getting VS2005 installed and running on an SP1 machine and I guess I'll work it from there :)

    C / C++ / MFC c++ graphics game-dev help question

  • Child dialog dependant on SP2 :(
    A aquawicket

    Well, I'm not exactly sure why the dialogs don't open without SP2. I don't really know where to begin on finding out either. I figure if it's not the dialog itself, then it is something within the dialog. Is their a way I can hunt down what is causing the need for SP2? Could it be the version of MFC i'm linking against? What kinda information can I provide to help out? Program specs: -------------- MFC statically linked Unicode Not Using ATL No Common Language Runtime support No Whole Program Optimization and Optimization disabled PreProcessor Def's WIN32;_WINDOWS;NDEBUG Link Library Dependencies = YES I guess I will just start stripping down the class the dialog is in till it works :P

    C / C++ / MFC c++ graphics game-dev help question

  • Child dialog dependant on SP2 :(
    A aquawicket

    I have a many child dialog at are created within the parent. dlg = new childDlg; dlg->Create(childDlg::IDD, this); Works great.. but something it dependant on SP2. Without it, the window will not show up. People who use my program use it for Audio/Midi processing and don't like SP2 installed on their Digital Audio Workstation. So I would like to fix this so the applications does not require SP2. Any Ideas? VC2005 MFC DirectX 8.0 SDK

    C / C++ / MFC c++ graphics game-dev help question

  • Calling a function AFTER OnInitDialog completes.
    A aquawicket

    Sweet.. Got it workin.. RedrawWindow() seemed to do the trick.. I didn't realize I was halting everything with Sleep(); I figured the dialog would be drawn before it ever got to that.. Thanks everyone.

    C / C++ / MFC c++

  • Calling a function AFTER OnInitDialog completes.
    A aquawicket

    I was looking to run a function after OnInitDialog completes and has fully drawn the dialog to the screen. I am getting some good results using this method, however, not all of the dialog objects and dialog are showing up. Not to sure why either. // stdafx.h #define WM_MY_USER_DEFINED_MESSAGE WM_APP + 0x10 // MyDialog.h virtual BOOL OnInitDialog(); afx_msg LRESULT OnMyUserDefinedMessage(WPARAM wParam, LPARAM lParam); DECLARE_MESSAGE_MAP() // MyDialog.cpp BEGIN_MESSAGE_MAP(CMyDialog, CDialog) ON_MESSAGE(WM_MY_USER_DEFINED_MESSAGE, OnMyUserDefinedMessage) END_MESSAGE_MAP() BOOL CMyDialog::OnInitDialog() { CDialog::OnInitDialog(); PostMessage(WM_MY_USER_DEFINED_MESSAGE); return TRUE; } LRESULT CMyDialog::OnMyUserDefinedMessage(WPARAM wParam, LPARAM lParam) { //I would imagine that if we are here, the dialog has completley drawn by now. //but this does not seem to be the case Sleep(5000); AfxMessageBox(L"ok"); return NULL; }

    C / C++ / MFC c++

  • Bitmap in parent overlaps child dialog.
    A aquawicket

    Good man mark... It was definetly a Z-order issue.. MoveWindow() works it out.. :) Thank you very very much..

    C / C++ / MFC graphics question

  • Bitmap in parent overlaps child dialog.
    A aquawicket

    Hmmm... So far I've tried all of the above, nothing does it yet... In the resource editor, the dialog type is set to child. All of my other modal and modeless dialogs overlap the bitmap on the parent ok. It's just these child dialogs.

    C / C++ / MFC graphics question

  • Bitmap in parent overlaps child dialog.
    A aquawicket

    childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

    C / C++ / MFC graphics question

  • Bitmap in parent overlaps child dialog.
    A aquawicket

    I've got a parent dialog with a picture control linked to a .bmp file. Then I've got a child dialog that opens in the parent. When I open the child dialog the bitmap of the parent overlaps the child window. Any ideas?

    C / C++ / MFC graphics question

  • Extracting lparam from WM_KEYDOWN MSG
    A aquawicket

    Thanks Mark.. your the man. :)

    C / C++ / MFC question

  • Extracting lparam from WM_KEYDOWN MSG
    A aquawicket

    I have PretranslateMessage() that checks for WM_KEYDOWN message to capture keystrokes. Then I do my processing from the code it gives me.. int key = (151 + HIWORD (pMsg->lParam) & 0x00ff); All works great, but I want to be able to test it to see if it's a repeat key before processing. That is, if the key is held down, I don't want the repeats to get through. How can I extract lparam bits into a var to see if the message is a repeat key? I beleive 0-15 in lparam tell repeat status. Sorry, I get kinda stumped when I get into working with data on bit and byte level. Thanks...

    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