|
Thanks David It did help n I got the o/p. It's in decimal ,I will check out how to get it in the format #.#.#.#
bye n have a nice week end
Regards
Supriya Tonape.
|
|
|
|
|
Supriya Tonape wrote:
,I will check out how to get it in the format #.#.#.#
The variables for that are also mentioned in that article.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi David,
Can U plz explain how to get file version in #.#.#.# I m not getting how to get it after VerQueryValue().
thanks in advance
Supriya Tonape.
|
|
|
|
|
Hi David,
I got it, dont look into this now
bye
Supriya Tonape
|
|
|
|
|
typedef struct _verStruct<br />
{<br />
unsigned short Minor;<br />
unsigned short Major;<br />
}VerStruct;<br />
stringstream SS;<br />
char *pBuff;<br />
char SubBlock[255];<br />
VerStruct *MajorVer,*MinorVer;<br />
WORD wCountry = 0x0409;<br />
WORD wCodePage = 0x0000;<br />
void *Base;<br />
VS_FIXEDFILEINFO *FileVerInfo;<br />
unsigned int Length;<br />
pBuff=NULL;<br />
<br />
string FileName;<br />
try<br />
{<br />
strcpy(SubBlock,"");<br />
FileName = "SomeFile"<br />
Length = GetFileVersionInfoSize(FileName.c_str(),0);<br />
pBuff = (char *)calloc(sizeof(char),Length);<br />
GetFileVersionInfo(FileName.c_str(),NULL,Length,pBuff);<br />
DWORD ErrorNum = VerQueryValue(pBuff,"\\",(void **)&FileVerInfo,&Length);<br />
Base = &(FileVerInfo->dwProductVersionMS);
MajorVer = (VerStruct *)Base;
Base = &(FileVerInfo->dwProductVersionLS);<br />
MinorVer = (VerStruct *)Base;<br />
}<br />
catch(...)<br />
{<br />
string Message = "Unable to determin the Local version";<br />
_bstr_t OutMessage = Message.c_str();<br />
return Error((BSTR )OutMessage);<br />
}<br />
SS << MajorVer->Major << "." << MajorVer->Minor << "." << MinorVer->Major << "." << MinorVer->Minor;<br />
_bstr_t OutVal;<br />
OutVal = SS.str().c_str();<br />
*pVal = OutVal.copy();<br />
return S_OK;
a programmer traped in a thugs body
|
|
|
|
|
Hey Hi,
Thanks a lot, Ur snippet did help me to solve my probs
thanks again n bye
Supriya Tonape
|
|
|
|
|
Hi All
I am making a dialog based application using MFC.
I have written a function which is as follows:
Function(CString strPath)
{
CString strTempPath;
strTempath = strPath;
}
Now when i debug this function then as soon as control passes line "strTempath = strPath;"
It causes UNHANDELED EXCEPTION ERROR.
Why it is happening?
Please reply.
Thanks
|
|
|
|
|
rajeevktripathi wrote:
Function(CString strPath)
{
CString strTempPath;
strTempath = strPath;
}
Could you show me your actual coding and what actual value coming in strPath..
OT: try to follow nominal Variable naming convention while coding
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Can you tell wots the exact error message. I feel your memory was already corrupted some time before it reached the Function(), but unfortunately its showing only from Function().
suhredayan There is no spoon.
|
|
|
|
|
You better rebuild the application again.. It might help..
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
Hi!
I have a question about afx-message-handling in a MFC-Dialog (VS.NET 2003, WinXP).
I've got a main Dialog (CDialog) and a Child-Window in it (CStatic).
The goal is to handle afx-messages from the CStatic (ie. ON_WM_LBUTTONDOWN()) .
I did use the standard afx-message-map-mothod (ie. mapping ON_WM_LBUTTONDOWN() to afx_msg void OnLButtonDown(UINT nFlags, CPoint point)), but nothing happens.
Only the messages and handlers of the Main-Dialog are working.
I tried to put the focus on the Child-Window manually - no sucess. I tried to use CWnd instead of CStatic - no sucess.
Perhaps the CDialog messages are blocking the messages of the CStatic?!
Im really new in this and need a hint.
thanks in advance!
_NielsB
|
|
|
|
|
|
Include this style: SS_NOTIFY with the CStatic.
m_Static.ModifyStyle(0,SS_NOTIFY);
this is this.
|
|
|
|
|
|
Sir
I am working as a developer in a company
which is about to develop a VOIP communiction
terminal, i need help for the firmware & coding
Meaning is there any Good SoC available in market
for VOIP , or if ther any Stack available for Voip.
Currently we making a feasibility study by making a
small project in VC++ and implementing VOIP on LAN.
Were can i find the refrences for H.323 & SIP ?
If u know any forum from were i can get help let me know
Eager for your reply
vikas.amin@embin.com
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
How to load bitmaps on to the dialog box
Plz give a simple code to understand.
Because I am new to MFC
Praveen Chowdam Kumar
|
|
|
|
|
|
hello,
i'm developping a database application in visual c++ and i want to vue and print report from database access 2000.
How can i process ?
help me please!
hervy
|
|
|
|
|
I developed an application ,In which it popup messages to a respective time.
I used OnTimer() function .,
When I move my mouse cursor on to the application , It starts blinking.
How to avoid this Blinking.
Plz reply urgently.
Praveen Chowdam Kumar
|
|
|
|
|
Message boxes are Modal. You must dismiss them if you want to go back to the application.
The solution is to create your own "Custom Message Box", which is Modeless, created on-the-fly using Create(IDD_MY_BOX,this); Shown, using ShowWindow(SW_SHOW); etc.
Then you can click on the application window also while the message box is present.
I hope I understood your question.
this is this.
|
|
|
|
|
Hi, I'm working on having a CToolBar in my application, but with a difference. Instead of having the toolbar docked to a framewnd, I have the toolbar sitting inside a dialog of mine. The technique works just fine, and the toolbar behaves itself perfectly. However, the standard CToolBar seems to paint a "toolbar-background" underneath the CToolBarCtrl, which when you are not docking the toolbar inside a window is rather unsightly. Does anyone know how to make the background transparent?
Joel Holdsworth
|
|
|
|
|
Hello,
I want to execute a progrom i develop in visual c++ and i have the following message.
Can you help me please !
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: D:\Dossier_plus\MaterielVisio\Debug\MaterielVisio.exe
File: afxwin2.inl
Line: 96
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abandonner Recommencer Ignorer
---------------------------
Hervy
|
|
|
|
|
have you seen call stack? because this is very general message.
|
|
|
|
|
Hello,
You probably did not initialize some of the MFC windows correctly. Try do step into the code and see the context of the error. From there you should be able to solve the problem, if not, please post more specific information!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I suppose that you have some window object (derived from CWnd) which is instantiated (created with new() operator or on stack), but not yet created (in Windows sense). for example, this can happen if you have some CEdit object in a dialog and you try to set its text limits inside the dialog constructor. CEdit object already exists, but edit window does not. therefore, the call will fail because it tries to send a message to the edit box, but it is not created yet. Right place for that would be inside OnInitialUpdate() override.
|
|
|
|