|
Thanks,my friends. I am glad to meet you.
|
|
|
|
|
Hi Welcome ...
(I'm sorry, I had to look it up )
jackeroo : a young male management trainee on a sheep or cattle station
http://www.wordreference.com/english/definition.asp?en=jackeroo
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hi Sir:
I am glad to meet you. Can you tell me your ICQ or MSN number? May be we will have a talk if we have free time. Thanks
|
|
|
|
|
Grr, yet another simple problem has me floundering at the CP god's feet. I have some radio buttons, and a combobox. If the radio buttons are not checked, the combobox is greyed out. I'm using the line
GetDlgItem( IDC_CAL_TRANSDUCER )->EnableWindow(m_bitControls[bool_cal_xducer]);
to do this. My problem lies with re-enabling it. I have my OnBnClicked() thingamajobber, but i have no idea what to put in there to re-enable it. I've tried a ton of different functions, but they either completely hide the combobox or just don't do anything.
any help?
*.*
cin >> knowledge;
|
|
|
|
|
Doesn't EnableWindow(true) work?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
argh, i new it was something simple! thanks.
*.*
cin >> knowledge;
|
|
|
|
|
You're welcome!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
keegan wrote:
I'm using the line
GetDlgItem( IDC_... )->EnableWindow(...)
Instead of GetDlgItem, use a control-variable. Classwizard can make that for you if you tell it to make your variable of type CComboBox (or whatever your control is).
As for enabling:
m_ComboBoxCtrl.EnableWindow(true);
does not work?
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
yeah i'm using a control variable, i just wrote it like that so it would be a little more clear what i was trying to do
*.*
cin >> knowledge;
|
|
|
|
|
or use ON_UPDATE_COMMAND_UI to get the CCmdUI* pCmdUI.
You could call
pCmdUI->Enable(true) to enable it.
This is applicable to all UI component which response to CCmdUI
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I would like to have a "MDI" application that displays a bunch of reports in separate windows within a main frame. I would like to define each report using a dialog resource. This is what I have tried:
1. Create a dialog resource for each report and use classwizard to generate a class for each. The dialogs have the WS_CHILD style.
2. Create a menu resource which will allow selection of each report.
3. Have cwinnapp::initinstance create a CFrameWnd and add the menu to it.
4. When the user selects one of the reports from the menu then display the associated report dialog modelessly with the main cframewnd as the parent.
This sort of works. The problem is that the modeless dialog never gets the focus (even when I click on it). Is there a way to fix this or is there a better way to do this?
|
|
|
|
|
What are you using to create the dialog? are you using
m_your_dialog.Create();
m_your_dialog.ShowWindow(SW_SHOW);
This is how i create my modaless diags, and it brings them into focus automatically.
*.*
cin >> knowledge;
|
|
|
|
|
I have tried that, no luck.
My current code is:
if(rpt_cpu_category == NULL) {
rpt_cpu_category = new dlg_rpt_cpu_category;
rpt_cpu_category->Create("RPT_CPU_CATEGORY",this);
}
rpt_cpu_category->BringWindowToTop();
rpt_cpu_category->SetActiveWindow();
rpt_cpu_category->UpdateWindow();
"RPT_CPU_CATEGORY" is the name of the dialog resource.
The last 3 lines are redundant as they seem to have no effect, they were just my latest effort to try and get the dlg to take the focus. I have also tried using setfocus() (no luck).
BT
|
|
|
|
|
Anonymous wrote:
rpt_cpu_category->Create("RPT_CPU_CATEGORY",this);
A string literal is certainly NOT suitable to select a dialog resource.
[later correction]
A string literal is indeed suitable as a dialog resource.
[/later correction]
Why do you need to give it a dialog resource in the first place? What did you do to the perfectly working class the class wizard made for you?
You should have one class for every dialog resource you designed, and the connection between resource and class is internal to that class (look for IDD in the dialog-class if you are interested).
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
jhwurmbach wrote:
A string literal is certainly NOT suitable to select a dialog resource.
Why not?
CDialog::Create() is overloaded to accept both UINT and LPCTSTR resource IDs...
I agree that he probably shouldn't be using the resource ID from outside the class, but why can't string literals be used?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote:
CDialog::Create() is overloaded to accept both UINT and LPCTSTR resource IDs...
Uh-Oh.
Yes.
I have never used this, never seen this being used, so I have skipped the second definition in the MSDN a thousand times.
He can use the name.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I tried using the class the classwizard makes for a dialog. I still get the same problem: I can't set focus to the dialog. As soon as I make the dialog a child window of the main frame I can no longer set focus to it.
|
|
|
|
|
I am working on a project that is supposed to mimic Vidcap or AmCap except I am having difficulty figuring out a way to open video in a dialog. Any suggestions?
|
|
|
|
|
Does anyone have, or know where I can find, the code that is used to shade the icons on the Windows desktop when the user clicks an icon? I want to use it to shade a bitmap. The bitmap will have a white background that I want to remain unshaded.
Any Ideas?
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
The normal way of doing it is to add it to an image list and then using the imagelist to draw it with the ILD_SELECTED style (CImageList::Draw() or ImageList_Draw() for Win32). It should work for a bitmap, as long as you create a mask (just use a black-and-white version of the original image) to mask off the areas you don't want shaded. If it shades the wrong part of the image, try inverting the mask (white<->black). I can't remember which way around its supposed to be .
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
1. How do I get text and its font in an object, Excel?
2. How do I read header and footer in word
3. How do I get all text and their own font from text or objects.
Thanks
Jason Chang
tmsnhien@yahoo.com
|
|
|
|
|
This thread might get you close:
http://www.codeproject.com/script/comments/forums.asp?msg=559045&forumid=1647#xx559045xx
|
|
|
|
|
|
Hey all,
I went to the launch of VC.NET 2003 in Ottawa a few months back, and during the Visual C++ presentation, we were shown a new feature that would save me a heck of a lot of time, unfortunately, I dont remember how to toggle this guy on or off!
Ok, you have a dialog, which contains a list control for example. There's an option for that control that you could specify that control to resize as the dialog does, without any extra code in your WM_SIZE message. From what I remember, you can specify the control to "hug" to TOP/BOTTOM/LEFT/RIGHT... I've searched high and low through the help and resource editor and I can't seem to find anything.
Our project is Win32, but I created a dummy dialog in VC++, and still no go.. Anyone farmilliar with this guy?
Mike.
doner@obtain.com
|
|
|
|
|
That "feature" is only for C# or VB.NET projects. Standard win32/MFC projects don't get this. Of course, I don't have 2003 version, but I don't think they added this. Maybe in a Managed C++ app, but I don't know.
Joel Lucsy
|
|
|
|