|
what language is that ?
obviously not C++ !!
|
|
|
|
|
Giorgi Moniava wrote: 1) Register an extension for my application on the system where it will be installed.
See here (second response).
Giorgi Moniava wrote: 3) When the user opens the file with the abovementioned extension I want that my program was launched.
This is the same as #1, and should happen automatically.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
In a MFC dialog based programm, I add a button control, and the corresponding message function is:
void CHhhhDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CClientDC clientDC(this);
CDC memDC;
memDC.CreateCompatibleDC(&clientDC);
CRect rcClient;
GetClientRect(&rcClient);
CBitmap membitmap;
membitmap.CreateCompatibleBitmap(&clientDC, rcClient.Width(),
rcClient.Height());
memDC.SelectObject(&membitmap);
for (int x = 0; x < rcClient.right; x ++)
{
for (int y = 0; y < rcClient.bottom; y ++)
{
memDC.SetPixel(x, y, x < y ? RGB(255, 255, 0) : RGB(255, 0, 0));
}
}
clientDC.BitBlt(0, 0, rcClient.Width(), rcClient.Height(), &memDC, 0, 0, SRCCOPY);
}
Now, I want to comments the last statement, and save the memeory bitmap (memDC) to a BMP file.
How can I achieve this objective.
Thanks!
|
|
|
|
|
if you want to save bmp file use CImage::Save
-- modified at 8:40 Wednesday 15th March, 2006
|
|
|
|
|
FleetAdmiral wrote: How can I achieve this objective.
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi all,
i have been working on incorporating crystal reports into an mfc application. I am able to call the RunReportWizard method in the following way.
/////
m_Application->RunReportWizard(m_Report," ");
//where m_Report is IReportPtr and m_Application is IApplicationPtr.
Its working. but is it the correct way of calling. The second parameter in which i am passing an empty string must specify the datasource. Can anyone also please tell me how can i pass only a certain type of data connection to this method. the wizard shows all the available connections.
Please help.
|
|
|
|
|
HI all
I have an application which uses a Filetransfer module (.tli file is involved while i debug) .
And a function raw_SendFile fails with return value of 0x80004005 (E_FAIL) when it tries to send a file.
To give more info : This function is called N times to send N files , and it properly sends say 10 files . And exacltly when it sends the 11th file named ramdisk\rd.gz it fails . And everytime this is reproducible and exacltly at this file , this function fails .
And my search in MSDN about E_FAIL says "Unspecified error" . What is this unspecified error ?
How can I solve it ?
Can anyone please help me ????
redindian
|
|
|
|
|
Generally, this a sign of poor implementation of the component. Any developer that returns E_FAIL instead of an appropriate error code should be shot...! Not that E_FAIL does not have its uses - it does, but clearly not here.
I would be looking into what might be special about that 11th file - is it on a different device, is it locked, etc.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi James
Thanks .
Well I would like to add more points to you .
The files are taken from a delivery folder in a server, say A .
The application that tries to send these files are in system , say B.
And the destination is also a server ,say C, in a remote location , to which B connects via modem direct .
So when B tries to send the files from A to C this error occurs .
And one interesting thing is -> B is a linux call server which is called a PABX in telecom .
Could you please clarify the points ?
a) How will you check whether the file(s) is locked or not ?
b) Will ethreal traces be helpful ?
Thanks in advance
redindian
|
|
|
|
|
Hi James
Sorry I typed wrong ...
Server C is the callserver .
System B is XP
Server A is sun machine (A is not involved in this problem)
regards
redindian
|
|
|
|
|
Hi again
I hava another question for you but this i time i'm completly lost.
I need to connect to a database in order for retriving and storing.
I've never done something simmilar before so i have no idea.
i prefer to use mysql database.
i've read something about odbc and thats what i'm willing to use(if u have other suggestions pls tell me)
Any way can anybody tell me what i need to include
and what are the first steps of the code to connect to the database(is it possible to avoid wizards).
Also do u have any good reference on this matter which i can read to get a good understanding of how odbc works.
Thanks in advance
|
|
|
|
|
Here is a semi-relevant article.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Hi All,
has anybody used the Local Security Authority API's.
basically i need to Grant Network logon rights to a particular user.
if u have any sample code or have any information regarding this please let me know.
Thanks
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmgmt/security/opening_a_policy_object_handle.asp
maybe it is some helpful to you
|
|
|
|
|
|
Hi!!
I have a problem and I'm not founding the solution..
I send a fax via Office Outlook from a vc++ program.
My problem is that if I send it with a profile that hasn't got the coversheet, outlook puts however a white page before my fax only with the line "Subject:...".
I think that I ought to set a mapi property, but I have no idea of what!!
thank you
martina
|
|
|
|
|
I would expect that if I use:
CClientDC dc(this);
inside the code for a dialog box it would pick up the font used for that dialog box. In fact, it doesn't. I had to add:
currFont.CreatePointFont(80, "MS Sans Serif", &dc);
oldFont = dc.SelectObject(&currFont);
and then it measured the text extent correctly. (I got the font name and size from the dialog template.)
Clearly, it won't change unless I change it in the project, but I am curious to know how to pick up the information "automatically".
Any suggestions? Thanks,
Ilan
|
|
|
|
|
|
Thanks. I didn't think it was that simple.
It must be internally this.GetFont(), otherwise I don't know how it could figure out which font I want.
In any case, it works....
Ilan
|
|
|
|
|
You are right - CWnd::GetFont() returns current font for window. This font is not selected automatically in compatible DC on creation.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
As an aside, i ran into this earlier this week in a WinCE (PocketPC 2002) app i was working on.
I found that calling CWnd::GetFont() for a CDialog window always returned NULL.
Turns out this is expected (from MSDN WM_GETFONT for WinCE):
The WM_GETFONT message does not return a font handle if the message is sent to a dialog box created by the DialogBoxParam, DialogBoxIndirectParam, CreateDialogParam, or CreateDialogIndirectParam functions.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi,
I have derived a class from the CEdit and overided the function PreSubclassWindow(). Inside this function, I called the SetFont function.
The control works fine if this class is made as the control varaible type. But when I Created a object and called Create() function it throws exception
I found its because of the SetFont in PreSubclassWindow.
Is there any way to get ride of this?
or
Is there any function/message for Edit box(other than PreSubclassWindow)where i could do initialization after the window is created?
Plz help
Thanks in advance
nave
|
|
|
|
|
Naveen R wrote: Is there any function/message for Edit box(other than PreSubclassWindow)where i could do initialization after the window is created?
OnCreate();
Nibu thomas
Software Developer
|
|
|
|
|
We will not get this message while if we create a memeber variable for a control( While creating memeber variable it internally calls SubCalssWindow).
nave
|
|
|
|