|
Fine just ignore it, doesn't matter anyways.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Hey there... Quick background: I author two freeware music visualizations called G-Force and WhiteCap for a few media players out there, and I'm fixing up my win32 and direct x fullscreen code. I'm been (unsuccessfully) trying to get thru an issue for a while now, losing some major major time on it, and I'm desperate to resolve it...
Normally, my software does it's video output thing in a plain-jane hwnd. When it's told to go into fullscreen mode, I first create a new hwnd (to be the fullscreen window), call SetCoopertiveLevel() (using that new hwnd), call SetDisplayMode() (actually causing the disp device to change res, etc), and then go from there. It works great and the video out works as expected, execept that all messages to the hwnd's message handler proc suddenly stop! Indeed, I have an output log that shows that it gets no more messages (following all the typical messages from a creation and resize, etc of making a new window). So, amusingly, it enters fullscreen mode, looks great, but doesn't respond what so ever to any keystrokes, not even system ones (ctrl alt del, alt tab)... The only way out is a manual reset. :^(
Add'l info: Win98SE (chosen for compatibility reasons), Compiler: Metrowerks codewarrior 8, targeting Win32 EXE, direct x 9 on the machine (but the DX API that I use goes back to DX3).
Data point 1... If I pass the normal window as fullscreen hwnd's parent in CreateWindow(), flow stops somewhere near or right after SetCoopertiveLevel() and before SetDisplayMode(), but the same effect seems to be occurring: all messages to the process (ie, it seems to be blocked by something).
Data point 2... This whole problem doesn't occur whatsoever (passing a parent window or not) when I target to a DLL and I'm running as a plugin under Winamp 2 (ie, mysteriously, there's something present when I'm running as a DLL in winamp that avoids the problem than when I'm just running as my own EXE).
Thanks in advance for your time and effort here. If you know my software, then you know my specialty is not OS APIs, but more abstract things (my shareware targets MacOS classic, MacOS X, and win32 and runs under half a dozen media players). This is to say all help is appreciated! Thanks!
Andy
|
|
|
|
|
Hi,
I need help on trying to display Chinese characters in a CListCtrl. I have _UNICODE flag in project settings, and I'm using the unicode conventions (i.e., _T() for string literals, _tcscpy in place of strcpy(), etc.). Still no luck, I've even tried to set the font:
CFont *cFontPtr = m_CertListCntrl.GetFont();
LOGFONT lFontObj;
int success = cFontPtr->GetLogFont(&lFontObj);
lFontObj.lfCharSet = CHINESEBIG5_CHARSET;
CFont cfObj;
BOOL s = cfObj.CreateFontIndirect(&lFontObj);
m_CertListCntrl.SetFont(&cfObj, TRUE);
And still no luck. Note: I tried to test the code by hard coding chinese characters and filling in the list. Not sure if that has an effect on it.
Thanks,
Raymond
|
|
|
|
|
You need a Chinese Operation System.
|
|
|
|
|
You need to set the font name in the LOGFONT struct to one that contains the characters, like SimSun.
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
I only want to do a SetWindowText if the value has been changed, for example when a selection changed from the employee list. How can this be handled in the dialog class? May be OnNotify and OnChildNotify can take care? But I never used OnChildNotify in my code.
Elizabeth
|
|
|
|
|
At whatever point a new employee is selected from the list, call SetWindowText() there.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
You could handle ON_LBN_SELCHANGE:
ON_LBN_SELCHANGE The selection in the list box is about to change. This notification is not sent if the selection is changed by the CListBox::SetCurSel member function. This notification applies only to a list box that has the LBS_NOTIFY style. The LBN_SELCHANGE notification message is sent for a multiple-selection list box whenever the user presses an arrow key, even if the selection does not change
|
|
|
|
|
Since the list is a child window in a tab control. How can the dialog class which has the tab control get notified from LBN_SELCHANGE event? Here is what we are talking about: the list is a child of the tab control; the tab control is a child of the dialog class.
Elizabeth
|
|
|
|
|
ElizabethC wrote:
Here is what we are talking about: the list is a child of the tab control; the tab control is a child of the dialog class.
Yes. I thought that a tab control was derived from CWnd. If it is, you can handle the listbox event.
You'll just need to manually edit your message map for the tab control's class. Then you can send a message to the tab's parent.
|
|
|
|
|
I got it working. I call SendMessage function from the child all the way up to the dialog class. I also added a ON_COMMAND in each parent class to handle the messages. Thanks.
Elizabeth
|
|
|
|
|
if i upgrade my c++ projects from vc6 to visual studio.net, do i need to install .net framework on all the computers that will run my compiled executables?
thanks
|
|
|
|
|
Only if you turn on the /CLR compiler switch which generates managed rather than unmanaged code. Visual Studio .NET can still generate native windows executables (only using C++) that do not use the .NET framework.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Hi,
I want to learn how to call an ActiveX EXE (VB6) from a dll which created by VC6 ATL object. Details at below;
I created an ActiveX EXE by VB6 in order to execute at remote machine. This EXE has been calling by VC client (which is DLL). But i used CoCreateInstanceEx with hardcoded machine name parameter. I don't want to set remote machine name in code. By the way, i created header file for dll by OLE View in order to create ActiveX EXE definition. But it has static GUIDs. It's ok, but i have to regenerate header file for ActiveX EXE if i recompile it and i have to compile dll too. The other problem is, should i keep copy of ActiveX exe on client machine?
The question is;
What is the proper way to call an ActiveX exe, running on remote machine, from VC client (dll)?
Thank you.
Orkun GEDiK
ASTRON
|
|
|
|
|
|
How can I updat the dialog title with the employee name when a new employee is selectd from a list control? This list control is in a tab control property sheet.
Elizabeth
|
|
|
|
|
SetWindowText(hDlg, ...);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The list control's parent window is the dialog representing the tab.
The parent of the 'tab' is the property sheet.
Get the parent of the parent of the control and set its window text.
Seting the window text of a dialog changes the dialog's title.
The memories of a man in his old age are the deeds of a man in his prime.
|
|
|
|
|
Through Create I get the CWnd* pointer to the parent and save it in m_pParentWnd (cant cast it to parent due to problems with circular includes). However to use a certain function I need the m_hWnd of the parent. Is this the same thing as the m_pParentWnd? The docs dont make it clear and my suspicion is that they arent the same and I am hoping I can get m_hWnd easily if m_pParentWnd is all I have to go by........BTW the m_pParentWnd is a generic CWnd*, and I am unable to cast it to my specific parent class due to unshakeable circular include issues which dont let me #include "parent.h" to do the casting.
Help!
Thanks,
ns
|
|
|
|
|
Hi ns, long time
However to use a certain function I need the m_hWnd of the parent. Is this the same thing as the m_pParentWnd
AFAIK, GetSafeHwnd(m_pParentWnd) is the HWND you're after. Anyway, experiment a little, your question surely can be answered with a trivial test.
BTW the m_pParentWnd is a generic CWnd*, and I am unable to cast it to my specific parent class due to unshakeable circular include issues which dont let me #include "parent.h" to do the casting.
Ummm... I'd need to know the header structure of your classes, but this kind of circularity can be solved most of the time using forward declarations. Consider
#include "B.h"
class A
{
B* b;
};
#include "A.h"
class B
{
A* a;
};
#include "A.h"
...
#include "B.h"
... This does not compile due to circular references. The way out consists in cutting the knot somewhere with a forward declaration (or with two of these, for simmetry reasons, if this is applicable):
class B;
class A
{
B* b;
};
class A;
class B
{
A* a;
};
#include "A.h"
#include "B.h"
...
#include "B.h"
#include "A.h"
... Get the idea? Hope it helps, regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
So sorry about the late response. For some reason i wasnt able to find the thread when I posted it, but I am going to try out your suggestion now. Because my code is full of bulky custom SendMessages since I hadnt been able to get the parentWnd.
Appreciate your responses!
|
|
|
|
|
Hi,
By calling GetSafeHwnd() you can obtain the m_hWnd from m_pParentWnd,
ie:
<br />
HWND hParentHandle = m_pParentWnd->GetSafeHwnd();<br />
GetSafeHwnd will get the handle to the parent window event if m_pParentWnd is NULL (if m_pParentWnd is NULL then hParentHandle will be NULL also).
quick tip, to get around of circular include references you could try the following code:
in the header file:
<br />
class CMyParentClass;<br />
<br />
class CMyChildClass <br />
{<br />
CMyParentClass* m_pParentWnd;<br />
};<br />
so instead of #include "MyParentClass.h" you can declare the class header, and then #include "MyParentClass.h" in the cpp source.
Hope this helps ,
Andy V
andyvinc at hotmail dot com
|
|
|
|
|
Wonder if anyone can help. I have desinged a GUI which will need to use an exe to take one input value from an edit box and return 2 outputs which will be displayed in an edit box within a pop up dialog.
Anyone done anything of the sort? I have no input or output parameter values, just know that the exe will take one input and return 2 outputs.
Need help on this asap. Anyone know anything please please reply asap!
Thanks
|
|
|
|
|
With the little control you've got over the external app, you'll have to resort to simulating the user interaction on it from your main program. Once you launched the external app, FindWindow can give you the HWND of its window. From here you can send messages to this window (or its child controls) to feed the editbox (WM_SETTEXT ), trigger the calculation (BN_CLICKED ) and retrieve the results (WM_GETTEXT .) The process is neither simple nor excessively robust, but I guess it's the only option available.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I need a small snippet of code that will allow me to take a snapshot of any window I specify and store it in an CBitmap ?
I once found a small snippet but cannot find it again for the life of me
Anyone know where I can find something? Or maybe even have the code for me
Thanks
I'm drinking triples, seeing double and acting single
|
|
|
|