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

Sameer_Thakur

@Sameer_Thakur
About
Posts
97
Topics
49
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Splitting header of column in list control.
    S Sameer_Thakur

    This is exactly what I am trying to do. Nice perception I must say :) You have any idea to make it work?

    Sameer Thakur

    C / C++ / MFC help question

  • Splitting header of column in list control.
    S Sameer_Thakur

    Hi I am trying to split the header of a list control into multiple sub-header, but not finding a way to do so… To put in other words… I have added say 3 columns named col_1, col_2, col_3 in list control. Now I want to split col_2 into say col_2_sub_1 and col_2_sub_2. Whats the way to do so? Any help would be appreciated. Regards

    Sameer Thakur

    C / C++ / MFC help question

  • why 2 vfptrs in case of virtual inheritance?
    S Sameer_Thakur

    Hi all. Here are the two classes one base and other Derived ( virtually inherited from Base) Class Base { Public: Virtual void FunB(){} }; Class Derived: virtual public Base { Public: Virtual void FunD(){} }; When I derived class Derived virtually from Base, and when I saw the memory layout of objects of Derived in debug window; I saw two separate vfptrs; one for Base and one for Derived. But if I do not derive class Derived virtually from Base, then there is only single vfptr in object of Derived class? Why an extra vfptr is added/required in case of virtual inheritance?

    Sameer Thakur

    C / C++ / MFC debugging oop performance question

  • Why two vfptr incase of virtual inhertance?
    S Sameer_Thakur

    Hi all. Here are the two classes one base and other Derived ( virtually inherited from Base) Class Base { Public: Virtual void FunB(){} }; Class Derived: virtual public Base { Public: Virtual void FunD(){} }; When I derived class Derived virtually from Base, and when I saw the memory layout of objects of Derived in debug window; I saw two separate vfptrs; one for Base and one for Derived. But if I do not derive class Derived virtually from Base, then there is only single vfptr in object of Derived class? Why an extra vfptr is added/required in case of virtual inheritance?

    Sameer Thakur

    Managed C++/CLI debugging oop performance question

  • How to change display properties of a computer through code?
    S Sameer_Thakur

    Hi Rechi. Thanks for reply. I searched SystemParametersInfo() function in MSDN. I saw all the parameters which one can either access or change through that function. But unfortunately I did not find the parameter which will help me to change the properties that I want to change.

    Sameer Thakur

    C / C++ / MFC question tutorial

  • How to change display properties of a computer through code?
    S Sameer_Thakur

    Hi. I want to change some of the display properties of a computer through code. I want to change the properties which appears on Right click on desktop-->Properties-->Appearance Tab-->‘Effects..’ button on right bottom corner. In that I want to uncheck all the options except ‘Show window contexts while dragging’ option. How can I achieve this through code?

    Sameer Thakur

    C / C++ / MFC question tutorial

  • Creating array/object at runtime.
    S Sameer_Thakur

    Hi. I want to know how I can create an array/object at runtime if I don’t know about its data type. For example, I have an array Say Arr, but I don’t have any information about the data type of elements it stores. It might be an array of int, float, char or even user defined data type (user defined class). I can get the information about its class or data type by using ‘type_info’, but how can I create an array/object of same data type at runtime? Like if I want to copy the contents of an array Arr into another array say ‘NewArr’; of the same type at runtime, how can I create that second array NewArr, i.e. what should I specify as a data type of ‘NewArr’?

    Thanks Sameer Thakur

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

  • Function behaving differently in Debug and Release mode.
    S Sameer_Thakur

    Hi. I am calling a function from a third party DLL which takes 4 Parameter as a LPSTR. These 4 parameters I have in CString format. So I am using following code to convert CString to LPSTR. CString strServer = “xyz.com” LPSTR server = strServer.GetBuffer(strServer.GetLength()); strServer.ReleaseBuffer(); long lRetVal = ThirdPartyDLLFun(server,…….); When I call that 3rd party DLL function in debug mode I get lRetVal = 0 as a return value. But with same inputs the return value if something else in Release mode. What could be the reason? Thanks

    Sameer Thakur

    C / C++ / MFC com sysadmin debugging question announcement

  • Adding custom menu in Front page (Add Ins)
    S Sameer_Thakur

    Hi all. I want to add some custom menus in ‘Microsoft Front page’ application and also I want to handle click events on those custom menus. Like… I want to add custom menu and on click event of it, I want to open the currently selected image from Front page in MS-Paint. This is something possible through ‘Add Ins’. Can anybody please educate me more about creating ‘Add In’ Dlls, where to keep or how to register these Dlls with Front page? A sample code for Add In Dlls would be most appreciated. Thanks

    Sameer Thakur

    C / C++ / MFC tutorial question

  • Problem in Enable and disable ToolBar
    S Sameer_Thakur

    Excellent. :)

    Sameer Thakur

    C / C++ / MFC help

  • Create Registry Entry in Vista ...
    S Sameer_Thakur

    In Vista there is a concept of User Account Control (UAC) by which it prevents any major changes in registry (though you are logged in as an Admin). To enable registry changes, we need to provide higher privileges to the application. To do this there is a tag in manifest.xml … Here we are granting the “highestAvailable” privilege to the application/DLL which ultimately grants the permission to ur application/DLL to access (Read/Write) registry. Sameer Thakur

    C / C++ / MFC windows-admin question

  • Problem in Enable and disable ToolBar
    S Sameer_Thakur

    I am not sure about the approach that u have specified here. But the following approach will server the purpose of enabling / disabling the tool bar controls. You need to add a function in your view class. For example… Add ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew ) at location shown. CMyView.cpp file ======================================================= BEGIN_MESSAGE_MAP(CMyView, CScrollView) //{{AFX_MSG_MAP(CMyView) other message handler functions... ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew ) other message handler functions... END_MESSAGE_MAP() Void CMyView:: OnUpdateFileNew(CCmdUI* pCmdUI) { if( some_Condition) pCmdUI->Enable(true); else pCmdUI->Enable(false); } CMyView.h file Public: void OnUpdateFileNew (CCmdUI* pCmdUI); Framework will keep calling OnUpdateFileNew function frequently and will keep the tool bar option enabled or disabled in a way u want.

    Sameer Thakur

    C / C++ / MFC help

  • Create Registry Entry in Vista ...
    S Sameer_Thakur

    Logically..... You can add that xml file as a resource in a DLL that u are using as a custom action DLL.(No need to call InitCommonControls() in that case.) By doing that ur DLL will get elevated privileges to read/write registry entries on Vista.

    Sameer Thakur

    C / C++ / MFC windows-admin question

  • Create Registry Entry in Vista ...
    S Sameer_Thakur

    I faced the same problem with my application. I used a manifest.xml in my application as a resource and it solved the problem. Here are the contents of that manifest.xml file. Your application description here. Call InitCommonControls() in the InitInstance() of ur application BOOL CURApp::InitInstance() { InitCommonControls(); -------------------------- ---------------------- } U can follow these steps to include manifest.xml in ur project. Once writing manifest.xml is completed, you will want to add the manifest.xml file to your project in the resource editor. In Visual Studio 6, hit Ctrl+R to add a new resource, select all files and double click manifest.xml to add the file. When you see the custom resource dialog, enter the number "24" as the resource type and hit OK. Once imported, right click on the resource to open the properties window and change the ID to the number "1". Sameer Thakur

    C / C++ / MFC windows-admin question

  • Copying HTML page along with the images from it.
    S Sameer_Thakur

    Hi all. In my application I am trying to copy an html page from one temp location to another location specified by user. I am using CopyFile() API to copy html pages. But I need to explicitly carryout the image copying along with the .html page copying. I also tried using SHFileOperation API but it also doesn't support implicite copying of images. Is there any other API which copies all the images from particular html pages implicitly when I copy that html page? Thanks

    Sameer Thakur

    C / C++ / MFC html json question

  • Copying HTML page along with the images from it. [modified]
    S Sameer_Thakur

    Hi all. In my application I am trying to copy an html page from one temp location to another location specified by user. I am using CopyFile() API to copy html pages. But I need to explicitly carryout the image copying along with the .html page copying. Is there any other API which copies all the images from particular html pages implicitly when I copy that html page? Thanks -- modified at 3:27 Wednesday 18th April, 2007 -- modified at 3:28 Wednesday 18th April, 2007

    Sameer Thakur

    C / C++ / MFC html json question

  • Owner drawn List box...problem in setting item height.
    S Sameer_Thakur

    Hi all. In an owner drawn list box, when I try to set the item height by ... -------------------------------------------------------------------- void CListBoxEx::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) { lpMeasureItemStruct->itemHeight = m_nHeight; } -------------------------------------------------------------------- I have defined m_nHeight as a class memner and its of an int type. I am setting its value with the help of another function... SetItemHeight(int nVal). When I pass the values for m_nHeight to be greater than 255, then the values got truncated... Eg. 1. When I passed 300, the item height was set to 300-256 = 49. 2. When I passed 400, the item height was set to 400-256 = 149. etc. I have taken care to set the proper data types for m_nHeight, and data type of lpMeasureItemStruct->itemHeight is UINT. Then what could be the reason behind this value truncation? Thanks

    Sameer Thakur

    C / C++ / MFC help question

  • List box customization..Problem with setting the item Height.
    S Sameer_Thakur

    No initialy I did not. But I have added it now but still the item size is not getting changed.

    Sameer Thakur

    C / C++ / MFC question help

  • List box customization..Problem with setting the item Height.
    S Sameer_Thakur

    Yes I have set the property of "Owner Draw" to "variablr" under style tab. Also checked the option of "Has String" under it.

    Sameer Thakur

    C / C++ / MFC question help

  • List box customization..Problem with setting the item Height.
    S Sameer_Thakur

    Hi all. I am trying to customize a List box to load the jpg preview images in it. I have managed to load all the jpg files in a list box; one below the other from the selected location. But by default the preview height is 16 pixels. I tried to change it to 200 by following way… void CListBoxEx::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) { lpMeasureItemStruct->itemHeight = 200; } but the height is remaining the same (16 pixels). How can I set the height to the desired pixel amount? Thanks

    Sameer Thakur

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

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