|
Hi, I wrote a dll to retrieve data from a table of a web page. That works fine. But there are also tables protected by some Javescript code. The scriptcode get's the login/password and makes a "document.login_form.submit()". How could I emulate this behavior within my dll. To give GetHttpConnection() the login/password parameter doesn't work, because the page isn't direct protected. There shouldn't be any interaction. Thanx, Norbert
Norbert Behrens, Gruenheider Weg 36, 12589 Berlin, Germany
|
|
|
|
|
Hi
I've made a clistctrl + subclassed it to add more functions.
My list-view looks like this:
Employee Nr Name Age School
1 MyStupidName 15 SKL(BUTTON)
..
All fields are not editable + added some extended styles (gridlines, full row select).
If you click on the button, a dialog should appear with another listcontrol displaying all schools. After selecting a school + pressing ok, the name of the school should appear before the button.
The form is already made with all schools in the list, and when you press ok, it returns the name of the school. So that part is ok.
But how do i insert such a button into a listcontrol at the correct place of every line?
Hope someone knows how to get this done.
Just edited:
and i use VC5
Greetings
Jens
|
|
|
|
|
You may have to resort to owner-drawing the cell in question.
|
|
|
|
|
if you don't want to ownerdraw...
take a look here in CP about a recent article on how to create more than one button dinamically.
Moreover there's another article here or in codeguru (I don't remember very well) about editing a listctrl and the author creates a combobox inside a cell... (you could create dynamically some buttons inside the desired cells...)
Hope this helps...
NOTE:
if you ownerdraw, or if you do this other solution, derive a CListCtrl and place the code there, you'll be able to reuse tha class wherever you want to.
|
|
|
|
|
I have a CSpinButton control buddied to a CEdit, and that is fine for changing a numeric value.
The problem is that I want an even which occurs and will generate an action.
I have tried UDN_DELTAPOS, but this shows the value of the CSpinButtonCtrl before it is changed by the up/down event.
Also, when I try accessing the value of the text in the CEdit box, I get an exception.
Any ideas ?
Thanks.
Elaine
The tigress is here
|
|
|
|
|
Trollslayer wrote:
The problem is that I want an even which occurs and will generate an action
What do you mean ?
Trollslayer wrote:
Also, when I try accessing the value of the text in the CEdit box, I get an exception.
Easiest way to fix that will be to post your code.
~RaGE();
|
|
|
|
|
Hi,
I'm creating an MDI App containing non rectangular dialog.
It seems to work well because I can see my bitmap and the region seems to be well defined. My problem is that the removed part of my dialog is supposed to allow me to see my app background. Unstead, I see my desktop. Also, when I'm resizing, the removed part of my dialog dont refresh.
I have redefined OnPaint() and OnCreate(), OnEraseBkGround()
int BitmapDlgBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialogBar::OnCreate(lpCreateStruct) == -1)
return -1;
// Load the image
m_hBmp = (HBITMAP)LoadImage(GetModuleHandle(NULL), "C:\\Bitmap.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
if(m_hBmp == NULL)
{
AfxMessageBox(_T("Error opening the Bitmap!"));
return 0;
}
// create a compatible device context
// for the bitmap. we will use this
// DC when painting the image onto
// the background of the window.
//CDC* dc = GetDC();
//m_hBitmapDC = CreateCompatibleDC( dc->m_hDC );
//ReleaseDC( dc );
//m_hOrigBmp = (HBITMAP)SelectObject( m_hBitmapDC, m_hBmp );
HDC dc = ::GetWindowDC(this->m_hWnd);
m_hBitmapDC = ::CreateCompatibleDC( dc );
::ReleaseDC(this->m_hWnd, dc);
m_hOrigBmp = (HBITMAP)SelectObject( m_hBitmapDC, m_hBmp );
// convert image to region. assume a magenta transparency color.
m_imageWidth = 0;
m_imageHeight = 0;
WindowRegion rgn;
HRGN hBmpRgn = rgn.CreateRegionFromImage( m_hBmp, RGB(255,0,255), m_imageHeight, m_imageWidth );
m_imageWidth = rgn.m_dwWidth;
m_imageHeight = rgn.m_dwHeight;
// resize the window with its height/width based on that of the bitmap.
SetWindowPos( NULL, 0, 0, rgn.m_dwWidth, rgn.m_dwHeight, SWP_NOZORDER | SWP_NOMOVE );
// finally, ask Windows to force the
// window to take on the shape of the
// region.
// note: the System owns the region
// after this call so there is no need
// to release it manually.
SetWindowRgn( hBmpRgn, FALSE );
return 0;
}
void BitmapDlgBar::OnPaint()
{
if ( GetUpdateRect(NULL,FALSE) )
{
PAINTSTRUCT ps;
ZeroMemory(&ps,sizeof(ps));
CDC* dc = BeginPaint(&ps);
BitBlt( dc->m_hDC, 0, 0, m_imageWidth,
m_imageHeight,
m_hBitmapDC,
0, 0, SRCCOPY);
EndPaint(&ps);
}
}
Any Ideas?
Regards
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Create a function that does the specialized drawing you do in OnCreate(). Call that same function in OnPaint().
Kuphryn
|
|
|
|
|
Hi,
Thanks for the reply,
I'm not sure of what your telling me...Can you explains a bit?
Thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi,
I am posting again due to no one replied before to my post.
I have created a very simple activeX using VC++. When I add the ocx file to a web page, using microsoft activeX control pad, I can edit the properties I have created and send values to them, but if I want to send values using the <param /> tag, so the values will be send when the page is loaded, then nothing happend.
Can anyone please help?
"Learn from the mistakes of others.
You can't live long enough to make them all yourself."
"Failure doesn't mean I'm a failure, It does mean I have not yet succeeded;
Failure doesn't mean that I should give up, It does mean that I should try harder;
Failure doesn't mean that I will never make it, It does mean that I need more practice".
Thank you for helping.
|
|
|
|
|
Hi
I have this project that I'm working on. It's a SDI with a CFormView an it contains a Tabctrl which again contains a dialog for each tab. Every dialog, which is created dynamically, contains some dynamic buttons an other controls!
So my question is how do I create the messages for the controls to react on?
I dont know if my question is clear enough but ask if there is any doubt.
Thanks in advance!
Frank
|
|
|
|
|
Maybe this link[^] can be a beggining to answer your question.
~RaGE();
|
|
|
|
|
How do I dismiss a popup menu tracked on a tray icon after my callback has created the menu?
Inside the client it's easy:
GetMenu()->TrackPopupMenu(
uFlag,
ipMouse.x,
ipMouse.y,
this);
But it does not work for the tray!!!
This does not work either:
HWND hWndTB = ::FindWindow("Shell_TrayWnd", NULL);
::TrackPopupMenu(
GetMenu()->GetSafeHmenu(),
uFlag,
ipMouse.x,
ipMouse.y,
0,
hWndTB,
NULL);
???
Must be something like killing the menu modal loop I guess.
Regards Michael Mogensen /dk.
Regards Michael Mogensen /dk.
|
|
|
|
|
Try setting the forground window to the window of your app, showing the menu and then posting a null message to your window...
pWnd->SetForegroundWindow();
pMenu->TrackPopupMenu( ... );
pWnd->PostMessage( WM_NULL );
There are 10 kinds of people - those that get binary and those that don't.
|
|
|
|
|
THANX'! It worked - perfect!
Michael Mogensen.
|
|
|
|
|
Hello,
how can i embbed a dialog in a my mainframe window?
Thanks, Mark
|
|
|
|
|
If you mean in the main client area, check out CFormView. When you run Appwizard, on the page towards the end (last or last but one) where it lists the classes that will be created, select your view class and select CFormView as the base class.
If you want to add a dialog as a toolbar, see the documentation for CDialogBar.
Hope this help!
|
|
|
|
|
Yep,in the client area. You mean with the class-wizard? I can't find the option there to change the base class.. ?
Thanks, Mark
|
|
|
|
|
No, in the App Wizard, when you first create the application. If you are doing it retrospectively, the best thing to do is to create a new project and then work out the differences in the generated code (changes will be mainly to the view and resources, but also possibly to the doc), merging the code into your existing project.
|
|
|
|
|
I habe a splitter Window with an Edit View and a CListView.
hello !!!
Now I have a shared sroll bar making with :
m_wndSplitter.SetScrollStyle(WS_VSCROLL);
Now the Edit View is reacting on the shared scroll-bar, but the ListView
has its own scroll-bar and is not reacting on the shared scroll bar.
So, what can I do, that the ListView has no scroll bar and that it is reacting on the shared scroll-bar???
Both Views must synchronous scroll with the shared scroll-bar.
Thank you for helping me,
cu
schoni
|
|
|
|
|
I'm using a technique I found here on code project to embed a combo box in a toolbar. Because my toolbar uses large 32x32 buttons, the toolbar spacer line (the "placeholder") behind the combo box is visible.
Any ideas on how not draw the line? (making it hidden eliminates it from the toolbar)
|
|
|
|
|
|
Hi,
I have a problem, I have an installation set for DAO36, and it tries to self register DAO2535.TLB... after that I get an error message...
Does make sense install a TLB ??? ( I think not as far as it don't have any registry information, I'm right ?).
Greetings
Braulio
|
|
|
|
|
Hi world,
What's the best solution to find the pointer which caused a memory leak?
I don't use MFC (and doesn't want to use it)!!! Is smart pointer a good solution?
Thanks for any advice...
Hello World!!!
from Raphaël
|
|
|
|
|
You can use the CRT Heap check functions:
#include "crtdbg.h"
#if defined(WIN32) && defined(_DEBUG)
const int _CrtDbgFlags =_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
_CrtSetDbgFlag(_CrtDbgFlags|_CRTDBG_LEAK_CHECK_DF);
#endif
I think there is a recent article here on CP about overiding new and delete to locate memory problems as well.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|