|
That is what the Test button is for.
The Tab Order menu selection shows the actual tab order you set.
What you are describing is the method you wish to use in order to solve a problem and not the real problem its' self.
You mensioned some thing about it not looking (or was that working) right at runtime, in your first post. If it is a tab order problem then the problem should also exist when you run the test, at design time. If the group property is not used correctly that will also cause it to act in an unexpected way (will also show up in test).
I recomend the you get a pincel and paper, and try describe the details of what you are observing. You will probably descover what the problem is while you are trying to describe it to you self.
If worst comes to worst, then open the resource file as text and edit the dialog box by and. The tab order is the order in which the controls are entered into the resource, so you could just rearange the lines to be in the order you want (and remember to set use the group property).
I do not know if any of this has helped, but it is the best I can do without
having the project loaded in front of me.
Good Luck!
INTP
|
|
|
|
|
thanks for discussion.
Z-order meand- visible depth, or sequence how to controls appears- next over previous by look.
It possbile to edit directly ctrl-d, or by sequence in rc file.
Problem is now following:
In design mode I see REVERSE order - from wich I will see really when press test or run-time.
May be some option do this REVERSE ?
Do some one know which option do that and
how to correct?
Dialog in rc file looks like:
IDD_Domain_1 DIALOGEX 0, 0, 575, 319
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_MINIMIZEBOX |
WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "xxx"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
...
Thanks you.
|
|
|
|
|
Hi folks!
I want to have an ownerdrawn trackbar (Slider) control. Therefore I check for a WM_NOTIFY event with NM_CUSTOMDRAW in the code member of the NMHDR-structure. Let me give a short code example
code:
case WM_NOTIFY:
lpNotify = (LPNMHDR)lParam;
switch(lpNotify->idFrom)
{
case IDC_SLIDER1:
switch(lpNotify->code)
{
case NM_CUSTOMDRAW:
lpDraw = (LPNMCUSTOMDRAW)lParam;
switch(lpDraw->dwDrawStage)
{
case CDDS_PREPAINT:
return CDRF_NOTIFYITEMDRAW;
case CDDS_ITEMPREPAINT:
switch(lpDraw->dwItemSpec)
{
case TBCD_CHANNEL:
FillRect(lpDraw->hdc,&lpDraw->rc,(HBRUSH)GetStockObject(BLACK_BRUSH));
return CDRF_SKIPDEFAULT;
case TBCD_THUMB:
FillRect(lpDraw->hdc,&lpDraw->rc,(HBRUSH)GetStockObject(WHITE_BRUSH));
return CDRF_SKIPDEFAULT;
}
break;
}
break;
}
break;
}
break;
Well, this works fine up to the CDDS_PREPAINT part, where I request an interaction into the control's drawing procedure.
But I never reach the most important part of CDDS_ITEMREPAINT where I acutally paint the control. I've read tons of documentations of this function and all describe it this way.
Does anyone know why it doesn't work for my example?
thanks in advance
Starik
P.S. Environment: VC++ 6.0 SP5
CommCtl. Version: 5.81.4704.1100
|
|
|
|
|
This article [^] should provide useful info.
The technique you mention works well for me, but I use a class derived from CSliderCtrl (sounds more logical that an object draws itself), and use message reflection to get the CustomDraw notification (ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw) )
And all the girlies say I'm pretty fly for a white guy
|
|
|
|
|
Thanks for the article. But I'm looking for a solution with any use of MFC-classes. Does anyone know a solution just using plain Win-API.
|
|
|
|
|
I would like to be able to highlight a section of a graph, very similar to audio programs highlighting a wav pattern by using the mouse. Any ideas?
Thanks
|
|
|
|
|
You can draw a rectangle area, the "selection", in XOR; look for CDC::SetRop2 .
you also need to handle the mouse down, move and up to start and manage the drawing.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hi
I would like to know how to make a toolbar button toggle. For example, in MDI if there are two child windows and corresponding buttons on the toolbar for them, if the button
is clicked once then the child window should appear and when it is clicked for the second time the child window should dissappear. Please help me regarding this. This is urgent.
Thanking you,
Regards
Ruchit Sharma. R
|
|
|
|
|
Hi
I would like to know how to make a toolbar button toggle. For example, in MDI if there are two child windows and corresponding buttons on the toolbar for them, if the button
is clicked once then the child window should appear and when it is clicked for the second time the child window should dissappear. Please help me regarding this. This is
urgent.
Thanking you,
Regards
Ruchit Sharma. R
|
|
|
|
|
Add a Handler for ON_COMMAND_UI (Toolbar Button)
void CMainFrame::OnMY_SNAZZYButton(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(..1 for check , 2 for uncheck...);
}
Hope it Helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I generated a FormView Dialog in a MDI, I can use a item in Menu to active and display the dialog, however, when I click the MINIMIZEDBOX on the dialog, it will disappear, and I can't find it back ever.
I must say this dialog didn't destroy normally!
What should I do , do you meet with this kind of problem?
Hoping...
|
|
|
|
|
Hi there
I am writing a program to use linked lists using templates, and i am trying to make it as fast as possible, so i am thinking of storing the address of the last inserted item.
Each node of the list if declared as follows:
template <class ItemType>
struct NodeList
{
ItemType *item;
NodeList<ItemType> *next;
}
what i am trying to do is to declare a global variable like
template <class ItemType>
NodeList<ItemType> *last_inserted=NULL;
, but the compiler won't allow me to do that. If instead i declare it as
NodeList<<int>> *last_inserted=NULL, it is ok, but it would work for integers only.
How can I get this to work???
Thanks
|
|
|
|
|
Have you thought about using the STL to do this? It does exactly what you need, is about as fast as you can get, and most importantly, it works without you needing to re-invent something. An example can be found here[^].
If you really must create your own linked list, then there is no need to use a global (which is a bad thing to do anyway) for the next position. Instead, store it in the class that provides the list operations.
|
|
|
|
|
I wish I could do that, but this is my assignment for my computer science project...
Thanks for the reply.
Thiago Guzella
|
|
|
|
|
I want to create transparent gdi objects..how is it possible
|
|
|
|
|
|
it's not it is hard i have a teacher teaching me and i still don't no what the f*** to do
|
|
|
|
|
|
|
I have an UI based application designed using DirectSOund to capture nad playback voice. But teh problem is that it expects the UI window to be on top and on focus always. Presently I am passing the handle to the main UI application so when i minimize it our bring another application on top of this no audio can be heard though capturing takes place.
Presently I am setting DSSCL_PRIORITY in SetCooperativelevel. I have also tried the other levels....NORMAL, etc.
anybody worked on DirectSound ?Any solution to this ??
|
|
|
|
|
Use DSBCAPS_GLOBALFOCUS in the DSBUFFERDESC structure. Hope this helps
-Tareq
|
|
|
|
|
I am face'g proble in the DLL. when I work in Debug mode the code work fine
/////--code is--//////
char* pCharPointer = new char[intLength];
//
//some code
//
pCharPointer = NULL;
delete [] pCharPointer;
///////////
But give error in release mode.....
//////////////////////////////////////////////////////////
If I change the code to
//////--code---/////
char* pCharPointer = new char[intLength];
//
//some code
//
//----pCharPointer = NULL;
delete [] pCharPointer;
///////////
it work's fine in release mode but give error in the debug mode...
It will be a big help if some body can clear WHY????
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
The first snippet is just wrong - you're overwriting the actual pointer to the memory block, which causes delete[] to simply do nothing in release mode. There's probably an assert in debug mode to tell you that you're trying to delete a null pointer.
If your debug mode is telling you about a problem, you should probably listen. Release mode doesn't do as much checking. Could you be corrupting this pointer somehow?
It would help if you posted the error message(s).
|
|
|
|
|
I wish to elaborate on what mike said.
char* pCharPointer = new char[intLength];
pCharPointer = NULL;
delete [] pCharPointer;
char* pCharPointer = new char[intLength];
delete [] pCharPointer;
delete [] pCharPointer;
pCharPointer = NULL;
delete [] pCharPointer;
INTP
|
|
|
|
|
pCharPointer = NULL;
delete [] pCharPointer;
Sir, are you blind? That if anything ought to raise suspicions.
--
If there was a problem, Yo, I'll solve it!
Check out the hook while my DJ revolves it.
|
|
|
|