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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Manu Dev

@Manu Dev
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Vista specific CToolBar problem
    M Manu Dev

    what! no replies! ;P Anyway the problem is solved. in the line

    GetToolBarCtrl().AddButtons(iButtonCount+iSeptratorCount, pAToolBarButton);

    pAToolBarButton is an array of TBBUTTON structure where each structure represents a button on the tool bar. It seems that each field in TBBUTTON structure must be properly initialized in Vista. Well this is a good programming practice anyway. But in case you have left the less used fields like TBBUTTON.dwValue uninitialized, it would ignored when you application runs on XP. Where as in Vista you get an exception when you try to add the buttons to your toolbar control.

    only dead fish swim with the stream

    C / C++ / MFC help c++ data-structures learning

  • Vista specific CToolBar problem
    M Manu Dev

    Hi All, I have an old vc++ application which was running perfectly fine on Win NT and Win XP. (I use VC++ 7 to build it) Now i am running it on Vista. While opening one perticular view it throws an unhandelled exception and simply dies. After debugging I found that the exception is being thrown when i try to add buttons to my dynamic tool bar. The code structure is : There is a CDynamicToolBar derived from CToolBar class CDynamicToolBar : public CToolBar When I need to instantiates the dynamic tool bar i do something like this

    //call my constructor
    m_wndToolBar = new CDynamicToolBar (/*reqd parameters*/)
    //call create function
    if (!m_wndToolBar->CreateEx(this))
    {//handel error }
    //call my function to load all buttons, bitmaps, etc.
    m_wndToolBar->Load();
    //continue

    Its in the Load() ,where I add the buttons array I am getting the exception in Vista while there is no problem in XP

    GetToolBarCtrl().AddButtons(iButtonCount+iSeptratorCount, pAToolBarButton);

    I have tried removing the code related to the tool bar and running the view without it on Vista. It gives no problem at all (except,i don't get the toolbar of course) I am completely at loss here... Anyone with ideas /suggestion/ :-D solutions

    only dead fish swim with the stream

    C / C++ / MFC help c++ data-structures learning

  • making file path generic
    M Manu Dev

    Which version of VC++ you are using? VS 2003 and above there are a lots of issues with cast between char* and wchar*. If you have a newer version try using getenv_s or wgetenv_s functions. I am using Visual studio 2002 and the following code runs sucessfully:

    char* envVarVal;
    envVarVal = getenv("PATH");
    AfxMessageBox(envVarVal);

    In any case, be advised that getenv() and _putenv() only affect the environment variables for your own process. They do not add system wide accessable environment variable. In case you require that, instead of setting environment variables, try storing the path of the file in the registry.

    only dead fish swim with the stream

    C / C++ / MFC help question

  • can you tell me what mean this?
    M Manu Dev

    I checked out the link you gave. I am still not very clear what soma cube is :-D The numbers above probably represent a matrix based notation of the solution. I don't think c/c++ programmers can help you understand what represents what here. It all depends on the program which uses the above matrix. So i don't think this is the right forum for this. Maybe some place which deal with maths. But if u want some guesses: The site mentions the numbers represents 3 separate solution to whatever soma cube is. They come in set of 3 rows(horizontal) of 7 columns(vertical) each. In your post you seem to have clubbed the first two sets together, they are separate. Each values are 3 bit fields (eg 111,110). Each bit probably represents a connection/cubelet/point in X,Y and Z axis. Figure the rest out , best of luck :)

    only dead fish swim with the stream

    C / C++ / MFC c++ algorithms question

  • Setting Windows Environment Variables programmatically (win32/mfc) [modified]
    M Manu Dev

    thanks Jijo raj. this seems to be exactly what i was looking for.

    only dead fish swim with the stream

    C / C++ / MFC c++ csharp com question workspace

  • Setting Windows Environment Variables programmatically (win32/mfc) [modified]
    M Manu Dev

    Hi, I came across an article about setting windows Environment variables from within a program. http://www.codeproject.com/KB/system/EnvMan.aspx[^] However it uses .net library's Environment class to do it. Is there some way to do it using win32/mfc native code?:confused: I tried the _putenv() and getenv() functions but it seems they affect the process which makes these calls only. The changed values do not get reflected on the system level. :doh: Is there any other way to achieve this?

    only dead fish swim with the stream

    modified on Sunday, May 25, 2008 8:38 AM

    C / C++ / MFC c++ csharp com question workspace

  • Advertising!
    M Manu Dev

    Ashley van Gerven wrote:

    How about the banks show us ads at ATMs before letting us get cash out?

    That one is already taken! ICICI bank in India shows an ad for it's personal loan plans before you can cash out. I keep getting messages like "Personal loan of Rs 200,000 pre-approved and ready for You!" and the options i get are "OK" and "Maybe Later" ;P This happens one out of every two times i withdraw money :doh:

    only dead fish swim with the stream

    The Lounge com game-dev sales 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