|
|
HRSRC hVersionSrc = FindResource(NULL, (LPCSTR) VS_VERSION_INFO, RT_VERSION);
HGLOBAL hVersion = LoadResource(NULL, hVersionSrc);
void* pvVersion = LockResource (hVersion);
VS_FIXEDFILEINFO * pFfi;
UINT cbVerInfo;
VerQueryValue(pvVersion,"\\", (void **) &pFfi, &cbVerInfo);
Signature space for rent. Apply by email to....
|
|
|
|
|
Thank you all very much for the help
My "About" box is now automatically updated with the correct version number.
Something funny
|
|
|
|
|
Is there any way I can create a a CIPAddressCtrl with a drop down history like a combo box? Or, a CComboBox control whose edit box acts like a CIPAddressCtrl?
|
|
|
|
|
http://www.codeproject.com/miscctrl/customcontrol.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi!
I was implementing the On-screen keyboard application that comes with Windows. I have two queries regarding this:
1. I have made my app 'always on top', but the problem is setting focus to the application just below this one. I am aware that SetFocus is useless in this case. I want to find a way to this using GetNextWindow
2. Let's assume notepad is going to be receiving keystrokes via this on-screen keyboard app. Can anyone send me code to this. I have tried something like:
DWORD dwProcessID;
::GetWindowThreadProcessId(hForeground,&dwProcessID);
::PostThreadMessage(dwProcessID, WM_KEYDOWN, 65, 1);
::PostThreadMessage(dwProcessID,WM_CHAR, 65,1);
::PostThreadMessage(dwProcessID, WM_KEYUP, 65,1);
But this doesnt help.
Any help will be greatly appreciated.
Thanks for your time
Richard
|
|
|
|
|
Better to use FindWindow or FindWindowEx and SendMessage or PostMessage
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Good link also
http://www.codeproject.com/dialog/keystroke.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks so much for your quick reply, Papa (is that ur name ?)
|
|
|
|
|
Just a nick, my name is Johnny
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
For Win32 applications, not MFC
thanks all!
|
|
|
|
|
The majority of the articles on CodeProject for sockets programming use the Win32 Sockets functions rather than hte MFC CSocket & CAsyncSocket, its only the user-interface that is built in MFC usually. So you can grab most of the socks code and build your win32 app around what you can pick up.
|
|
|
|
|
can't seem to find it...
thanks.
|
|
|
|
|
Dear All,
Good Day ALL,
I have a problem in a program am working on, am using an OCX from microsoft in a MFC program this OCX is "Microsoft form 2.0 Label" the problem is when i run the program on my machine Background color of the label is the same as the BackGround color of the Main Form which is correct;But when i run it on Different Machine the Background color changes from Main Form Color plz help me how can i correct this.
Thank you all for help.
Best Regards,
Mohammad Zakarni
|
|
|
|
|
In the properties of the control, set the background color to:
-2147483633
(it'll change it to hex for you)
or you can do it via code:
CLabelControl* l = &this->m_yourLabel;
l->SetBackColor((long)GetSysColor(COLOR_3DFACE));
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Dear Nitron,
Thank you very much it worked...
|
|
|
|
|
Hi,
I am working on a program in which multiple controls use the system image list. My code looks like this:
<br />
SHFILEINFO sfi;<br />
HIMAGELIST hSystemImageList = (HIMAGELIST) SHGetFileInfo("a.txt", 0, &sfi, sizeof(SHFILEINFO),<br />
SHGFI_SYSICONINDEX | SHGFI_SMALLICON);<br />
m_control1.Attach(hSystemImageList);<br />
m_control2.Attach(hSystemImageList);<br />
Attaching the first control to the system image list works ok. Attaching the second control results in a crash. Debugging points to the system image list attach.
Does anyone know what the problem is and how to solve it?
Thanks,
Woody
|
|
|
|
|
Problem: I would like to implement the following in MFC: Open a file using a program (for example, open a text file using Excel). That is, the same functionality as right-click on a file, select 'open with' and select the program. The file type will not be associated with this program.
I have succeded using ShellExecuteEx, and starting the executable file with the text file as parameter, but the limitation is that I have to know the locatation of the program executable, which can vary.
Grateful for help
/Stefan
|
|
|
|
|
I tried Start->Run "excel.exe c:\mydoc.xls" and it worked fine, without adding at all the app path. So I am not sure you actually need the app path.
In case you need it (for fun), just look up the registry HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
I declare this below Array.
------------------------------------------------------------------
CArray<unsigned char,="" unsigned="" char=""> m_data;
typedef CArray<unsigned char,="" unsigned="" char=""> CCharArray;
CArray<cchararray,cchararray&> m_Array;
------------------------------------------------------------------
I want to ask how to add m_data to m_Array.Which command I need to use?
|
|
|
|
|
SetAt, operato [] or Add, u chose
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thank you for your answer Papa. But it has some problem while compiling. I write this below program.
------------------------------------------------------------------------
typedef CArray<unsigned char,="" unsigned="" char&=""> CCharArray;
CArray<cchararray,cchararray&> m_Array;
CArray<unsigned char,="" unsigned="" char&=""> NewElement;
unsigned char a='a';
unsigned char b='b';
NewElement.Add(a);
NewElement.Add(b);
m_Array.Add(NewElement);
------------------------------------------------------------------------
While compiling there are this error message happen at this line
m_Array.Add(NewElement);
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(443) : error C2582: 'CArray<unsigned char,unsigned="" char="" &="">' : 'operator =' function is unavailable
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : while compiling class-template member function 'void __thiscall CArray<class carray<unsigned="" char,unsigned="" char="" &="">,class CArray<unsigned char,unsigned="" char="" &=""> &>::SetAtGrow(int,class CArray<unsigned char,unsigned="" char="" &=""> &)'
Error executing cl.exe.
BallotExtractandPrint.exe - 1 error(s), 7 warning(s)
Do you know how to solve my problem?
|
|
|
|
|
try:
CCharArray NewElement;
CArray <CCharArray,CCharArray> m_Array;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I strongly suggest you use a std::vector of std::vector
Best regards,
Alexandru Savescu
|
|
|
|
|
I would like to using the SetCooperativeLevel function in window mode
Example Fullscreen mode => DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN
result => I can use the CreateSurface function(return of CreateSurface function DD_OK).
Example Window mode => DDSCL_NORMAL
result => I can't use the CreateSurface function(return of CreateSurface function DDERR_NOEXCLUSIVEMODE).
What I do?
Example Window mode => (what parameters?)
|
|
|
|