|
I don't really know what you mean by panel. I think it is the toolbar that you are talking about. Well, the white line is part of the toolbar. It is the non-client area of the toolbar. You can derive a class from CToolBar , and handle the WM_NCPAINT message in it, and practically do nothing in the function. Hence the white line will not be seen; instead, the window in the background will show, which is definitely not wanted.
You can:
Derive a class from CToolBar . e.g, "CMyTool". Handle its WM_NCPAINT message and do nothing in it.
Derive a class from CDialog . e.g, "CMyChildDialog". Give it child style, no border, no caption bar.
Create the toolbar as a child of the CMyChildDialog .
Then create a member variable of CMyChildDialog in CMainFrame , and handle CMainframe's OnSize() function to size the CMyChildDialog dialog to the top of the window, about 24 pixels height. You will also need to handle the toolbar button messages in the CMyChildDialog class, and route the messages to the right window.
Following the above difficult-to-follow guidelines, the white line can be removed.
But still the info you have given is not enough.
I created the toolbar dynamically using AddBitmap() and InsertButton() etc.
this is this.
|
|
|
|
|
Khan.
Thanks for your suggestion and time.
Please go through following steps to have actual feeling of the problem, and if any further information required, please let me know.
To get a snapshot of the actual problem, please follow following steps...
1. Go to http://www.easysnaps.com
2. Click on "Search"
3. Type "wxwidgets issues"
4. You will get the required picture
5. Problem area is highlighted in Red rectangular frame.
Thanks and Best Regards.
PanB
|
|
|
|
|
I am sorry, I have never used wxWidgets before.
However, it could be that the child dialog has its border set to some weird color. As there are no panels in VC that I know of, so I don't think I can help more.
this is this.
|
|
|
|
|
Khan.
Not at all an Issue.
Actually, I am also an MFC developer, but curremtly working on wxWidgets.
Thanks a LOT for your time and support.
Keep up the good work.
Thanks and Regards.
PanB
|
|
|
|
|
Hi All.
I have a simple problem but it seems to me that the solution is not so simple.
Lets says I have a.exe and b.exe running.
If I endtask a.exe from Task Manager, I would like to have b.exe to be killed automatically and Vice versa.
Thanks and Best Regards.
PanB![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hi,
Check this[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
PanB wrote: If I endtask a.exe from Task Manager, I would like to have b.exe to be killed automatically and Vice versa.
Actually it very tough Task.. As when you forcly Kill process through TaskMgr it doesn't send WM_CLOSE/WM_QUIT message, it just remove the resource that needed by process to live.. anyway these are some link, may be from there you find some thing that can help you
Is there anyway to handle the forced exit of an application by task manager?[^]
"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
|
|
|
|
|
Hi all,
I just want to know the features of vc8.0 .How is it different from VC6.0 can any one please give the corresponding links.What all features are added, and if any existing features are removed...Currently i am working on VC2005 beta version.I have to make my project which is on mfc to be compatible with VC8.0.
Thanks
|
|
|
|
|
Hi,
I had the same problem. I wanted (not needed) to change to the new environment,
which was VC7.1 (.Net 2003). At first there where some compile errors because of a stricter
ANSI compiler. Solving these did solve a few not simulatable bugs, so it was a good thing.
BUT a whole bunch of new bugs where introduced although everything compiled.
1. My communication failed. I used CSocket to pass Objects to another program using Serialisation
via CArchive/CSocketFile. While this never was a problem in VC6.0 (the program runned for a few
years without any problems), now the CArchives blew them selves up after a short period of time. I needed to rewrite the full communication protocol which set me back a few weeks.
2. A short while ago a change in the MFC classes caused a new bug. In VC6.0 I can't remember
the use of the smallcaps bool, everywhere the big caps BOOL was used.
But the VC7.1 MFC classes using booth even in the same class. So one function could return a
BOOL while another uses bool. The internal handling of logical operation now uses the smallcaps
bool. This can lead to bugs.
But what the heck, I'm now running in VC7.1 and I need to change to VC8.0
In my opinion yes I need to upgrade to VC8.0 for two reasons VC7.1 is dead .
It didn't get a change. Theres a new compiler in town.
Microsoft maked it more ANSI C++ compliant forwich we chear.
But the major reason is: if you are forced/brave/dumb enought to write managed code,
you will need this compiler suport for the 2.0 framework.
Finaly I compiled my code with VC8.0 and only a few minor errors did com up all because of the
strictness of the new compiler. So I'm getting ready to move to VC8.0
I dont think that there will be great changes underneath, like doing the complete opposite
of what you programmed to do in VC6.0.
Here is a link[^] to find all new features in VC8.0
Hope that this helps you to upgrade decision,
codito ergo sum
|
|
|
|
|
Hi,
I have a toolbar into which I create an ordinary pushbutton. However, I can't get the button enabled or to send button clicks to the parent window. Does anyone know how to do this?
Thanks,
Royce
|
|
|
|
|
Handle this message for the button:
ON_UPDATE_COMMAND_UI
And write your enable disable code here. pCmdUI has got the necessary elements for this purpose:
afx_msg void OnUpdateYourButton( CCmdUI* pCmdUI );
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hello all, my owner-drawn CListCtrl is having problem on Win2K system, its items are too spaced out only on Windows 2000. This is not happening on Windows XP systems.
Please take a look at the following image: http://psychopotato.com/temporary/clistctrl.png (opens in a new window)
It might be due to the different behaviors of MFC controls on these different operating systems. Will I be able to override this behavior and make them look the same? I have tried to intercept and process LVM_GETITEMRECT and LVM_GETITEMSPACING (I'm deriving a class from CListCtrl) but they did not help. Is there anything else I'm lacking? Thanks in advance for any help!
Regards,
Ben.
-- modified at 23:03 Wednesday 30th November, 2005
|
|
|
|
|
I have a VC8 Managed C++ Windows Form project. In it I try to overide thd WndProc like below, but when debugging the function is never called. I'm not sure why, has the method of doing this changed since VC7.1?
void WndProc(System::Windows::Forms::Message MsgByRef)
{
switch (MsgByRef.Msg)
{
case WM_PAINT:
{
PAINTSTRUCT kPS;
HDC hDC = BeginPaint((HWND)MsgByRef.HWnd.ToPointer(),&kPS);
EndPaint((HWND)MsgByRef.HWnd.ToPointer(),&kPS);
}
}
Form::DefWndProc(MsgByRef);
}
|
|
|
|
|
I am using a Windows Media Player ActiveX control in my CFormView.
I am having trouble retrieving some of the properties.
This works:
m_cVideoControl.SetProperty(DISPID_WMPCORE_URL, VT_BSTR, m_pDocument->GetPathName());
but this does not (it fails returning VT_EMPTY inside MFC):
void CMyApp::PlayStateChangeVideoControl(long NewState)
{
if (NewState == wmppsPlaying)
{
CString cTime;
m_cVideoControl.GetProperty(DISPID_WMPCONTROLS3_CURRENTPOSITIONTIMECODE,
VT_BSTR, (void *)&cTime);
UpdateData(FALSE);
}
}
All of the examples use VB, javascript, etc and seem to be accessing the
player.controls.currentPositionTimecode
I am unsure as to how to accesing this sub group "controls" using GetProperty
In case you are wondering I am using MFC not ATL and I let BEGIN_EVENTSINK_MAP
handle event sinking for me (which works fine).
thanks for any help...
|
|
|
|
|
OK, I figued out what to do.
Basically, I call GetControlUnknown() on my control and from there I can
QueryInterface the other pointers I need.
|
|
|
|
|
I would like to know how to do it in the most easy way in XP?
MOV AX, 6F09H ; Setting the Digital port is output
MOV BL, 09H ; Digital value is 09H
INT 15H
Can it be implement with inpout32.dll?
Please help!
|
|
|
|
|
According the The file "Casting Difference Between C and C++ May Cause C2105"
(please see http://support.microsoft.com/kb/q88434/#appliesto),
We know the following code:
void main()
{
char *p;
((long *)p)++; // If the file is saved as a .CPP, this
}
will be have error C2105 need l-value for c++. but for .c file is ok.
Now I have very some problem (when i try to translate some codeing from
c => c++ ). So how to fix the problem?
func()
{
MIDL_STUB_MESSAGE _StubMsg;
int __RPC_FAR *nCount;
RPC_STATUS _Status;
...
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = *nCount;
...
}
I got erro messsage for "*(( int __RPC_FAR * )_StubMsg.Buffer)++ = *nCount;"
the message is "error C2105: '++' needs l-value"
How to fix the problem?
Thanks!!!
|
|
|
|
|
rat.crown wrote: *(( int __RPC_FAR * )_StubMsg.Buffer)++ = *nCount;
Replace above code with
<br />
*(( int __RPC_FAR * )_StubMsg->Buffer) = *nCount;<br />
_StubMsg->Buffer++;<br />
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hello,
I've been tasked with creating an automated build process in a Visual Studio 6.0 environment. This is not something I'm familiar with and I'm hoping some of you may be able to point be to some tools or articles that would help me in this area.
Any and all ideas welcome!
Thanks!
-Ian
|
|
|
|
|
By "automated" do you mean without any human intervention? If so, I've compiled from a command prompt in the past and it has worked fine. It required a few .bat and .mak files.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Beyond starting the process, there should be no further human intervention. I'm researching .mak files now. they look like a pain. Do you know of any good resources that I can use to learn about them? I'm just googling now...
|
|
|
|
|
it's pretty easy to launch Visual Studio from a command line prompt, with a solution/workspace and build configuration name. ex. here's a bit of what we use for our ImgSource builds, on VC7:
devenv /clean Release /project _isource /projectconfig "Release|Win32" ISource.sln
devenv /build Release /project _isource /projectconfig "Release|Win32" ISource.sln
you need to launch this from the command line prompt that VS creates for you (it sets up a bunch of ENV variables for you). but, there are no makefiles - just create the configutations in the UI as you normally would, then run them from the command line.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Unfortunately I'm stuck with Visual Studio 6 right now. There must be similar support in VS6 though huh?
For now, I think I'll delve deeper in the makefile bussiness - that is, unless you can tell me why I shouldn't...?
Sorry, I'm still trying to grasp the overall architecture of an automated build process. I probably have a few days research to do..
Thanks for your suggestion!
|
|
|
|
|
i'm fairly certain VC6 has a similar interface.
in VC6 we can use the "Build All" option from the UI to build our 5 different targets, but VS.Net's dependency checker handles .LIBs differently, so we have to simulate a Build All with a .BAT file.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Makefiles are actually simple once you peel away all of the unnecessary stuff. For example:
myproject.exe : myproject.obj file1.obj file2.obj myproject.res
link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res
myproject.obj : myproject.cpp
cl.exe /W4 myproject.cpp
file1.obj : file1.cpp
cl.exe /W4 file1.cpp
file2.obj : file2.cpp
cl.exe /W4 file2.cpp
myproject.res : myproject.rc
rc.exe /fo myproject.res myproject.rc says that myproject.exe depends on myproject.obj, file1.obj, file2.obj, and myproject.res; myproject.exe is created by executing link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res. Also, myproject.obj depends on myproject.cpp; myproject.obj is created by executing cl.exe /W4 myproject.cpp. The files listed on the right side of ':' are what get compiled or linked together to create the file on the left side of ':'.
Any clearer?
There's also the IDE that can be launched without any human intervention. Check out its command-line arguments.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|