|
I have a HTML control on a dialog box. The HTML control displays some text with some words linked to javascript that pops up a description of the word.
Everything is ok except that if the box that pops up is bigger than the HTML control, it gets clipped, so I can't see it.
Can anyone tell me how to make a window appear above all other windows in javascript?
Cheers
Neil
|
|
|
|
|
Hi all
=-=-=-=-=
Can anyone tell me... how can I change the font color of a button
in my NOT MFC JUST WIN32 Application.
The button id is :IDC_BUTTON1
Thanks.
=-=-=-=-=-=-=
The_Server
|
|
|
|
|
set the owndraw style to your button and catch the WM_DRAWITEN message of your dialog,then draw the button yourself
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
You'll have to owner draw it, I'm afraid...this is a long standing omission of Win32. There are MFC classes to do this, but if you're working on raw Win32 you'll probably have to roll your own.
If you do this, remember you could be running on a themed XP system so you'll need to implement both conventional (GDI) drawing and themed (UxTheme.dll) drawing. UxTheme is actually fun to work with (unlike GDI), so don't shy away from it...
Anna
Homepage | My life in tears
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
|
Unlike every other UI system in the world, you can't "set" the color of a Win32 control. Rather, you need to implement a WM_CTLCOLOR message handler in the Button's parent, and respond to it appropriately (check out MSDN for info.)
Fonts are much simpler. In your dialog's WM_INITDIALOG, after calling the base class message handler, do a GetDlgItem(IDC_BUTTON1)->SetFont(yourfont); Make sure you keep the font handle around (i.e. don't create a CFont on the stack).
|
|
|
|
|
LOGFONT lf={0,0,0,0,0,0,0,0,0,0,0,0,0,"Times New Roman"};
HWND hwndButton=GetDlgItem(hDlg, IDC_BUTTON1);
ret=SendMessage(hwndButton,WM_SETFONT,(WPARAM)lf, (LPARAM)TRUE);
if ret = zero >> faile
okay ?;P
|
|
|
|
|
10x but my problem is with color....
evryone says owner draw owner draw.
guess I'll have to own and draw...
=-=-=-=-=-=
The Server
|
|
|
|
|
http://www.vnpal.com/skidrow/zip/subclass.zip
try this example
I am a beginner!
|
|
|
|
|
I am using the docking windwos just like the dev studio.i have to access my document class.the objects of docking windos are declared in FrameWnd class. someone told me to create view on the docking window so that it can access document class.how can i attach the view to the docking window that is derived from ccontrolbar?
|
|
|
|
|
When i use splitters in my application it is not closed but keepon running in back.i have toclose it by the task manager. when the code of splitter windowis commented off.It works fine.What should I do?
That was my previous message.but as i have been told that i should check for WM_CLOSE message.It is sent.In OnClose() function i wrote
{
if (CFrameWnd::DestroyWindow()!=0)
{
AfxMessageBox("Error",MB_OK);
::DestroyWindow(GetSafeHwnd());
DWORD ErrorCode=GetLastError();
}
}
This ErrorCode has the value 1400,i.e. Invalid window handle,What should i do?
|
|
|
|
|
Hello,
you should NOT destroy the window maually! your applications takes care of that. Thats the reason why it works when you make comment of your code. Let's take a look on how a window is destroyed.
When a WM_CLOSE message arrives, the following functios are called in this order:
OnCloseQuery()
OnClose()
// then the WM_SHOWWINDOW with wParam or lParam set to FALSE is posted
OnHide()
// then the WM_DESTROY is posted
OnDestroy()
In all these functions the window is still there on the heap! You can see the OnDestroy() function as an addition to the destructor of the window.
So what you should do is the following: Get the handle of your splitter window and post the WM_QUIT message, WM_SHOWWINDOW and the WM_DESTROY. This should do the trick.
Please let me know...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
OUCH!
You should never, ever, post WM_QUIT directly. You should only ever call PostQuitMessage . WM_QUIT is synthesised by GetMessage from the 'quit' flag on the message queue. Once this flag is set, GetMessage will never return another message.
In an MFC application, the quit message is automatically posted by OnNcDestroy if you destroy your thread's main window - the window pointed to by m_pMainWnd in the CWinThread object for the thread. For your main thread, the CWinThread object is the CWinApp -derived object.
You should check to see if you're inadvertantly catching WM_NCDESTROY for your frame window and not passing it down to CWnd . Alternatively, check that you're assigning to m_pMainWnd in your CWinApp::InitInstance override.
|
|
|
|
|
I never said how to post the WM_QUIT message... anyway, if you use PostQuitMessage(), are the other messages (WM_SHOWWINDOW, WM_DESTROY) posted automatically?
thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
No. WM_QUIT is the last message you will ever get.
However, it's the one responsible for breaking out of the GetMessage loop in CWinThread::Run , which is what causes CWinThread to call ExitInstance , and eventually returns from the thread's entry point function.
|
|
|
|
|
So the other 'message' handlers I described won't get called?
Maybe I should quit school if they are teaching me things that aren't even true...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Function CreateSemaphore can generate a semaphore
As to anythings else I know very little
Can you tell me where better to programme by adopting semaphore
and the way
Thanks
|
|
|
|
|
Semaphore is an synchronization element, like event, critical section or mutex - elements used in multithreaded programming. You can look to MSDN for detailed description (see CreateSemaphore function).
|
|
|
|
|
Yeah
That is a good idea
and also
note: there are many perfect articles in this site
Maybe that can help us to master "semaphore"
Thank you again!
|
|
|
|
|
Please Help!!!
It is necessary to turn DIB Bitmap on a corner of 90 and 180 degrees
|
|
|
|
|
you can use BitBlt to mirror a bitmap
Don't try it, just do it!
|
|
|
|
|
Hi
I heard a lot about accessing any computer if it is connected via the Internet. So I’m worry about the secret information in my computer ! especially when every one say that WinXP have more problem in Security !
Could any one tell me please how this is possible even if I did not make any share folder on my computer ?
Dose any one know a good articles about this subjects ?
Thanks very much
|
|
|
|
|
wrong section, doesn't have anything to do with visual c++!
Don't try it, just do it!
|
|
|
|
|
I actually use a CTreeView. The selection of HTREEITEMs is made with the mouse.
i want to fordid the use of the key-up, key-down, key-left and key-right which actually allow the selection in the Tree... if someone could hele me
Frackasse
|
|
|
|
|
Handle the TVN_KEYDOWN message.
Arjan.
|
|
|
|
|
Hi,
I created a resource-only Dll to store string, dialog, icon and bitmap. With loadstring function i can load a string from this dll, but i don't know how dipslay a dialog from it. here is my code :
UINT CDataResource::GetResourceDialog(int ResourceID)<br />
{<br />
LPCDLGTEMPLATE lpDialogTemplate = NULL;<br />
HGLOBAL hDialogTemplate = NULL;<br />
HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(ResourceID), RT_DIALOG);<br />
HRSRC hResource = ::FindResource(hInst, MAKEINTRESOURCE(ResourceID), RT_DIALOG);<br />
hDialogTemplate = LoadResource(hInst, hResource);<br />
if (hDialogTemplate != NULL)<br />
lpDialogTemplate = (LPCDLGTEMPLATE)LockResource(hDialogTemplate);<br />
else<br />
return 0;<br />
<br />
ASSERT(lpDialogTemplate != NULL);
// HERE I WANT TO DISPLAY MY DIALOG
<br />
UnlockResource(hDialogTemplate);<br />
FreeResource(hDialogTemplate);<br />
<br />
<br />
<br />
<br />
return 1;<br />
}<br />
Thanks in advance
|
|
|
|