|
You know how when you click on the window of some application, any other app obscuring it on the screen gets pushed to the background? And the clicked window covers it up? Well, I made modeless dialog boxes spawned from my main view. But if I click on the view when running, I expect these boxes to get pushed to the background. Instead they sit merrily right on top. How do we get the required behavior?
Thanks very much,
ns
|
|
|
|
|
|
Wow! Thank you so much! Exactly what I needed. Many thanks!
ns
|
|
|
|
|
How do i get the HWND of an opened window?
rechi
|
|
|
|
|
EnumWindow() will give you the HWND for every top-level window running on the computer. If you want the HWND for the window that is currently running, its just CMyWnd->m_hWnd, or this->m_hWnd;
|
|
|
|
|
Anyone know how I can display the Win2000 print dialog rather than the standard one please?
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Hi
I am displaying some controls like CButton in CFormView
and want to draw some figures( for example a line ) on the
control ( here CButton ).
I dont' want to subclass the controls, neither I wan to
make them OwnerDrawn.
Can someone suggest how it can be done.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
Have you already tried something like
CDC *myDC=m_Button.GetDC();
...Draw...
myDC->MoveTo(0,0);
myDC->LineTo(10,0);
...Draw...
ReleaseDC(myDC);
I´m not sure at all that this brings something, but who knows
~RaGE();
|
|
|
|
|
class Foo
{
Foo();
~Foo();
};
Foo *bar = new Foo;
delete bar;
The destructor is called when I delete bar right?
- Jason
(SonorkID 100.611)
In the beginning, teachers taught the 5 W's: who, what, where, when, why. Now it's just a big damn G
|
|
|
|
|
as it is in the MSDN :
When delete is used to deallocate memory for a C++ class object, the object's destructor is called before the object's memory is deallocated (if the object has a destructor).
Fred
|
|
|
|
|
Jason Hooper wrote:
The destructor is called when I delete bar right?
yep. If you want to make sure of it, just try to display something in the destructor [ with
~Foo{ cout<<"Here i destruct the object"<<endl; } if you're running a console application].You can even display the pointer address to be really sure it is the bar and not something else.
~RaGE();
|
|
|
|
|
I need to retrieve the value from a cWnd that has the focus, The value I need is m_pTypes, which is an unsigned char* value. I using the following code:
CWnd * pWnd = GetActiveWindow();
pWnd = GetFocus();
In debug mode I see the following values:
- pWnd 0x00aeea50 {CListCtrlEx hWnd=0x00000240}
- [CListCtrlEx] {CListCtrlEx hWnd=0x00000240}
+ CListCtrl {CListCtrl hWnd=0x00000240}
m_nHighlight 2
m_bSort 1 ''
m_nViewType 0
m_overAmount 1162299716
+ m_pTypes 0x00ea12d0 "ýýýýÝÝÝÝÝÝÝÝÝÝÝÝÝA"
m_nNumCols 7
+ m_ctStart {...}
+ m_headerctrl {CNewHeaderCtrl hWnd=0x00000224}
+ m_cImageList {CImageList}
How Can I retrieve that value?
Any help would be greatly appreciated.
Thank-you
Sincerely,
RAH
|
|
|
|
|
You can access your value with pWnd->m_pTypes if it is a member variable. Are you using MFC in this case ?
~RaGE();
|
|
|
|
|
Rage wrote:
You can access your value with pWnd->m_pTypes if it is a member variable. Are you using MFC in this case ?
... and if m_pTypes is a public member of the class
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Yes, it is a protected member variable. I tried this and it would not work.
Thanks again for your help.
SnapRick
Thank-you
Sincerely,
RAH
|
|
|
|
|
Then you´ll have to make a getter for this variable. Otherwise, there is no way to access this data.
~RaGE();
|
|
|
|
|
This worked, I just created a function to return the value.
Thanks
Thank-you
Sincerely,
RAH
|
|
|
|
|
I want to develop a product that can send and receive SMS messages
via a GSM modem but cant figure out how to use the AT commands to control the modem
moran kaye
|
|
|
|
|
well, i'm working on a project that needs to send & receive SMS as well, so here is a procedure to follow :
1) Open the Com port, using CreateFile()
don't forget to set-up the COMMTIMEOUTS & DCB structures.
2) to send an SMS you need to send your AT command as char to your com port (modem), like this :
char c[300] = {0}, r[100] = {0}, tmp[300] = {0};
DWORD dwBytesWrite, dwBytesRead, dwTmp;
// *** INIT PHASE : SET DATA TYPE TO SMS ***
strcpy(c, "AT+CMGF=1\r\n");
and then
if(!WriteFile(hGSMPort,c,strlen(c),&dwBytesWrite,NULL)
...
don't forget to read the reply from the modem.
using ReadFile()
3) when the port is open, create a thread to read new SMS received
hope it helps
Fred
|
|
|
|
|
Pretty easy to do. I've implemented some code which does the same. On freshmeat.net there are a couple of opensource projects which do the same. I suggest you download them and have a look at the sources.
To access the serial port use CreateFile() + SetCommState(). It's all in the Platform SDK.
HTH
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
Hello,
I have a problem with makefile and linker. I get error LNK2001: unresolved external symbol "int __cdecl LibFunction(char *,int)" (?LibFunction@@YAHPADH@Z), when trying to use Function that is in mylib.lib.
I have macros:
LINK_FLAGS=/machine:I386
LIBS=..\lib\mylib.lib
and I'm trying to link like this:
myprogram.exe: $(OBJS)
link $(LIBS) $(LINK_FLAGS) $(OBJS) /OUT:$@
How do I make the linker realize that LibFunction is in mylib.lib?
Regards,
-Janetta
|
|
|
|
|
Try to put your lib name and path into the Project/Settings/Link - Object/Library Modules editbox for all configurations that need it.
~RaGE();
|
|
|
|
|
There is only 'General' and 'Debug' tabs in the 'Settings' of this project. I guess it's because it is a makefile-project. If I'm wrong, please correct me.
But aren't those tabs only a another way to tell the compiler and linker how to make the .exe. So what do I have to do my makefile instead of changing settings?
PS. I would do the program withaut makefile if I could, but there is so much more in it. Btw, is there a way to combine a "normal" project and makefile?
-Janetta
|
|
|
|
|
Create a project with the settings you want to use. Then select Export Makefile from the Project menu. Merge/plagerize the result with your makefile project.
|
|
|
|
|
I want to edit a MPEG-I format(*.mpg) file. I want to extract some clips from MPEG files and combine those cilps together. Either using frame or absoulute time dose.
Is there any free code or class works?
Anyone who know that please help me.
Windows XP, VC++ 6.0, SP5
|
|
|
|