|
|
i am not looking for a VC++ program which returns the PC configuration.
for that matter i am not looking for any program.
I have written an application. When i deliver this application i have to mention in the catlogue the minimun PC requirement. Can u please tell me how to check if it will run in a P3 and not in a P2 processor
-- modified at 8:43 Friday 30th December, 2005
|
|
|
|
|
What I understood know is that ur application is hardware dependent.If I m right then it is not a simple application but a device driver or system programming sort of thing u have done.
never say die
-- modified at 8:59 Friday 30th December, 2005
|
|
|
|
|
i shudnt have mentioned the usb and tuners in my post. that created the confusion. Let me try and make it a lil more simple.
I wrote an application.
Will in work fine on a P1/P2/P3 processors?
How can i find tat out?
Do i have to keep trying on older pcs until i find one in which it doesnt run??
I hope there is a better way
-- modified at 11:24 Friday 30th December, 2005
|
|
|
|
|
If it is a normal application then Hardware problem is not that significant unless ur appilcation is not meant for specific OS say WinXP (in this case WinXP specification is required).Still u can check ur application in another hardware configuration for ur satisfaction
never say die
-- modified at 9:22 Friday 30th December, 2005
|
|
|
|
|
I have build an help file to document my program.
I have done an item on my menu to execute it.
Im my Computer it's work well but when I execute my exe file in an other pc it search an HLP file (c:\miki\suivib.HLP, suivib is the name of my program).
What to do so that the help file became part of my program, any where i can execute it.
I learn my self
|
|
|
|
|
To me has fallen the task of documenting an in-house database created in OLE 2.0. This DB is accessed only through an API of which there is no source code. Through attrition and evidently poor documentation, the DB layout is basically lost. It is also quite complex with subsequent programmers, who did not understand it, jury rigging it to add functionality to it. Viewing it in Docfile Viewer does show the various "tables" within the DB, and the Uni-Code data is plain to see. Trying to traverse the DB manually and figure out how the system of pointers is working is making no sense to me. Of course without the layout, it's hard to tell what IS a pointer within the DB. I have worked with DB's of a similar nature and complexity before where we did have the layout and was successful with those. Creating a simple record in this DB using the existing software and then trying to see the before and after in simple additions to the data are not working for me.
My question is: Is there anyone that could give me some pointers on where to go with this? Are there good tools to use? I do have the C++ debugger for the executable only (no source code, remember) and the Doc File Viewer.
Sheljo
|
|
|
|
|
hi...
I am using Window CE emulator as a CPU choice to debug my eVC++ program.Can i able to open my PC's com port thrugh this emulator option.I am running this emulator in Window XP environment.
thanx in advance..
birajendu
CyberG India
Delhi
India
|
|
|
|
|
It started because I wanted a graduated caption bar. I then wanted different buttons - Close, Minimize and Help. I can draw these ok using variations on the famous Paul DiLascia caption project. The Help button occupies the place of the conventional Minimize, and the Minimize occupies the place of the conventional Maximize. How does Windows handle the tooltips, it seems to be by some arcane process. I want to know how to display the correct tooltips and to respond correcly to button presses.
Dave Regan (new to Windows - exVMS man)
-- modified at 11:55 Friday 30th December, 2005
I know about CToolTipCtrl and have used it elsewhere. The difficulty is in knowing where and what to override in CFrameWnd to intercept the system framework tool tips. Spy reveals the only messages are WM_NCMOUSEMOVE, WM_SETCURSOR, and WM_NCHITTEST. I'm assuming that after enough WM_NCHITTESTs are received with the same coords the 'hidden' system functions respond.
|
|
|
|
|
Dave Regan wrote: Paul DiLascia caption project
Where is it. Any link? I missed out. He he.
Dave Regan wrote: How does Windows handle the tooltips, it seems to be by some arcane process
There is a CToolTipCtrl for this purpose. A good reading will do. When the mouse hovers over a control the tooltip is displayed. And when mouse leaves it's gone (LOL This is Magic ).
Dave Regan wrote: and to respond correcly to button presses
WM_LBUTTONDOWN for a click.
WM_LBUTTONDBLCLK for double click.
BN_CLICKED
BN_DBLCLK
You have to handle these message properly. There are others too.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I want to understand the architecture of PrintPreview. I didnt find any documentation regarding CPreviewView in MSDN plus explanation of Print Preview is very minimal. Can some one plz guide me to a detail article about Print Preview Architecture ?
I shall be very thankful.
Best Regards,
|
|
|
|
|
hi.., a happy n prosperous new year..,
my app makes use of ShellExecuteEx to run an initializing process(on OnInitInstance). It takes some 5 to 7 seconds to finish, so i spawn a thread which has a progressbar which steps for 7 secs. my app WaitForSingleInstance till the Delay(Progress)Dlg PostQuitMessage. Then it doModals the main dlg.
Its all workin fine but when my main dlg is shown, it loses focus. I've tried setActivewnd, setforegrndwnd, setfocus, etc. on the InitInstance of my main dlg. i wanna kno how i can bring da dlg to the foregrnd.
also on enter/esc key press the app exits, its the OnOK() OnCancel(), nope? can i prevent this by a do nothin override?
thanks,
-- ano
|
|
|
|
|
whizano wrote: so i spawn a thread
I think this is the reason. The main thread does not own the dialog. I think so. Since you are popping up the dialog from this thread.
whizano wrote: Then it doModals
How can you call all those functions when you have called DoModal()...
Coz unless the dialog closes nothing will work. Calling before won't work too.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
its al in OnInitInstance
--i spawn a new thread XX which shows a dlg
--shellexecute
--waifrosingleobject(thread XX)
--maindlg.domodal
thanks,
-- ano
|
|
|
|
|
Hi,
I am using "USB to serial port converter" to program my
USB port.As soon as the USB cable is plugged-in the driver
installed allocates a COM port number to the USB Port.
Usually the last allocated port number is for USB.In my
program when the user opts for communiocation over USB
port i will find all the valid ports in the pc and assume
the last port number as the USB port number.If the USB cable
is not connected then no COM Port number is allocated to USB
port.So the method i am using to find out the COM port number
allocatted USB port is not robust method. So i just want to
know whether there is any method to find out the USB cable
connected to the USB port through VC++ code.
Thanks
|
|
|
|
|
You should not need to know if it is attached to a USB port. The user should know if they are connecting to the correct port. If the equipment attached to the port needs to be of a particular type, then the equipment must be able to answer a query so that I can say "yeh, it is me".
Forget this last allocated port stuff, it does not matter.
INTP
Every thing is relative...
|
|
|
|
|
Hi, I couldn't tell which forum to post this in, so I hope I got the right one!
Basically I'm creating an app where the entire thing is controlled by scripts. I want to be able to create a window on-the-fly, with controls added via scripting. The problem is I'm also trying to do it in MFC.
I've had a look at the message map, and realised it's static, so even if i could hack into it and change some entries dynamically, I'd still have to create a different class for each different window, which is not what i want.
I've also had a look at overriding the WindowProc() function in my dialog, and dispatching WM_PAINT, WM_NCPAINT, and WM_DRAWITEM messages to my list of controls. Although this seems the most promising approach, the controls don't draw. (The OnPaint() handlers ARE called successfully though.) I usually wouldnt just die there and post on a forum but i actually have no idea how to debug this!
Any help would be MUCH appreciated!
James Molloy
|
|
|
|
|
Hi,
it is possible to do this even in MFC but it will cost a lot of programming
depending on how much you you would like to add dynamicaly but this is the
priciple.
You can add control dynamicaly to a window or say an empty dialog by the following code.
Step 1:
Add in the main class a pointer to a CBUTTON
class CMyDlg
{
...
CButton* m_pButton;
}; Add in the implementation the following code:
BOOL CMyDlg::OnInitDialog()
{
...
CRect rtWnd(10,10,210,32);
m_pButton = new CButton();
m_pButton->Create(_T("Test"), BS_PUSHBUTTON | WS_VISIBLE, rtWnd, this, 1000);
return TRUE;
} The 1000 is the ID of the control that is known by the dialog and should be unique.
This will add a button, and you can control the button later by the m_pButton object.
Step 2: the Click event
Normaly the wizard would add the following code to implement this
ON_BN_CLICKED(IDC_BUTTON1, &CWndScriptDlg::OnBnClickedButton) where IDC_BUTTON1
is the id of the button that has been pushed. This is like you said static and no use to us.
But there is a macro that fits oure needs: ON_CONTROL_RANGE . This is how we must use it:
Add the function header in the class:
class CMyDlg
{
...
CButton* m_pButton;
afx_msg void OnButtonClicked(UINT uiDlgCtrlId);
}; and add in the message map the MACRO
BEGIN_MESSAGE_MAP
...
ON_CONTROL_RANGE(BN_CLICKED,1000,1099,&CWndScriptDlg::OnButtonClicked)
END_MESSAGE_MAP() Then add the implemantation of the function
void CWndScriptDlg::OnButtonClicked(UINT uiDlgCtrlId)
{
AfxMessageBox(_T("Hello"));
} The range from 1000 to 1099 is the range we have reserved for CBUTTON this
allows to add 100 buttons to the dialog. The BN_CLICKED is the event we want to link
to the function. The UINT uiDlgCtrlId gives us the id of the control that has been clicked.
Step 3: Getting data from the controls
We can alsoo use DDX to get data from the controls.
Lets add a CEdit to our dialog
class CMyDlg
{
...
CButton* m_pButton;
CEdit* m_pEdit;
afx_msg void OnButtonClicked(UINT uiDlgCtrlId);
}; create it in the InitDialog function
BOOL CMyDlg::OnInitDialog()
{
...
CRect rtWnd(10,10,210,32);
m_pButton = new CButton();
m_pButton->Create(_T("Test"), BS_PUSHBUTTON | WS_VISIBLE, rtWnd, this, 1000);
rtWnd = CRect(10,110,210,130);
m_pEdit = new CEdit();
m_pEdit->Create(WS_BORDER | WS_VISIBLE, rtWnd, this, 1101);
m_pEdit->SetFont(GetFont());
return TRUE;
} Now we can use the control by DDX, but we can't use UpdateData to transfer the data to our variables. We must call the DDX functions directly:
void CWndScriptDlg::OnButtonClicked(UINT uiDlgCtrlId)
{
int iValue = 0;
CDataExchange dx(this, true);
DDX_Text(&dx, m_pEdit->GetDlgCtrlID(), iValue);
iValue += 2;
dx.m_bSaveAndValidate = false;
DDX_Text(&dx, m_pEdit->GetDlgCtrlID(), iValue);
}
This allows you to add dynamicaly controls to your window, and work with them.
I hope that this helps you to create what you need.
Merry Xmas and a Happy New Year
Kurt Pattyn
codito ergo sum
|
|
|
|
|
Guys how can i declare a varible of type char and then later in my program set the size of the char buffer to suite the size of the file being read into the buffer? C++
|
|
|
|
|
LPTSTR pszFileText;
DWORD dwFileSize;
dwFileSize = ::GetFileSize(hFile, NULL);
if(dwFileSize != INVALID_FILE_SIZE)
{
LPTSTR pszFileText;
HGLOBAL hGlobal = ::GlobalAlloc(GPTR, dwFileSize + 1);
pszFileText = (LPTSTR)::GlobalLock(hGlobal);
if(pszFileText != NULL)
{
DWORD dwRead;
if(::ReadFile(hFile, pszFileText, dwFileSize, &dwRead, NULL))
;
}
::GlobalUnlock(hGlobal);
::GlobalFree(hGlobal);
}
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
char *p;
latter calculate how much memory you want,
p = (char*) malloc(size);
-Prakash
|
|
|
|
|
char* buffer;
int fileSize = WhateverToGetFileSize();
buffer = new char[fileSize];
DoStuffWithBuffer(buffer);
delete[] buffer;
|
|
|
|
|
Hi,
The small experience that I have with VC++ is not enough to figure out how to run a process and to be able still to use another application.
I appreciate any help.
tony
|
|
|
|
|
You can put the application in the background by creating a hidden window or no window at all.
But what is that you want to do with other application?
-Prakash
|
|
|
|
|
Hi,
I want to do data acquisition and plotting of obtained values and in the same time to use Internet Explorer, for example.
Tony
|
|
|
|