|
Have you tried assigning a value to lpfnHook and see what messages that hook function receives when you interact with the dialog (specifically the "Files of type" combobox)?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi ,
I am using "VC++ 2008 Express Edition" and was trying to compile one
VC ++ project taken from this site only, there i came acros the errors which indicates that MFC lib and headers are not shipped by default in VC+ 2008 Express edition.
So can you please tell me how to get them so that i could compile my project for Speech-to-Text project, i am using latest SDK with all
other Libs and headers.Early reply will be appreciated as i need it despirately.
Best Regards,--Raj
|
|
|
|
|
Go buy VS, simple as that.
You can't have VS express and MFC. Go and spend some bucks & learn how to research while you're at it.
|
|
|
|
|
Oki enhzflep,
Once i will purchase the programme, i will be able to compile all those programmes including MFC Hederas and libraries?
If Yes, please share the link where i could purchase that from and any estimated prise.
I am ready to spend bucks, but main thig is ignorance with me ..
Please share with me how to purchase and where purchase from . i am brand new to this Forum and as well as into programming as well ..
|
|
|
|
|
Yup. paid-for VS comes with MFC and will let you compile the examples that use the SAPI.
Also, if you are a student at a recognised (by Microsoft) educational institution or have an International Student Card you can download a copy (for free) of Visual Studio Pro from Microsoft under their Dreamspark program.
You can get Info on VS here:
http://msdn.microsoft.com/en-us/vs2008/products/cc263903.aspx[^]
Make sure you check the available features before purchasing a copy. as an example, if you want to do development for mobile devices then you are unable to use Visual Studio Standard. etc, etc.
seriously dude, www.google.com - try it, it's fantastic.
Ah whatever...
|
|
|
|
|
Does anyone know how to get the level of pressure to use the touchpad with C / C + +?
I could not find any function of the API for this, use only one with C #.
|
|
|
|
|
Hi,
How can I have a HANDLE to my own running process? I want to raise its priority class.
|
|
|
|
|
Ehhh, will ::GetCurrentProcess() do?
Ehh, again after modification...
No, probably not since you want to call ::SetPriorityClass() with a real handle. Use ::OpenProcess()[^] with PROCESS_SET_INFORMATION access right.
Actually I was right from the start even though I pulled it from the memory cache in my head...
Have a look at the sample for ::SetPriorityClass() here[^], it uses ::GetCurrentProcess() to get the process handle.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
modified on Wednesday, September 17, 2008 9:38 AM
|
|
|
|
|
CdrTools is a collection of CD/DVD authoring tools. Its native language is C
and it compiles in Unix. I would like to know if anybody had converted the source code of cdrtools to VC++ or .Net and compiled in Visual Studio?
I am writing an application in MFC for CD/DVD burning, in which i want to use the cdrtools source..
|
|
|
|
|
Dear friends,
I want to draw a rectangle on mouse move. When i press a left button and move it, the rectangle must be move like in paint. In paint when we want to cut something we press left button and drag it. I also want same. When i move the mouse it just draw the rectangle using MFC class and VC++. My mail ID is mohiuddin_vu@yahoo.co.in
Mohiuddin
|
|
|
|
|
Sk Mohiuddin wrote: I want to draw a rectangle on mouse move
And what is your trouble about?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Nothing.
|
|
|
|
|
Actually I know you haven't troubles, Hamid.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
bool fInCapture;
CPoint RubberBandPoint;
CRect RubberBandRect;
void DrawRubberBandRect();
CMyWnd::CMyWnd()
{
fInCapture = false;
}
void CMyWnd::OnLButtonDown(UINT nFlags, CPoint point)
{
CWnd::OnLButtonDown(nFlags, point);
SetCapture();
fInCapture = true;
RubberBandPoint = point;
RubberBandRect.SetRect(point.x, point.y, point.x, point.y);
DrawRubberBandRect();
}
void CMyWnd::OnMouseMove(UINT nFlags, CPoint point)
{
if (fInCapture)
{
DrawRubberBandRect();
RubberBandRect.SetRect(RubberBandPoint.x, RubberBandPoint.y, point.x, point.y);
DrawRubberBandRect();
}
CWnd::OnMouseMove(nFlags, point);
}
void CMyWnd::OnLButtonUp(UINT nFlags, CPoint point)
{
if (fInCapture)
{
DrawRubberBandRect();
ReleaseCapture();
fInCapture = false;
}
CWnd::OnLButtonUp(nFlags, point);
}
void CMyWnd::DrawRubberBandRect()
{
CClientDC dc(this);
int nPenWidth = 4;
CPen DrawPen(PS_SOLID, nPenWidth, RGB(0x80,0x80,0x80));
CPen *pOldPen = dc.SelectObject(&DrawPen);
CGdiObject *pOldBrush = dc.SelectStockObject(NULL_BRUSH);
int OldROPMode = dc.SetROP2(R2_XORPEN);
dc.Rectangle(&RubberBandRect);
dc.SetROP2(OldROPMode);
dc.SelectObject(pOldBrush);
dc.SelectObject(pOldPen);
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can a nice guy like you be a friend of such a bad guy as led mike?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Good cop/Bad Cop[^]
Who's which, I don't know
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi,
I have a custom develpoed ListControl which have combobox in it. I wrote the code to notify the ListControl about the SelectionChange in ComboBox by writing a Windows User Defined Message.
void CComboBoxExt::OnSelChangeCombo()
{
....
GetParent()->SendMessage(UWM_NOTIFYSELCHANGE,nRow,nCol);
}
Now in the Parent Control ( here ListControl ) I want the ListControl to send the message LVN_ITEMCHANGED which is the message sent by thewindows framework when an item in the ListControl is changed, so the end user doent need to handle a seperate my own created message.
ON_MESSAGE(UWM_NOTIFYSELCHANGE,OnChildSelNotify)
void CListCtrlEx::OnChildSelNotify(int nRow,int nCol)
{
GetParent()->(LVN_ITEMCHANGED,);
}
My query is which structure should I send as the paarmeter ? The Handler function for LVN_ITEMCHANGED takes pointer to NMRHDRSTRUCTURE. Any help will be appreciated.
Thanks
Vikas
With Reagards
Vikas
|
|
|
|
|
char* t1 = "C:\\a.txt";
char* t2 = "C:\\b.txt";
char* t3 = "c:\\c.txt";
(VC++6.0)please guide I copy content of 2 a and b to c ???. thanks very much
I coded ERROR. open binary ==> it will read \r\n ==>error
e.g:
file a.txt
ABCDED
file b.txt
DDDDDDDDD
file c.txt. ==>>
ABCDED
DDDDDDDDD
content coded
bool copyFile (const char SRC[], const char INPUT2[], const char DEST[])
{
std::ifstream src; // the source file
std::ifstream input2;
std::ofstream dest; // the destination file
src.open (SRC, std::ios::binary); // open in binary to prevent jargon at the end of the buffer
input2.open(INPUT2, std::ios::binary);
dest.open (DEST);//, std::ios::binary); // same again, binary
if (!src.is_open() || !dest.is_open())
return false; // could not be copied
dest << src.rdbuf (); // copy the content
dest << input2.rdbuf();
dest.close (); // close destination file
src.close (); // close source file
return true; // file copied successfully
}
int main(int argc, char* argv[])
{
if (!copyFile ("C:\\n\\po7.txt", "C:\\n\\po8.txt", "C:\\npo8888.txt"))
std::cout << "File could not be copied successfully";
else
std::cout << "File copied successfully!";
std::cin.get (); // pause for input
return 0;
}
|
|
|
|
|
Not quite sure what your question is.... I've tried your code, and it does indeed copy the contents of a.txt and b.txt to c.txt
If I have \r\n in the input file, it is copied. If I do not have it, it's not copied. The code functions as it seems it should. What were you expecting, may I ask?
Also, have you tried looking at the text files with a hex-editor? Some text editors automatically insert \r\n at the end of the file when you save it, even if you didn't want them there. E.g Code::Blocks editor.
Also, if you put the line
using namespace std;
up in the top of your code somewhere, you can avoid having to type std:: all over the place.
Here's the code I tried.
#include <iostream>
#include <fstream>
using namespace std;
bool copyFile (const char SRC[], const char INPUT2[], const char DEST[])
{
ifstream src;
ifstream input2;
ofstream dest;
src.open (SRC, ios::binary);
input2.open(INPUT2, ios::binary);
dest.open (DEST);
if (!src.is_open() || !dest.is_open())
return false;
dest << src.rdbuf ();
dest << input2.rdbuf();
dest.close ();
src.close ();
return true;
}
int main(int argc, char* argv[])
{
if (!copyFile ("a.txt", "b.txt", "c.txt"))
cout << "File could not be copied successfully";
else
cout << "File copied successfully!";
cin.get ();
return 0;
}
|
|
|
|
|
Hi
How can i convert
const std::string& sMyString
to a CString ?
Can anyone help
thanks
Simon
|
|
|
|
|
what about reading the docs first ?
did you see the method std::string::c_str() ?
std::string s = "hello";
CString str = s.c_str();
|
|
|
|
|
Provided UNICODE is not defined...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
that's right.
otherwise, the following should do it :
CString str = CA2T(s.c_str());
|
|
|
|
|
Or simply use std::tstring[^], then it does not matter if UNICODE is defined or not.
|
|
|
|