|
I did that and then the dialog wouldn't come up at all.
I ended up just doing what the first guy suggested, and it worked fine.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
This sounds simple: I just want to add a help button on a dialog's title bar.
Using the resource editor, I added the Context Help extended style.
The help button "Question Mark" shows up on dialog's title bar but nothing
happens when I click on it.
If I don't add minimize and maximize button to the title bar, the help button
works fine.
I am using VC++ 6.0 on win 2000.
Any help/suggestion will be appreciated.
Where there is a WISH, there is a WILL.
|
|
|
|
|
|
I did not see this article. Thanks for answering.
The problem is I don't want to derive my Dialog from a class other than CDialog (I know that the given class derives from CDialog).
As this seems to be a little tricky, I changed my mind.
Now I just want to add a button on the title bar. When the user clicks on it, I open my own html help.
Thanks again.
Have a good day.
PS: I don't know how to rate posts. You tell me how, I rate yours.
Where there is a WISH, there is a WILL.
|
|
|
|
|
from visual c++ help:
Context help
Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Thanks but I know this.
The problem is: when you add minimize and maximize button to the dialog, the help button does not work anymore.
Thanks.
PS: how can I rate your post ?
Where there is a WISH, there is a WILL.
|
|
|
|
|
I don't think you can rate posts on here. Instead, you should send a check to me at the following address:- )
If you really want the help button and min&max buttons, you're going to have to paint the nonclient area yourself. Handle WM_NCPAINT, and draw the title bar yourself. Of course, you'll have to also handle some other WM_NC* messages in order to notice when user clicks your button.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi all, this is the last part of my project before I start the write up, and I`m finding it a bit frustrating. All I want is control that acts like a grid. That is, I want a big square on my square which is divided up into columns and rows and holds UINT's. This control must be dynamic, i.e. when I click on the adjust IncCol/IncRow CSpin thingy (a problem Ravi helped me out on, see below), the number of columns/rows will increase *within* the square as necessary (the current fields will have to change size accordingly to accomodate the new row/column). Delphi has something called a TStringList, which is pretty much what I need, except it uses strings instead of UINT's. I have tried using many edit boxes, and then creating them/deleteing them as necessary, but the code is woefully complicated. I just want a nice simple solution (I don`t need it to change colour etc. etc.) to represent a resizable grid of integers, which can be read from and directly edited to much the same fields of a database. If anyone could help, or give me some ideas, I would well appreciate it, could I get this crappy project done and go out there and get a job.
Thanks All,
Alan.
P.S. I have had a look at Chris's grid control, and it is too heavy duty for what I need. From my understanding it seems to draw the grid manually, which would mean me spending a lot of time on this, which is exactly what I don`t want to do.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
if u want a editable grid control, the proceed reading. if i have misunderstood ur problem, i am sorry.
create an activex control, in which u place a normal grid control and have just only one edit box that is invicible. Then whenever a cell in grid contol gets focus then place the edit box in that place and make it visible so that user can type. then after is looses focus the hide the edit box. i think this not that tough, or get third party grid controls - simple
Ganesh Ramaswamy
|
|
|
|
|
Chambers wrote:
P.S. I have had a look at Chris's grid control, and it is too heavy duty for what I need. From my understanding it seems to draw the grid manually, which would mean me spending a lot of time on this, which is exactly what I don`t want to do.
You should really put some time into learning it. If you spent a solid couple of hours with it, you would learn it well enough to use it (and by extension, well enough to finish your project). It will do everything you're asking for; it's just a matter of learning what methods to call.
But, then again, if a simpler solution presents itself, then by all means...
Good luck,
Jon Sagara
"Ninety percent of baseball is mental, the other half is physical." -- Yogi Bera
|
|
|
|
|
Hi again, you`ll be glad to know that I finally finished the damn programming, yay . I used the CDualGridCtrl that was on this web-site (I forget the author, but whoever he/she is thanks - there will be a mention in the final project). I would have liked to use Chris's grid control, but as you said, it can accomodate all my needs with a few hours invested. I didn`t have a few hours to invest as I have to have some sort of draft ready by Monday, and I didn`t want to p*ss about on a part of the project which is insignificant, yet necessary.
But thanks to all who helped,
Speak soon,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
Hi
Visual C++ 6 SP5 / Win2K / August 2001 PSDK / Win32 only
I want to modify the colour of the horizontal header on the internal pages of a Wizard (WIZARD97). This is currently white with a small 49x49 logo towards the right side. I'd like to replace the whole whiteband with a bitmap, or fill the area with a different colour.
I have been looking at PSH_USEHBMHEADER, but I just get a grey area (minus 49x49 logo).
Thanks in advance.
Yours,
Brian
|
|
|
|
|
Hi all,
anyone know how copy and paste a .bmp image?
Thanx.
|
|
|
|
|
refer to Clipborad in MS Platform SDK or MSDN
Ganesh Ramaswamy
|
|
|
|
|
How can I get rid of "Extended" tab
when I'm writing ActiveX with ATL or MFC???
thanks
|
|
|
|
|
I have a dialog based app and want my app away from task bar. I have used Chris Maunders CSystemTray class to put a tray icon and a class for putting a picture as background in the app that will be hided in task bar. But when I use the code that you can see here, the menu items in the tray menu is disabled and the app wont be hided directly when I start my app, I need to minimize and then maximize it to see it hided in task bar.
I "stealed" the code to do this from the MSDN magazine. I downloaded it and did a class as they've done:
The subclassed CFrameWnd:
CHideInTaskBar public: CFrameWnd
{
...
}
I I override the PreCreatWindow(..) in the CHideInTaskBar class and it looked like this:
BOOL CHideInTaskBar::PreCreateWindow(CREATESTRUCT& cs)
{
if (CFrameWnd::PreCreateWindow(cs)) {
cs.dwExStyle |= WS_EX_TOOLWINDOW;
return TRUE;
}
return FALSE;
}
and in my app dialog (the main dialog that will be hided in task bar) Initinstance:
// The IDR_POPUP is the tray menu that all items becomes disabled!
...
CHideInTaskBar *pFrame = new CHideInTaskBar;
m_pMainWnd = pFrame;
pFrame->LoadFrame(IDR_POPUP, WS_OVERLAPPED, NULL, NULL);
// CReminderSEDlg is the dialog that is the main dialo and the dialog that will be hided in task bar
CReminderSEDlg dlg(pFrame);
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{}
else if (nResponse == IDCANCEL)
{}
...
Now I think you know everything that you should know... hm...
ASK FOR MORE!! I NEED THIS TO F***ING WORK!! YOU ARE WORTH A MILION OF DOLLARS IF YOU CAN HELP ME!!!!!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
i dont have VC++ now to chk this. But i think u have to set the EX_TOOLWINDOW property in for the dialog box also so the it refrains from appearing in the task bar. Try this. I am not responsible if it doesnt work
Ganesh Ramaswamy
|
|
|
|
|
1. Using a pointer to the CDialog
CMyDialog *p_lpMyDialog = new CMyDialog();
p_lpMyDialog->m_csMyCString = _T("Crash");
2. Not using a pointer
CMyDialog p_MyDialog;
p_MyDialog.m_csMyCString = _T("Crash");
Why does 1. cause a crash and 2. work without problem, anyone ?
I am developing with MS Visual C++/MFC 6.0 on Win98 SE.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
The only thing I can think of is that maybe the 2. is also causing an out of bounds indirection but the crash does not show as p_MyDialog is being created in the stack.
It's hard to say what the cause of the problem could be with that little information. Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Better yet, post the code of CMyDialog and we'll have a better chance to spot some bug.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Damn precompiled headers, a clean rebuild sorted it out, I should have guessed. Thanks for the help.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Hi all,
Given a string containing the shortcut name, how do I get the shortcut target path?
I tried to use BOOL SHGetShortcutTarget(...) but to no avail... My MSC++ couldn't find it, even after including Shellapi.h and linking to Shortcut.lib.
Any one has a clue on how to do this?
Thx!
/T
|
|
|
|
|
AFAIK SHGetShortcutTarget is for WinCE only. I assume you're not using WinCE cos you'd probably have said so...
Frankly, i'd use the CShellLink class available on this site.
You'll also note that links like those which link to microsoft office are in fact special kinds of links which the API can't decode. and they're not documented. It's annoying.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi, all.
=======
I need to:
void DoIt()
{
1) Grayscale_All ( desktop, windows, ...);
2) Open_My_New_Colored_Window_And_Dont_Ever_Lose_Focus();
}
OS: Win2000.
My problem is... number 1 .
Where should I start? What should I do ?
10x.
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Yes , It is again I ,
The nagger with the DLLs in VC++ for Delphi .
I at last succesed to find out what was the problem with my DLL by the generous help of Tom Nuydens,
Well,
When the VC++ linker generates its output it changes the names of the export functions If you gave to a function the name "foo" it will look something like "_foo@4" and This is the name you haveto import in your Delphi app client program. To see the export table, you have run :
"dumpbin.exe /exports mydll.dll" from the command line.
_________________________________________________________________-
Simple ?
Not exactly !
I , for example , dont success to run "dumpbin.exe" im order to find out the export table of my DLL to see the names of the functions.
Is Someone know how to do it exactly ?
|
|
|
|
|
You can force your DLL to export the function names without any decoration just by declaring it to be extern "C" like this:
extern "C" {
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|