|
G Haranadh wrote: fter long time.
yeah after very long time.. where do you went! me too happy to meet you again....
yeah ssl is tough thing.. try Ultimate toolbox they have some class dealing with ssl!
|
|
|
|
|
Ohh great friend. Now my program is compileing... Its ok. but getting crashes in between. while debug mode.
ThatsAlok wrote: ssl is tough thing..
But i need to do in that only friend. client requirement is that only.
Thanks again.
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
G Haranadh wrote: But i need to do in that only friend. client requirement is that only.
client is god of S/w Industry !
|
|
|
|
|
Thanks a lot Mr.Alok... At last we solved the problem.
Followed some instructions.., Perl installation.., some ssl supported files..., Includeing into our project.., path settings... etc etc... after lots of background work.. now it is compileing and almost working..
Thanks for giveing me support Mr. Alok.
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
G Haranadh wrote: Followed some instructions.., Perl installation.., some ssl supported files..., Includeing into our project.., path settings... etc etc... after lots of background work.. now it is compileing and almost working..
you must have work very hard to achieve same.. good!
|
|
|
|
|
In my application i have a window that can display different views.
I want to generate bitmaps of some graphs, i have a graph view (CView), but it is not displayed (ie is not attached to the window) at the time.
I think what i want to do is create an offline 'dummy' CView and use OnDraw with a 'memory' dc, so that i can then write it out as a bitmap.
Does anyone have an idea of how to properly create this 'dummy' view so that it would be possible to draw? The CView's base class stuff like the CWnd* handle is not set if i just use the constructor.
I would very much appreciate any guidance.
Simon.
|
|
|
|
|
You can hide and show a "view" with ShowWindow() but you'll need to create the window so
the HWND is valid. When the view window is hidden you can't draw on it, so is having an
offscreen view really necessary?
If you really need to do this, you'll still have to repaint the bitmap when the window is shown
so maybe just using one view window and memory bitmap(s) is a simpler solution.
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I am not sure what you are doing, but it sounds like you just need to create a bitmap of the information that can be viewed latter. Create a function that you can pass the information to and in it: (1) create a memory dc, (2) create a screen compatible bitmap, (3) select the bitmap to the dc, (4) draw to the dc, (5) restore dc to original state, (6) return new bitmap to caller. Once you have the bitmap can figure out what to do with it at a latter date, including transferring ownership to some future CView window.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hi, thanks.
Thats the sort of thing i was trying but i'd end up with loads of black lines like a barcode.
I thought it might be because the hwnd of the view hadnt been setup properly or something. My graph data is stored seperately from the view which simply manages the DC and mouse/key strokes.
(The reason im doing it this way is that one view can be made to show different graphs)
I'm trying something that vaguely resembles...
CGraphView dummyview; (derived from CView)<br />
dummyview.SetMyGraph(graph);<br />
dummyview.SetSize(rect);<br />
dummyview.WriteToBitmap("bitmap.bmp")<br />
<br />
CGraphView::WriteToBitmap(CString file)<br />
{<br />
CDC pDC;<br />
pDC.CreateCompatibleDC(CDC::FromHandle(wglGetCurrentDC()));<br />
<br />
CBitmap bitmap;<br />
bitmap.CreateCompatibleBitmap(&pDC, rect.Width());<br />
CBitmap* oldBitmap = pDC.SelectObject(&bitmap);<br />
<br />
OnDraw(&pDC);<br />
<br />
int pixels = rect.Width() * rect.Height();<br />
BYTE* bits = new BYTE[pixels*4];<br />
<br />
glReadBuffer(GL_BACK);<br />
glReadPixels(rect.left, rect.bottom,rect.Width(),rect.Height(),GL_RGBA,GL_UNSIGNED_BYTE,bits);<br />
...<br />
bitmap.SetBitmapBits(pixels*4,bits);<br />
...<br />
then write bitmap to file<br />
}
|
|
|
|
|
It looks like a barcode probably because the default bitmap in a memory DC is monochrome and you
are creating your bitmap to be compatible with this monochrome bitmap.
Try
bitmap.CreateCompatibleBitmap(CDC::FromHandle(wglGetCurrentDC()), rect.Width(), rect.Height());
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
hello everyone
im trying to make a c++ program that rar files.
i mean i take "blabla.avi"
and it will compress it in store method to blabla.rar
and split on 15000000 byets..
now i tryed to opened few rared files with hex editor and i manged to find thats its something like
header
filename
data from orginal file, not compressed or something because its store method
then a few more bytes..
my problem is i dont understand the header...
i tryed and searched @ google but i cant understand any explantion
here is a demo of one header:
526172211A0700CF907300000D00000000000000445374208027000300000003000000024DB1ED18368A6E361430070020000000
p.s:
if its not the right forum plz move it i didnt know where to post this
|
|
|
|
|
You can find the "UnRAR source" here: http://rarlabs.com/rar_add.htm[^]
In this package, there's a file headers.hpp , which contains all the block definitions.
I think there's some real specification, too (at least there was some time ago), but I couldn't find it anymore at the first glance.
|
|
|
|
|
thnx but it didnt much helped, i've been there before..
wasnt able to understand whats going on @ this header file
too much old header and stuff..
i just want to know what each byte means @ the header of the rar
but thnx anyway for trying to help
|
|
|
|
|
I have an Win32 application. I want to make this application singleton, how to do it. Please advice.
What do I need to do to Winmain() function to make the whole application Singleton. Any help greatly appreciated.
Thanks
Turbo.
|
|
|
|
|
By singleton do you mean only one instance runs at a time?
If so...something like this (taken from MS recommended method):
HWND hMainWnd;
if ((hMainWnd = ::FindWindow("MyMainWindowClass", 0)) != 0)
{
HWND hChildWnd = ::GetLastActivePopup(hMainWnd);
::SetForegroundWindow(hMainWnd);
if (hChildWnd != hMainWnd)
::SetForegroundWindow(hChildWnd);
return 0;
}
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Is this a service application? If so then the code I posted doesn't apply. You'd need
some other form of interprocess communication to check for another instance. A named pipe is a
simple solution.
The code I posted is for a GUI app (an app with at least one window).
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Yes Singleton in the sense I want only one Application exe running. I dont understand how to use the above code. My Winmain() looks like this. Can you please tell me how to use your code in this function.
<br>int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
<br>{<br>DWORD dData=0;<br>g_hServiceStopEvent = CreateEvent(NULL,TRUE,FALSE,NULL);<br>g_hMainThread=CreateThread(0,0,Func_MainThread,0,0,&dData);
<br>while(TRUE)<br>{<br>MSGmsg;<pre><br><br>if(PeekMessage(&msg,NULL,0,0,PM_REMOVE))<br>{<br>
<br>else<br>{<br>WaitForSingleObject(g_hServiceStopEvent,500);<br>} } CloseHandle(g_hServiceStopEvent); return 0; }
Thank you,
Turbo.
|
|
|
|
|
you also can check hPrevInstance. Using this handler you can control your application. If previous instance existed then you can restrict to create new instance. This idea may be useful to you.
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
hPrevInstance is always NULL In 16-bit Windows it was useful.
Although, the docs for this do suggest a method:
"Handle to the previous instance of the application. This parameter is always NULL. If you need
to detect whether another instance already exists, create a uniquely named mutex using the
CreateMutex function. CreateMutex will succeed even if the mutex already exists, but the function
will return ERROR_ALREADY_EXISTS. This indicates that another instance of your application
exists, because it created the mutex first. However, a malicious user can create this mutex
before you do and prevent your application from starting. To prevent this situation, create a
randomly named mutex and store the name so that it can only be obtained by an authorized user.
Alternatively, you can use a file for this purpose. To limit your application to one instance per
user, create a locked file in the user's profile directory."
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I suggest you read Joe Newcomer's article on the subject here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
// Check for the event if not create create the event
HANDLE hnd = OpenEvent(EVENT_ALL_ACCESS, FALSE, "DEVICE_COM_SETTING");
if(hnd != NULL) //event exists = app is running
{
//::AfxMessageBox("Device com setting is already Running");
return FALSE;
}
else
{
CreateEvent(NULL,FALSE,FALSE,"DEVICE_COM_SETTING");
}
|
|
|
|
|
Hi,
Actually i have dialog based application that need to support more than one language.All the language text available in header file based on the language selection text can be loaded into dialogs and its controls(working fine for French). when i do the same with Japanese only i could see only consecutive squares. Any one suggest how do i over come this problem?
Thanks,
Rameshkanth
|
|
|
|
|
Hi all,
I'm writing an application using MFC in VS2005. When I click on the File menu in the app I get an invalid argument exception. When I looked at the method throwing the exception (_AfxAbbreviateName in filelist.cpp) the exception was thrown by the line:
<br />
ENSURE(cchFullPath < cchMax);<br />
where cchFullPath is the string containg the path and cchMax is the limit to the width of the path that will be displayed. This value has a default value of 30.
The method appears to be intended to abbreviate a path with more characters than 30. However, unless I'm greatly mistaken it just throws an exception after 30 and so the list cannot be filled.
Has anyone seen this before and come up with a work around?
Thanks
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
Hi,
I want to add a new function in the existing CShockwaveFlash class.So,for that i changed class id of that class .It is registering the clsid,but not recognizing that class(Iam not getting any output,instead of that displaying a messagebox to register with the previous clsid).Whether we should not change the clsid ?
Siddharth
|
|
|
|