Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for mrnobody

Hi, I've been searching the net to try to find solution but i still can't find it despite searching it for hours. I've got a user control in a form. From the user control, I plan to do 2 things. 1) In the parent form, i got function example FunctionX(). …

Member Avatar for mrnobody
0
627
Member Avatar for mrnobody

Hi guys.. I need advice on writing function in a multi-threaded envionment Lets say I have a function which squares an integer. [CODE] int Square(int num) { // May do other things which might take long time to complete. return num*num; } [/CODE] This function is called in threads eg …

Member Avatar for rubberman
0
140
Member Avatar for mrnobody

Hi guys, I've been struggling for days to do this. I've got 2 form. The first form (Form1) is to assign a variable (Result) a value. Another form (DisplayResult) is to display out the value. Actually, my purpose is to learn how i can use global variables to share information …

Member Avatar for mrnobody
0
244
Member Avatar for mrnobody

Hi Guys, I have a database table where the field is type integer. In my program, i use [CODE]bstrTemp = static_cast< BSTR >(_myClass.m_QueryCommand.GetValue( 1 ) // using OLEDB consumer[/CODE] the variable "bstrTemp" is type CComBSTR. Lets say after retrieving the date from database, the value is 56(integer). When I execute …

Member Avatar for Ancient Dragon
0
93
Member Avatar for mrnobody

Hi guys, Lets say I create a class pointer in my program, do I need to delete the pointer I created before I close the program? Or will the pointer be deleted automatically whenever I exit the program? Will it cause the PC memory to be locked up if I …

Member Avatar for MonsieurPointer
0
84
Member Avatar for mrnobody

Hi, I get "error LNK2005:" when I build my source code. Below is what I did: Main.cpp [CODE]#include Main.h Function();[/CODE] Main.h [CODE]#include "File1.h" //#include "File2.h"[/CODE] File1.cpp [CODE]#include "File1.h" void Function() { // Do something }[/CODE] File1.h [CODE]extern void Function()[/CODE] File2.cpp [CODE]#include "File2.h" void Function() { // Do something }[/CODE] File2.h …

Member Avatar for pseudorandom21
0
97
Member Avatar for mrnobody

Hi, How do I correctly call a function which expect BSTR* as a parameter? eg: [CODE]void FunctionA(BSTR* b) { // Do something }[/CODE] Currently, my code is as follow: [CODE]void Caller() { BSTR* pbstr; FunctionA(pbstr); }[/CODE] However, during compilation, I get warning "local variable pbstr' used without having been initialized". …

Member Avatar for Ancient Dragon
0
208
Member Avatar for mrnobody

Hey, I was just testing/learning with classes and i'm stuck at how to instantiate the class. I've spent few days trying get myself out of this mess but i don't think i'm getting anywhere. The picture below shows where I'm stuck at. The sln file is attached below for reference …

Member Avatar for mrnobody
0
141
Member Avatar for mrnobody

hi, i'm did a program in C++6.0 that retrives data from Access. the program was ok and runs normally for quite sometime and suddenly the error [B]"Unable to Create File Buffer"[/B] appear. After searching high and low for solution and trying multiple suggestions, i found that that problem is because …

Member Avatar for vijayan121
0
323
Member Avatar for mrnobody

Here are the classes that i've attempt to create as well as tried to use them but failed. [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Project.GlobalVariables { static class IOCard { public const int TotalInputCard = 10; public const int TotalOutputCard = 10; public class InputCard { public …

Member Avatar for Momerath
0
94
Member Avatar for mrnobody

Hi, Can somebody please advice me on raising/throwing custom exceptions? Here is what I'm trying to do. [CODE] //MainFunction() will call SubFunction() to perform some ADO function. MainFunction() { try { SubFunction() //OtherFunction1 //OtherFunction2 } catch(...) { //to catch custom exceptions raised by me in SubFunction() so that it will …

Member Avatar for caut_baia
0
82
Member Avatar for mrnobody

Hi, I'm doing a program to capture from USB camera. And to do the program, I need directshow which can be found in directX sdk. I read that the new versions of directx are not compatable with VC++ 6.0. Does anybody know where I can get an old version which …

Member Avatar for CppBuilder2006
0
606
Member Avatar for mrnobody

Hi, I've got a modeless dialog. When user click the X button at top right hand corner, I want to catch the event and do some processing. What event do I use for that..? I cannot find OnClose event in the event handlers box. Btw, I'm using VC++ 6 (MFC). …

0
61
Member Avatar for mrnobody

Hi guys.. In my dialog, under void Class::DoDataExchange(CDataExchange* pDX), whenever i call DDX_Control(pDX, IDC_SOMETHING, m_VAR);, I got problem. After some digging, the problem is the function below. [CODE]HWND CDataExchange::PrepareCtrl(int nIDC) { ASSERT(nIDC != 0); ASSERT(nIDC != -1); // not allowed HWND hWndCtrl; m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); //<---- hWndCtrl = 0 if (hWndCtrl …

0
70
Member Avatar for mrnobody

I'm trying to figure out how to change the edit box colour when I click on the button. Btw, i'm using VC++ 6.0 (MFC). One way I can do is assign a colour variable. When I click the button, the colour variable changes. When the program call the OnDraw function, …

Member Avatar for mrnobody
0
2K
Member Avatar for mrnobody

Hi, I'm doing a program in dual core processor. I'm wondering, is it possible for write a program that is core specific..? For example, thread A only runs at core 1 and thread B only runs at core 2. I'm currently looking at [URL="http://www.threadingbuildingblocks.org/documentation.php"]IntelĀ® Threading Building Blocks (TBB)[/URL].. Am I …

Member Avatar for Ancient Dragon
0
125
Member Avatar for mrnobody

Below is a simple code that i wrote about VARIANT. The weird thing is at the end of the code, both vtEmpName and vtDept is "Accounting". [CODE] VARIANT vtEmpName; VARIANT vtDept; vtEmpName.vt = VT_BSTR; vtEmpName.bstrVal = _bstr_t("Joe Schmoe"); vtDept.vt = VT_BSTR; vtDept.bstrVal = _bstr_t("Accounting"); [/CODE] On the other hand, if …

Member Avatar for mrnobody
0
140
Member Avatar for mrnobody

Hi, I'm doing a code in MFC to retrieve DateTime from SQL 2005 and then after do datetime manipulation on it. In the SQL table, the date field is 3/16/2010 2:28:20 PM (obtained by using getdate()). I then retrieve the date from RecordSet and stored into _variant_t. To confirm that …

0
65
Member Avatar for mrnobody

Hi, I'm doing a dialog box in VC++ 6.0. Can somebody please advice me how do I put an icon/bmp file on the title bar..? (Refer to the picture attached) I've tried searching it in books and google but i couldn't find anything. Thanks.

Member Avatar for Ancient Dragon
0
53
Member Avatar for mrnobody

Hi, I've got a dialog box and I use picturebox to put bmp background picture to fill the whole dialog box. After that, I draw some textbox and button in the dialog box. My intention is to have the buttons and textbox infront of the picturebox. But what happen instead …

Member Avatar for Ancient Dragon
0
106
Member Avatar for mrnobody

Hi.. Can somebody please advice me on how to set a powerpoint presentation as the powerpoint.application.activepresentation? In the program below, when the form is loading, it will open 2 powerpoint files (Test1.ppt and Test2.ppt). After Test2.ppt is opened, it will be the activepresentation because it is opened last. What I …

Member Avatar for mrnobody
0
418
Member Avatar for mrnobody

Hi, I've done a vb.net program. The program basically uses few reference for example system.io etc.. In order for my program to run on another computer, the computer need to have .net framework 2.0 installed.. Instead of installing the whole framework, can I just pack the references I used in …

Member Avatar for mrnobody
0
985
Member Avatar for mrnobody

Hi, I'm currently doing a program to search for text in powerpoint files using interop in vb.net 2005. When a user does a search, it will open the powerpoint (.ppt) file and do the search. This is working fine. What I want to achieve next is if the powerpoint file …

Member Avatar for mrnobody
0
100
Member Avatar for mrnobody

Lets say I have a text file which contains a long list of 8bits data and i want to create a .wav or .au file from it. Forexample, my text file contains 8000 bytes for 1 second of audio with the sample rate of 8kHz. How do I create a …

Member Avatar for mrnobody
0
192