Visual C++ :: Slider Not Working Properly In A Dialog MFC?

Jul 3, 2013

I have a slider control on a dialog box. I am playing a video file and slider moves according to the video elapsed. Suppose I have set the slider range to 100. Now till some point say 90, the slider moves to the point wherever I click the mouse. but at the last point in between some range say 90 - 100 (to the end of the slider), if I click the mouse button anywhere, slider jumps to the end.

I am using a TimeLine control where user can add more than 1 video (1, 2, 4, 8, 10 , 50 etc......), If I use only one video, slider moves as per the video progression.....Issue arises when I add more than 1 video and click on the start button, slider starts moving....Now when I drag the slider to any position or I click the mouse button anywhere on the slider control, slider thumb moves to that position and immediately jumps back to some other position. This is the Issue, I am facing.

share some sample code where slider is moving with the video showing the progress of the video.

I want to implement a functionality similar to VLC player. Wherever user clicks the mouse, slider moves to that point.

View 13 Replies


ADVERTISEMENT

Visual C++ :: Getting Slider With Number Displayed Inside Slider?

Oct 23, 2012

I need a slider with number displayed inside the slider. Slider thumb or number should be moved and finally i need to fetch the value where the slider thumb is placed. I had attached the image of slider which i required.

[URL]

View 4 Replies View Related

C :: String As Parameter Not Working Properly

Oct 19, 2013

I want to alter a string inside a function, but it is not working.Here is the function:

Code:

#include <stdio.h>
void test (char *ch){
ch[0] = 0;
ch[1] = 1;
ch[2] = '';
}

[code]...

View 2 Replies View Related

C/C++ :: Right Hand Maze Not Working Properly

Nov 1, 2014

I am creating a right hand maze solution, and it actually works for the most part, but it gets stuck at the sixth spot and will not proceed any further. I cannot seem to find my error even though I know it's probably a small one in my code, here is what I have at the moment:

#include "stdafx.h"
#include <iostream>
#include <Windows.h>

[Code].....

View 6 Replies View Related

C++ :: Count Function In Program Not Working Properly - Counting Blank Nodes

May 9, 2013

I tested my count funtion. So my count function is not working properly, it should return 5 because 5 words have prefix "tal," but it is giving me 10. It's counting blank nodes.

This is my main.cpp file

int main() {
string word;
cout<<"Enter a word"<<endl;
cin >> word;
string filename;

[Code] .....

View 9 Replies View Related

Visual C++ :: Slider Not Incrementing With Video?

Jun 15, 2013

I am using DirectShow to play/pause/stop a video file. I am having a slider control which increments with the playing video. I have done some calculation to find the exact step to forward or backward the video.

On dragging the slider to any position, video forwards/backwards to the new position, but slider doesn't get increment. Say I drag the slider from 10 to 50, video goes to the new position, but on releasing the capture slider again jumps back to the previous position from where it was dragged.

View 2 Replies View Related

C++ :: Sort Players In Descending Order On The Basis Of Score - Program Not Working Properly

Feb 11, 2015

#include <iostream.h>
#include <stdlib.h>
#include <time.h>
using namespace std;

class Player {
private:
char name[20];
int score;

[Code] .....

View 5 Replies View Related

Visual C++ :: Setting Slider Position Programmatically?

Jan 31, 2014

I have a problem to set sliderposition programmatically. This is my try:

//pointer to my slider control:
// On the begining the range ist 1 to 10
// and the position is on 5
// change the range:
pSliderCtrl->SetRange(1, 100); // ok no problems

Now, how to "move" btw. how to redraw the position of the slider thumb programmaticaliy with c++? Need to send some message, if yes what message i need to send to slider control to move (reposition) the slider thumb?

I try with
// first:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, TRBN_THUMBPOSCHANGING, 0);
// then with:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, NM_RELEASEDCAPTURE, 0);

but nothing happens?

View 2 Replies View Related

Visual C++ :: OnLButtonDown Not Getting Called On Slider Control In MFC?

Jun 20, 2013

I am using a slider control on a dialog box. I have handled OnLButtonDown for Slider control. But I wonder its not getting called whenever I click on the slider thumb, instead it gets called when I click anywhere on the dialog.

I want to handle OnLButtonDown when I click on the slider thumb.

View 6 Replies View Related

Visual C++ :: How To Bring Slider To The Position User Clicked The Mouse

Jun 11, 2013

I have a dialog control where I am using a slider control. I have handled the notification messages sent by the slider control. When user clicks on the slider, the slider moves in steps. I want to bring the slider directly to the position where user has clicked the mouse. The slider thumb should directly move to the clicked position instead of in steps.

View 2 Replies View Related

Visual C++ :: How To Move Video Forward / Backward When User Drags Slider Bar

Jun 11, 2013

I am working on a project in which I use DirectShow to Play / Pause / Stop the video. I am using slider bar to show the progress of the video. As the video starts playing, the slider bar moves in proportion to the video duration. Now when user moves/drags the slider bar to a new position, I want to forward the video in equivalent proportion.

Say if video duration is 50 seconds and max range of the slider bar is set to 100. slider will 2 steps for 1 second of video progress. Now if user drags the slider to 60 while video is playing, I want to increment/forward the video. if user moves the slider backward, video should move backward.

I have done with the slider moving along with the video and when user drags the slider. How to set the new position of the video, so that the video starts playing from that point.

View 4 Replies View Related

Visual C++ :: Value Of ESP Was Not Properly Saved Across A Function Call

Sep 22, 2012

I'm working with a cross-platform library which defines a function to obtain function addresses from a shared object (i.e. a DLL on Windows). Here's my modified version of the function which works (albeit only on Windows of course):-

Code:
typedef void (*SuilVoidFunc)(void);
/** dlsym wrapper to return a function pointer */
static inline SuilVoidFunc
suil_dlfunc(void* handle, const char* symbol) {
return (SuilVoidFunc)GetProcAddress((HMODULE)handle, symbol);
}

Now, here's the original (cross-platform) version which is giving me a run time error on Windows:-

Code:
typedef void (*SuilVoidFunc)(void);
#define dlsym GetProcAddress
/** dlsym wrapper to return a function pointer */
static inline SuilVoidFunc
suil_dlfunc(void* handle, const char* symbol) {
typedef SuilVoidFunc (*VoidFuncGetter)(void*, const char*);
VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
return dlfunc(handle, symbol);
}

That original version fails at the final return line. The error message says "The value of ESP was not properly saved across a function call".

I'm assuming there's a problem with the declaration of VoidFuncGetter (i.e. it'll assume that the caling convention for GetProcAddress() is cdecl when in fact, it's stdcall). What's the most elegant way to fix this and still keep cross-platform compatibility?

View 1 Replies View Related

Visual C++ :: How To Set The Parent Dialog

Apr 17, 2013

I've created a modeless dialog from my main dialog as follows:

Code:
m_pContainerDlg = new CDlgContainer(NULL, this);
m_pContainerDlg->Create(CDlgContainer::IDD, GetDesktopWindow());
m_pContainerDlg ->ShowWindow(SW_SHOW);

This container dialog creates a child dialog which I show inside the container

Code:
BOOL CDlgContainer::OnInitDialog(){
// Create the child dialog and show it
m_pChildDlg = new CChildDlg(this);
m_pChildDlg->Create(IDD_DIRECTORY_DIALOG, this);
return FALSE;
}

From my child dialog I then create a modal dialog when a user clicks on a button

Code:
CChildDlg:: CChildDlg (CWnd* pParent /*=NULL*/) :
m_pParent((CDlgContainer*)pParent), {
} void CChildDlg::OnBnClickedBtn() {
CMyDlg MyDlg;
INT_PTR iResult = MyDlg.DoModal(pParent);
}

My problem is that the CMyDlg is modal but to the main dialog and not to the container or the child dialog.

View 3 Replies View Related

Visual C++ :: Catching A Dialog Box?

Dec 9, 2013

What I want is simple: I want to catch a dialog box!

The dialog box pops very frequently in a website. We have to put a username and password and press OK. I checked with spy++. It doesn't have any child windows. So catching the dialog box with windows API is ruled out. It must be a HTML dialog. I have to get DOM COM interfaces of the dialog.

Another option may be to make an add-on to get the interface to IWebBrowser2 and get the events fired. The title of the dialog box is "Authentication Required". If the events will be fired for that dialog box, I can check the title using IHTMLDocument2::get_Title.But will the events be fired for HTML dialog box? How to catch that desturbing dialog box.

View 2 Replies View Related

Visual C++ :: How To Create A Dialog As DLL

Feb 13, 2014

How can I create a dialog as a DLL ? I have a SDI MFC app (CView is based on CFormView) and from a button I want to load a modal dialog, but that dialog must be developed as DLL ... I didn't find something that fit my needs on internet ... P.S. I have only VC6 !

View 14 Replies View Related

Visual C++ :: FTP With Progress Dialog

Nov 13, 2012

For a project I'm working on, I need to be able to download a file from an FTP server and store it to a predetermined location with a predetermined name. No user interaction should be needed. Because the file is rather large, and I need the main program to remain responsive, this is going to need a progress dialog.

I could write all this myself and use the MFC wininet wrappers (CInternetSession et al) to do the downloading, but... Explorer already has this, and IE has such a dialog also. It doesn't seem unreasonable to assume those dialogs are available via some API.

Is a "FTP download with dialog" available as a windows API, or do I really need to write all this myself ?

View 2 Replies View Related

Visual C++ :: How Many Items Exist In A Dialog Box

Sep 11, 2013

I was wondering how can we know how many items exist in a dialogbox? If there any way that i can get the items ID in a dialogbox by having just the dialogbox's object or handler? Or any way that we can get a dialogbox content by coding.

View 6 Replies View Related

Visual C++ :: MFC Dialog Clipping Off In Low Resolution

Mar 25, 2013

I have an mfc dialog of size 1280 X 1024 and when i change the resolution to 800 X 600, after adding scroll bar, it don't show the entire dialog contents, Seems like it clips the 800 X 600 portion.

I have handled VScroll and HScroll. It works fine for higher resolutions!

View 1 Replies View Related

Visual C++ :: How To Reposition Menu Bar For Dialog Box

Dec 23, 2013

Normally, menu bar resides below the title bar. See attachment MenuBarOriginal.JPG

Is there a way that we can position the menu bar? For example,place it on the side or anywhere on the dialog box?

MenuBarModified.JPG is some sample of menu bar positions that I want to place.

I want to do this on a dialog box.

View 6 Replies View Related

Visual C++ :: Pass Parameter In Dialog Box

Feb 12, 2014

I need to pass a variable to a dialog box.

Code:
Doc* pDoc;
Dialog dlg;
int input = dlg.DoModal();

When I call dlg.DoModal() I need to somehow pass the pDoc into the dialog box. Everything I need the variable for is taking place inside the oninitdialog function. Is there anyway to pass the variable to that function?

View 2 Replies View Related

Visual C++ :: How To Know When Mouse Over A Control In A Dialog

Jul 10, 2013

I forget how to know when mouse is over controls in dialog.. I want to show a message in status bar when mouse over each control...

View 1 Replies View Related

Visual C++ :: CListCtrl On Dialog - Row Selection?

Aug 22, 2014

I have a ListCtrl on my dailog. It has a report view. In my case I have selected first row with left click of mouse and entire row is displayed in blue color as selection (as per expected) and when I right click the second row of the listctrl it displays the menu which I have added to it and the selection remains with the first row.(as expected). I have already overridden the ListCtrl class.

I want that on the right click of second row the selection should remain with the first row but this second row also should be displayed with dotted line border.

View 1 Replies View Related

Visual C++ :: Child Dialog Shadow Remains?

Oct 5, 2012

i open child dialog from a dialog( which is launched from a toolbar of a window) after editing i close the child dialog, after closing child dialog shadow is retained on window but not on the parent dialog. Later when i close the parent dialog the child dialog shadow disappears. (issue exist only when i edit in child dialog)

View 14 Replies View Related

Visual C++ :: How To Pass A Struct To A Dialog (WinAPI)

Feb 28, 2013

I want to pass some parameters to a dialog. I am trying to pass a struct as LPARAM in CreateDialogParam. How to access this structure from ONOK for example?

Code:
struct DlgParam{
std::wstring IEDllPath;
CString folderName;
};

[Code] .....

View 7 Replies View Related

Visual C++ :: Intercept Messages Sent To Controls On A Dialog

Apr 8, 2013

If it is possible, I'd like to know how to intercept messages sent to controls on a dialog. I'm working on a large application with a large number of dialogs, each with a number of controls on the dialog. I need to be able to intercept messages sent to these controls so that I can determine if the controls really need to take action on these messages. I could subclass each control and override the specific event handlers but due to the volume of controls in the application this could take a very long time, will introduce risk if controls are missed, and will increase maintenance costs. What I want to do is create a class which is derived from CDialog and each of the dialogs in the application would then be derived from this new dialog class. The new dialog class would intercept messages sent to any control on the dialog and if the dialog decides that the control should do something then the dialog will pass the message on to the control.

example:
CExistingDialog is derived from CNewDialog is derived from CDialog

CExistingDialog has a number of controls. When the code in CExistingDialog calls CWnd::EnableWindow on one of these controls I want CNewDialog to intercept the message, determine what should be done with the message, and then pass it on to the control.

I'm not very familiar with the messaging framework. I've tried overriding a few of the methods of CNewDialog but none of them ever receive the message to enable the window. I assume this is because the message is sent directly to the child window (the control).

Is there any way to intercept these messages? I don't know much about hooks either but is this a possible option?

View 8 Replies View Related

Visual C++ :: Property Sheets On Main Dialog

Jul 17, 2014

I have been playing around with property sheets/property pages and have been successful in getting them to work in a secondary dialog by calling the property sheet using DoModal().

How to get the property sheet to display on the main dialog of a dialog application.

I am using VS2008 and CMFCPropertySheet and CMFCPropertyPage.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved