Problems reading bitmap?

1803 byte By flynny1st at 2007-11-20 11:50:06
Hi,Can anyone tell me where i'm going wrong reading the attached bitmap please? for some reason it gives following method is giving the attached (dump.txt) output?am i reading the bitmap wrong? this has worked on a previous bitmap with black text on white background (still a 32bit bitmap) but n...

How to connect two windows using MFC in VC++ 6.0

301 byte By sangyeshgupta at 2007-11-20 11:50:09
Hi,Actually,In my project I have one main window and from that main window,i need to open another pop up window by clicking different buttons. if you have source code regarding it.please write it.So Please let me know how to connect these windows using MFC in VC++ 6.0....

same elements in the vector

234 byte By lontana at 2007-11-20 11:50:11
Dear all,<br/>I want to establish if certain vector contains certain element and if a vector contains two identical elements.<br/>Is there any fiunctiona vailable that does this stuff or I have to write code myself?<br/>Thank you

My complex polymorphic inheritance problem.. Its like a puzzle ! can u solve ?

777 byte By quakeboy at 2007-11-20 11:50:12
I have a complex problem with my C++ application. To explain it better I have made a diagram(UML) which explains the problem better. http://prasna991.googlepages.com/stuck.gifClasses are a1,a2,b1,c1 and Relb1 inherits a1 and a2c1 inherits b1Class a2 holds a pointer to object of type Reland has func...

Application Launch detection

230 byte By jpgossieaux at 2007-11-20 11:50:19
Hi,<br/>How can I detect the launching of a 3rd party application ?<br/>Is there a windows Event or a specific win32 SDK function able to tell me that an application has been sent.<br/>Thanks for any help.<br/>JPhil

Getting the shell icon for folder...

240 byte By usman999_1 at 2007-11-20 11:50:28
Hi all!<br/>I am writing an application, when I need to use for a TreeView, icons used by explorer for directory & also the icons for different file type displayed within explorer.<br/>Thanks for your time,<br/>Regards,<br/>Usman.

Hooking Event Functions

213 byte By Quell at 2007-11-20 11:50:45
Hey.<br/>I need to hook a function that happens when a button is pressed in an MFC application. Basically what i am asking is how to identify where the function is in the application after it was compiled?<br/>Thx

Drawing Windows with Rounded Edges

318 byte By mbbuffington at 2007-11-20 11:50:46
Has anyone done this, or know where samples might be? I'd like to curve the edges of my controls, and possibly my views. It seems like this might be difficult to do. My controls are already owner-drawn, but the curved thing is all that's missing.Thanks for any advice...-Mike...

Wierd Inheritance Behavoir

1156 byte By amatheny at 2007-11-20 11:50:47
Ok, so heres the situation.I have the following class:#ifndef collisionevent_h#define collisionevent_h#include "Event.h";#include "Collideable.h"class CollisionEvent : public Event{public: CollisionEvent();/* CollisionEvent(Collideable* obj1, Collideable* obj2) : Event(ET_COLLISION) { mObj1 = obj1...

Array of Points...

935 byte By bhushan1980 at 2007-11-20 11:51:01
Hi all. I have worked in VC++ 6.0 and the operator [] worked for the arrays of classes and collections. The following was the piece of code that worked there:[code]int int1, int2;CPoint m_Points[100]; // Array of 100 points...m_Points[0].x = int1;m_Points[0].y = int2;However, starting Visual Stud...

how can i get a public member variable from View in a dialog

445 byte By mountainice at 2007-11-20 11:51:05
A SDI project based on CView,for example ,named Test;a public member variable named speed(int type) in TestView.cpp,the project include a dialog resource,the dialog called by menu. IF i want to transfer a variable in dialog to Testview.cpp,i can do like this to get a int type variable:CDLG dl...

Activex - loading and threading

755 byte By aditya_pizza at 2007-11-20 11:51:08
I am loading an VC++ 6/MFC based activex from the server (using a cab file, it is just a few kb) on my web-page using the <object tag> but until it is fully loaded, the page is not getting rendered. One option is I can use frames so that some initial content is there on the page or use a separ...

How to list the exported functions in a dll?

226 byte By Divad at 2007-11-20 11:51:16
I have for some time ago created a simple dll . Now, I want to access some of the exported functions in it and I do not have the source code for it here.<br/>Is there any tool I can run which will tell me the content of a dll?

Ask for permission when modifying Registry

732 byte By ashishbhatt12 at 2007-11-20 11:51:17
Hi All,I have created the project of MFC Activex Control and also I have included other project as a DLL in the same solution.And my Activex project is depends on the DLL project.Here First of all I want to ask you that is it possible for the Activex project to depend on DLL project? Is there any ot...

Using Math Functions in Visual C++

962 byte By bhushan1980 at 2007-11-20 11:51:21
Hi all. I am having a problem using a math function in my View class. As I am performing the calculations...I have included he following in the view class .cpp file...#include "Math.h"which helps me recogonize C++ Math functions. I am using a function to calculate the square-root of a double variabl...

Close CAsyncSocket on server side

248 byte By AnitaEugene at 2007-11-20 11:51:28
Hi<br/>After sending data using "Send(...)", I would like to close an CAsyncSocket socket. But, how do I know that complete data is sent?<br/>If I close after "Send(...)", I get socket error.<br/>Thanks for the help in advance<br/>Anita Eugene

prob with multiple forms accessing header file

581 byte By silkyt at 2007-11-20 11:51:30
hello there,i have a form(addNotes) accesing a custom header file(Notes_Hdr.h).i easily access this header file with #include "Notes_Hdr.h"my prob is when i use the same code #include "Notes_Hdr.h" on my main form (because i wanna access a funtion in the header file). i get a error C2011: 'No...

[RESOLVED] How to prevent deleting dynamic objects

736 byte By zarraza at 2007-11-20 11:51:35
Hi, i have SDI app with CFormView main window, one of main frame variables is CDialog based class object. When i call from main frame this dialog i create there some dynamic objects by new operator. Then i close this dialog and reopen all created dynamical objects dissapear. Why is this happend....

need help with some c++ commands...

3214 byte By jmeyer6521 at 2007-11-20 11:51:40
thx for clicking my post, here is my problem... I was assigned a problem in which i must take the square root of an integer, and i couldn't figure out how to do it(even after googeling it). I also am stumped on the last part of the question. I am using c++ in a VI editor on windows xp with a...

CListCtrl and key press

455 byte By juanpast at 2007-11-20 11:51:41
Hi Gurus.In a dialog I need to update some edit controls when I change de selected item in a CListCtrl.I supose than need LVN_KEYDOWN and NM_CLICK message but I dont know how to use LVN_KEYDOWN.If I search the first selected item in LVN_KEYDOWN funcion to get the subitems text and write them in the...

Finding HTML control at a given point

368 byte By visharad at 2007-11-20 11:51:59
Suppose that there is an html page. It can be online or offline. The page can be opened in any browser - IE, Netscape or any other. I want to find out what html object is present at a given mouse coordinates. And I should be able to do so without modifying the source of the html page.Is there any wa...

CListCtrl question

314 byte By NetMaster at 2007-11-20 11:52:08
Hi,I have a dialog containing a report view CListCtrl with several columns. When you double-click on the header divider the column to the left of the divider collapses. I'd like to know if there is any way you can prevent this from happening. Thanks...

Temperature Converter

535 byte By Loupz at 2007-11-20 11:52:15
I've started a Video Game Design Course at university and I have a programming lesson. My first assignment due in this month and I've almost done it but having a little trouble and wondered if anyone can give me some advice? It's a temerature converter and it did work fine, then chang...

Eventhandler isnt executed/

1507 byte By a-jage at 2007-11-20 11:52:36
Hello.I have created a new class "CMessengerSocket" which is derived from "CSocket".The connection is build with the following code:void CDesktopChatMessengerApp::ConnectServer(){ //Initialization m_NotificationServer = "messenger.hotmail.com"; m_NotificationServerPort = 1863; //Create c...

Problem flipping a string array

1190 byte By finalcloud13 at 2007-11-20 11:52:38
How would I reverse a string array? For example, I havestring office[] = { "michael", "jim", "pam", "dwight" };And I want to flip the array so that it becomes dwight, pam, jim, michael. This is how far I've gotten:int flip(string a[], int n){ if (n < 0) { n = -1; return n; } for (int i =...

Exception handling problem

931 byte By sockman at 2007-11-20 11:52:39
Hi all,I am having a spot of trouble with my exception handlers - they don't seem to working in release mode! In debug mode the exception block is executed, but in release mode, the application just shutsdown. I am currently testing this problem with the following code which deliberately throws...

need help

274 byte By itchoy at 2007-11-20 11:52:41
can somebody help me in making this C++ program...im really confuse on how this void stuff work and also the reference parameter...dont have any ideas how do do about it....here's the link<br/> http://www.cs.panam.edu/~pstsai/Courses/0Fall2007/CMPE/HWs/as5-1370.pdf

TCHAR & CString in Unicode

1334 byte By Saeed at 2007-11-20 11:52:47
This project that I was working on was tested when it was in MBCS ,once set the UNICODE on , things seem to not function properly.I was looking for a file where my binary was residing (as the code) and it was found and everything oknow the strAppDirectory instead of having a long string only shows...

Modal dialog

301 byte By danandu at 2007-11-20 11:52:50
Hi,How to make main dialog Modal. Actually I have an app which is started during startup option of windows. Once windows is logged in, the app starts up in max screen size mode. I want to restrict desktop access to the user.Can we set the application to resize to Full screen mode....

Problem about Login

945 byte By khanhkhi1 at 2007-11-20 11:52:51
I have a code about FTP Server.Users can login with 1 account (abc,123) . I want to change it ...so... i want 1 account only login once at the timeif (strCommand == "USER") { m_nStatus = STATUS_LOGIN; m_strUserName = strArguments; // Username CString strPeerAddress; UINT nPeerPort; GetPeerName(...

Problem in a dialog application

333 byte By sulabh120881 at 2007-11-20 11:52:52
Hi to All,I need to insert some button on user demand the no. of button may vary according to number of user and can be go out side the screen of dialog so i need a scroll for these buttons only because my dialog has some other controls rather than these buttons.Please tell me what should i do. Than...

MFC Activex control

355 byte By ashishbhatt12 at 2007-11-20 11:52:55
Hi All,I am new Activex project.I want to make MFC Activex Control project in which I want to add DLL project as other project in the same solution.And I want to make this Activex project depends on this DLL project.Is it possible to do like this??Plz give me any suggetion.Thanks in Advance. Ashish...

which version of gecko sdk contains nsIDOMClassInfo.h

693 byte By Me_Himanshu at 2007-11-20 11:52:58
Hi all,I m trying to implement nsIClassInfo in my VC++ XPCOM component. I reffered to the link http://lxr.mozilla.org/mozilla1.8.0/source/extensions/xmlextras/build/src/nsXMLExtrasModule.cpp#81Now, the macro specified at the line number 81 is defined in nsIDOMClassInfo.h which is not in my gecko sdk...

Debug assertion failed: _BLOCK_TYPE_IS_VALID(phead->nBlockUse)

4568 byte By CarlH at 2007-11-20 11:53:00
Hi All,I'm new in C++ and I have a problem which I don't seem to be able to solve. The problem seems to be caused by the destructor. When I debug the program I get the message:Debug Assertion Failed!File: dbgdel.cppline: 52Expression: _BLOCK_TYPE_IS_VALID(phead->nBlockUse)I also get an...

Using a variable in variable in various scopes

184 byte By lontana at 2007-11-20 11:53:04
Dear All,<br/>I have a for loop in which I use a variable as a counter. Is it good practice to use same variable in other loop therewith not having to use other variable?<br/>thank you

"This document has been modified" message box.

606 byte By kranti at 2007-11-20 11:53:06
Hi Everyone!How do I get rid of that Annoying Messagebox:---------------------Title has application path and file name |X|---------------------This document has been modified. Do you want to save changes?Yes: Saves your changesNo: Discards your changesCancel: Keeps th...

How to pass arguments to MFC app?

244 byte By Shvalb at 2007-11-20 11:53:07
Hi.<br/>I understand that I can pass them and parse them at "ProcessShellCommand", my question is:<br/>Suppose I got the arguement, how can I pass it to Document and store it there so I can access it from every View??<br/>Thanks.

COM event firing and sinking

1350 byte By eero_p at 2007-11-20 11:53:13
Compiler: MSVC 2005Language: C++ (non-MFC)Creating a COM dll -module that fires events is simple enough (ATL -project -> add ATL simple object with Connection point -support -> Add a couple methods etc.), but:1: What flags are needed for multiple instances to catch the same event when it is f...

CString to COleDateTime type

556 byte By marimuthu.pesit at 2007-11-20 11:53:14
Hi,I execute the lines of code below#include "ATLComTime.h"COleDateTime tmVal = COleDateTime::GetCurrentTime();CString tmStr = tmVal.Format(LOCALE_NOUSEROVERRIDE, LOCALE_NEUTRAL);On executing tmVal will be say 39391.729583333.tmStr give me the current time in the format tmStr = "11/5/2007 5:30:36 PM...

DLL uses MFC42.dll and MFC42D.dll

465 byte By Padan at 2007-11-20 11:53:16
Hello,my problem is that my dll uses both the Release and Debug version of the MFC when I compile my dll in Release mode. I am quite sure that I only included other libs as a release version. I have searched and tried a lot but I don't know how to solve it.When I create a map file I see which f...

How to prevent ANY MS error message when app crashes?

327 byte By Shvalb at 2007-11-20 11:53:17
Hi.I have an application that from time to time crashes, when it crashes Windows displays a dialog that allows you to send feedback to MS or abort - something like that...my question is, how can I configure my OS or whatever so it won't display any notification/dialog when application crashes ?...

_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.

593 byte By Kushi1 at 2007-11-20 11:53:19
Hi,Im working on WM5.i m trying to port pocketPC2003 project to WindowsMobile 2005.I m getting an error message like:_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM. _CE_ACTIVEX could be caused to be defined by defining _CE_ALLOW_MULTI_THREADED_OBJECTS_IN_MTA, but it is r...

ATL::_U_MENUorID

356 byte By Kushi1 at 2007-11-20 11:53:20
Hi,Im trying to port pocketPC2003 project to WindowsMobilw2005.While porting i m getting an error message like: error C2664: 'ATL::CWindowImpl<T,TBase,TWinTraits>::Create' : cannot convert parameter 6 from 'int' to 'ATL::_U_MENUorID'any body please give me an...

lnk2019

885 byte By tarunk at 2007-11-20 11:53:21
HI All,I have a project win32 dll which i am trying to use in a console applicaiton.This is my code in the console application.#include "stdafx.h"#include "../linktest1/mytest.h"int _tmain(int argc, _TCHAR* argv[]){ cmytest * c = new cmytest(); int b; b = c->mymethod1(); return 0;}and dll goes...

Double list sort (bubble sort) URGENT!

124 byte By Cyrus_M at 2007-11-20 11:53:22
Hov can I sort double linked list with bubble sort, i have it for may homework but I dont have any idea!!!<br/>Please help!!

how to make Bitmap look correct when screen resolution changed?

444 byte By shinde at 2007-11-20 11:53:28
Hi All, The bitmap on my application looks proper when the screen resolution is 1024*768 but it disturbed when I change the screen resolution to 800*600. 1)How can I make it look constant on all the resolutions?2)And I'm using 15 inches moniter, but how can I make my bitmap to adjust on...

convert bmp to grayscale

2693 byte By flynny1st at 2007-11-20 11:53:31
Hi,all i basically want to do is convert an already existing bitmap to greyscale.to do this i assume i will have to create a new bimapeaderinfo, fill in the needed details and then look at and convert each pixel in the exisiting image.can anyone help me to do this? also am i calculating the width si...

Show/Hide Dialog

195 byte By mradhakin at 2007-11-20 11:53:33
Hello all,<br/>Is there any command available in VC++ to show/hide dialog like SW_SHOW and SW_HIDE available to show/hide window?<br/>Thanks in advance for your reply.<br/>Muthiah.

characters and text files - 3 questions

1573 byte By Ghettobusta at 2007-11-20 11:53:35
First question:I am reading a text file letter by letter and trying to eliminate all the punctuation and spaces... is there an easier way to do it than this ? Entree.open("phrases.txt"); if (Entree.fail()) { cout << "Impossible d'ouvrir le fichier" << endl; } else { while (!Entree...

wmi bugs

739 byte By hanks at 2007-11-20 11:53:38
Quesiton: i encounter the trouble when i invoke execmthod.(wmi)the return error is WBEM_E_INVALID_METHOD_PARAMETERS.I have a specail situation than standard one.that is the method's input parameter is also an wmi class.(it is defined by my bios)therefore, when i invoke getmethod() to get input...