|
Removing style not prevent from appearing,
so that even I hide by comman Window will flick one moment,
and that is problem.
Need to to appear at any.
Until commanded else.
|
|
|
|
|
vgrigor wrote:
Removing style not prevent from appearing...
I suspected such.
vgrigor wrote:
Need to to appear at any.
Until commanded else.
What does this mean?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry I did notinitially
typed text question:
now I added it:
I create followng:
CDialog dlg;
dlg.Create(IDD.pWnd);
dlg appears, but I neeed to hide it,
with no any time of apperiance,
I made following: code above...
but no resilt,
how to do it?
|
|
|
|
|
Derive a class from CDialog using the dialog template. In that class' constructor, call Create(IDD) .
CMyDialog *pDlg;
...
pDlg->ShowWindow(SW_SHOW);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Why create a dialog any way when its going to be hidden? why not create a window using CreateWindow api???
or derive a class from CWnd class and then create it so that you have the power of message mapping of MFC
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Mr.Prakash wrote:
Why create a dialog any way when its going to be hidden?
Why ask me? It's not my project.
Yes, hidden windows do have their place.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
Why ask me? It's not my project.
oops sorry i replied to the wrong post.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
It is interesting,
how to use this API for CDialog ?
How to define sizes?
|
|
|
|
|
|
|
Somebody dropped me right solution.
I did not detected who.
Thanks:
http://www.codeproject.com/dialog/dlgboxtricks.asp
|
|
|
|
|
You can replace all of your code with a single overriden function and two lines of code
void CMyDlg::OnWindowPosChanging(WINDOWPOS* lpwndpos)
{
// This is where it all happens
if(!m_bShowWindow)
lpwndpos->flags &= ~SWP_SHOWWINDOW;
CDialog::OnWindowPosChanging(lpwndpos);
}
Simply turn off m_bShowWindow (which obviously needs to be defined and switched) to show the window. This code prevents the dialog from ever being seen in the first place. Unfortunately Win98, Win95 still seem to briefly flicker before disappearing...but who is running those OS's anyway
Hope this information is not too late for others searching the message boards...
|
|
|
|
|
Hi!
My project used a CListCtrl for displaying a list. This list had the extended styles LVS_EX_ONECLICKACTIVATE and LVS_EX_UNDERLINEHOT (think of the list as a menu). Now I have to replace this list by a CTreeCtrl. The tree now, of course, doesn't underline the hot items any more and the one-click functionality also doesn't work any more.
Now my question: what message must I send to the tree control to behave like the list before? I've already searched MSDN, but didn't find anything. It must be possible, I have some applications that can do this...
Thanks in advance,
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
try this
SetWindowLong(hTreeWnd,GWL_STYLE,GetWindowLong(hTreeWnd,GWL_STYLE) | TVS_TRACKSELECT);
Hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Hope it helps
It did!!
Thank you very much!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I have be assigned a project which has to have a graphical music keyboard which plays the corresponding note when the key is pressed, it also has to have a simple graphical editor to edit the notes. As i am new to all this i was wondering if anyone could give me any pointers of where to start and along what lines i should go about doing it. I am currently trying to interacted with DLL files to access the soundcard.
Any help would be much appreciated.
Mav
|
|
|
|
|
|
mavgoose wrote:
As i am new to all
new to what ? generic programming ? sound programming ? windows application ?
anyway, look for for some MIDI api ... and look around CP, there might be something interresting.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Mav,
It's a lot simpler than you think especially sounding the notes.
The majority of the work will be building a representation of the keyboard that responds to the mouse clicks, what do you mean by edit the notes??
You can use the MIDI API see http://www.borg.com/~jglatt/tech/lowmidi.htm. The sound API has functions that can sound midi output at a given pitch.
Its definitely the easiest way to get the notes sounding, the app itself will need to be threaded in order to sound multiple notes at once...
You will need to link you project to 'winnm.dll' to be able to call midiOutShortMsg() the simplest operation to sound a note. See the section on 'Outputting MIDI data (except System Exclusive)'
have a look at the article and get back to me regarding questions,
Ross W
|
|
|
|
|
Mav,
It's a lot simpler than you think especially sounding the notes.
The majority of the work will be building a representation of the keyboard that responds to the mouse clicks, what do you mean by edit the notes??
You can use the MIDI API see http://www.borg.com/~jglatt/tech/lowmidi.htm. The sound API has functions that can sound midi output at a given pitch.
Its definitely the easiest way to get the notes sounding, the app itself will need to be threaded in order to sound multiple notes at once...
You will need to link you project to 'winnm.dll' to be able to call midiOutShortMsg() the simplest operation to sound a note. See the section on 'Outputting MIDI data (except System Exclusive)'
have a look at the article and get back to me regarding questions,
Ross W
|
|
|
|
|
Ross,
How would you go about attaching 'winnm.dll' to a project? I am at a complete block at the moment which isn't good, I am just unable to get my head around linking the dll files then accessing them. Do i need to create a header file? Which things will i then need to include in the file?
Cheers
Mav
|
|
|
|
|
I was wondering whether anyone could help me…
I would like to produce a ‘Visio’ style GUI in MFC. I have made some very basic programs using MFC but not too sure how to go about this. I need to produce a network diagram based on some code that I have already written. Ideally I should be able to move the ‘objects’ (switches, hosts, etc) within the window. Should I inherit the CRichEditView as the base class and insert OLE objects. If anyone has any opinions/helpful comments/links to help me it would be appreciated.
Even if you know of a different/easier way of doing this please point me in the right direction.
Thanks very much
Simon
|
|
|
|
|
Just buy the rogue wave components that do this - www.roguewave.com (used to be stingray).
|
|
|
|
|
thanks roel but I was hoping to implement a basic version myself - I would use something like you have surgested but it is not going to be a comercial product so would not warrent me spending that much money on it.
But sill the website you gave me is good for research - thanks again.
|
|
|
|
|
Ok in that case I'd write a custom control myself, either using win32 sdk, mfc or wtl, what you're most comfortable with. That would mean handling all the hit-testing, dragging, selections etc manually. I have once written something similar to what you want to do, using different windows for the 'items' in the view but that wasn't the right way to do it. I started redoing it by drawing directly on the custom control but I never finished that (we bought the roguewave thing).
|
|
|
|