Visual C++ :: CDHtmlDialog Not Working With CSS Media Queries
Feb 21, 2014
I have a CDHtmlDialog app in which am trying to add a CSS media query in the HTML file as shown below, but it doesn't work.
@media (max-width:20em) {
table, thead, tbody, tfoot, th, td, tr { display:block; }
tr + tr { margin-top:1em; }
}
The same CSS works fine if i open in a browser like IE, FireFox, Chrome. But inside the CDHtmlDialog app this doesn't work.
I am using Visual Studio 2012 for development and have IE 11 installed in my machine.
View 1 Replies
ADVERTISEMENT
Feb 27, 2014
I have a MFC app that has a CDHtmlDialog embedded in it. During run time i update the HTML content from the C++ code. There's a IMAGE tag in the content and the SRC for the tag is updated multiple times in a second to show different images.
Basically i go over a WHILE loop in the C++ and call a JavaScript function to update the "src" for the "img" tag.
The issue am seeing is that, after running this code for a while the application kinda hangs and the system takes up lot's of memory.
How to solve this, as all the code that's in the browser side of app is HTML & JavaScript. I looked through the C++ code plugged all memory leaks there.
View 1 Replies
View Related
Aug 30, 2013
I am trying to use CDHtmlDialog in a MFC dialog based project.
What i want to achieve is pretty sample. Have one image, one button and one text box in the HTML page.
And then dynamically change this based on a timer. i.e., there're multiple images in the folder and it will change every seconds. Once the button is clicked, the timer stops and no more image changes. Same time when image changes the text in the text box also should change.
I know this is pretty simple, but for some reason i am not able to make the image even display in the dialog.
I am using Visual Studio 2012 in Windows 7 machine.
View 4 Replies
View Related
Apr 9, 2014
I am using CDHtmlDialog in my MFC application to create a UI with HTML, CSS & JavaScript.
In my project there's one dialog created from CDHtmlDialog and a corresponding HTML file for that dialog.
Now during run time i want to change the contents of the HTML file.
Not just the HTML part, i want to change the CSS & JavaScript too.
So basically what am trying to do is, change the entire content of the default HTML file.
Is this possible? If yes, how can i do that?
View 14 Replies
View Related
Oct 25, 2013
I am developing a VC++ application with windows media player component. play video from a video buffer data which i have?
View 2 Replies
View Related
Jan 21, 2013
How can I check if window media player is running in full screen mode & topmost in c++ MFC?
What I used is this logic:
I compared media player full screen coordinates to that of monitor coordinates.If they are same implies media player is in fullscreen.But it has one flaw.Whenever there are control(for play,pause) displayed in full screen in media player, coordinates are not coming same as that of monitor.
View 10 Replies
View Related
May 21, 2014
update Tag_Master set flag='Inactive' where Tag_no=10;
update Tag_Master set flag='Assigned' where Tag_no=12;
I had these two queries, I just want both of these will fire on same event. Is any other way to write both queries in single query instead of writing two different queries ....
View 4 Replies
View Related
Oct 31, 2014
I am trying to get a list of queries to work right now. I have it so that the user will input 1 of 5 things to compare twin primes in a list. I am just trying to get the queries working fully before actually determining the twin primes that need to be output. The console input will be something like "<= 61" and will display all twin primes from 3 to 61, inclusive.
Well, I thought I had it 100%... Then I realized I have a problem, though. So, I'm reading the string in until a space so I can read in the number after that. So that works fine, but then I also want the "all" and "random" console inputs to work, but they won't unless I put a space after them, which is what I'm trying to avoid...
So, I tried just simply asking for another console input after all of my if statements for the string compare after the first console input. That obviously doesn't work either, though, because it still only wants the first "getline" where it reads until the whitespace.
How to be able to do both on the same console input... The relevant code is posted below:
cout << endl << "What do you want to know about your list of twin primes?" << endl;
string qprompt1;
string qprompt2;
getline(cin, qprompt1, ' ');
string comp1 = ">";
string comp2 = ">=";
[Code] .....
View 5 Replies
View Related
Sep 27, 2013
I have lot of C++ API exposed in our project and I want to build an application that queries the database and shows some stuff to the user in the UI.
So, essentially, my main code is in the c++ language. What choices do I have over the UI?. I am interested in showing this UI in the form of a html page lilstening to a port.
View 1 Replies
View Related
Feb 1, 2015
I am trying to run the following 2 separate queries but keep getting the following error message:
I've looked at the database and the first query is successful (hence the parameter is not null) but it fails at the cmd.ExecuteNonQuery(); in for (var i = 0; i < _waypointList.Count; i++) { ... }
Code below:
var query =
@"INSERT INTO booking (operator_id, plot_id, postcode, datetime, stops, " +
"mileage, price, passengers, name, note, phone, status, reference) " +
[Code]......
View 2 Replies
View Related
Aug 12, 2014
I'd like to make a control panel for different social media to control multiple account and have proxy support. I think i need to learn multithreading and socket programming right ?
View 1 Replies
View Related
Oct 26, 2014
Is C# or any other programming language out there that can run like a program that has been installed on you PC? For example say i want my program to run Media player with a saved play list, run spotify, or run a search on the internet?
View 4 Replies
View Related
Mar 26, 2014
I try to play a video I i don't know how.. I searched and i found some tips and articles, but all of it if about Windows Media Player. It's fine, but i need to play something lika an intro an i don't wanna show all that buttons of WMP.. I tried to hide it but no change.
View 2 Replies
View Related
Nov 13, 2014
I am having trouble with a program that queries the user for a noun and forms its plural on the basis of these rules:
a. If the noun ends in "y" remove the "y" and add "ies".
b. If the noun ends in "s", "ch", or "sh" add "es".
c. In all other cases, add "s".
I am having trouble getting started.
View 4 Replies
View Related
Sep 27, 2012
I'm currently trying to work with more than one form, but I didn't succeed yet. What I need is quite simple: Once the program runs, a small form appears first asking "what would you like to do" with corresponding buttons for each option. Each button loads a new different form for a different task. So basically I need to open and close forms, also having two forms loaded at the same time (pop-up style) would be great for certain purposes.
I still haven't figured how to do it properly. I'm currently using VC++ 2008 and my project is a Windows Forms Application.
View 5 Replies
View Related
Jan 21, 2014
FloodFill is not working. I am using Visual C 6.0 in windows 7 environment. Its not filling a triangle.
My code is:
Code:
void CFloodFillExView::OnDraw(CDC* pDC) {
CFloodFillExDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CPoint Pt[7];
Pt[0] = CPoint(300, 400);
Pt[1] = CPoint(200, 300);
[code]....
View 9 Replies
View Related
Dec 30, 2014
Im just wondering how would i get a formula to calculate the total size and proportion of how far the media player has been played, in proportion with the size of the sizeable form, i need an int for the:
Width of formLength of movieHow long has been played by user
I have this code so far:
//The current position played! - Within the timer.tick event arg!
string splayed = axWindowsMediaPlayer1.Ctlcontrols.currentPosition.ToString().Split('.')[0];
int iplayed = Convert.ToInt32(splayed + 1);
//The total time of the movie/audio.
string stotal = axWindowsMediaPlayer1.Ctlcontrols.currentItem.duration.ToString().Split('.')[0];
int itotal = Convert.ToInt32(splayed);
[Code] ....
I have the "AxWindowsMediaPlayer" reference installed, but i need to know how it would work...
Attached image(s)
View 14 Replies
View Related
Feb 3, 2013
Dialogue box in the program is displayed but button will not respond. I created dialogue box using resource wizard,
Code in Resource.rc for dialogue box is generated as below
IDD_DIALOG1 DIALOGEX 0, 0, 131, 69
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Test dialogue"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "That is Good",IDOK,30,35,66,25
[Code] .....
View 14 Replies
View Related
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
View Related
Sep 19, 2014
My code is below:
Total Interest ends up as my last Monthly Payment amount instead of adding up all Interest Paid - What am I doing wrong?
Total Paid isn't calculating correcly either - What am I doing wrong?
I suspect both are very similar problems. I've tried several different calculations, but cannot figure this out.
#include <iostream>
#include <cmath>
using namespace std;
double GetMonthlyIntrest (double OpenBalance,double rate);
bool ContinuePgm();
int main () {
double StartingBalance,rate,amount,OpenBalance,IntPmt,TotalInt=0.0,GrandTotal=0.0;
[code]...
View 3 Replies
View Related
Sep 22, 2012
The below code is working fine in VS2008 and not working in VC6.0 (taking garbage values) this code is for converting hex values to string.
sending Input string is : 727332333263 required output: rs232c
DWORD AsciiToString(LPCTSTR f_chInputChar, LPTSTR f_chOutputChar) {
long ch;
int i,j;
TCHAR tmp[2];
int len = _tcslen(f_chInputChar);
[Code] ....
View 5 Replies
View Related
Nov 6, 2013
I keep having problems with CMFCPropertySheets. I now have it embedded in a resizable dialog and the property sheet and page gets resized when dialog is resized all that is working fine.
Problem is OnSize is being called when the dialog is being resized NOT when it has finished resizing so the values reported in cx and cy is the old size not the size AFTER resizing. What could be causing this? Isn't OnSize call AFTER the size has been changed and OnSizing called WHILE the size is being changed?
I have a list control that needs to take up full rect in each page and when the dialog is maximized it stays at previous size even though the sheet and page have both maximized as they should.
I ran a trace on the OnSize even for both the sheet and page and OnSize is being called during the sizing and not after it has already been sized like it is supposed to.
View 6 Replies
View Related
Oct 3, 2013
Just using Find in my source code to look for variables or whatever, works once or twice then just stops - Doesn't find anything even if it's there. If I restart VS it works again, but not for long.
View 1 Replies
View Related
Feb 6, 2015
I downloaded Visual Studio 2013 on a new laptop. On my old one I could press things like ctrl + F7 to compile and ctrl + F5 to start without debugging however now it isn't responding when I type those commands. Nothing happens at all. How to change this? I googled "keyboard shortcuts not working in Visual Studio 2013" but per the usual Google comes up with garbage search results that do not pertain at all.
View 1 Replies
View Related
Sep 16, 2014
I can't get tooltips to show up for the windows I want in my CFormView derived class. I have copied the code from the MSDN entry on EnableToolTips(). But only two windows respond with a tooltip:
CONTROL "Tree1",IDC_TESTPLANS,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,1,36,85,91
CONTROL "Tab1",IDC_TABCMD,"SysTabControl32",0x0,101,0,239,181
Other windows do not respond. For these windows my function designed to catch the TTN_NEEDTEXTW and TTN_NEEDTEXTA messages is not called. Windows such as
LISTBOX IDC_TESTPLANNAMES,0,119,48,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "",IDC_BTN_COPY,105,177,24,24,BS_ICON
Why wouldn't the messages be sent for those windows? I'm using the code
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, &CCntlrView::OnTtnNeedText)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, &CCntlrView::OnTtnNeedText)
(CCntrlView is the name of my class derived from CFormView.) And as I pointed out, I'm using the code straight from the example given in MSDN for CWnd::EnableToolTips(), with the only difference being that all my controls are created in the rc file as shown above.
View 12 Replies
View Related
Mar 18, 2015
I'm having problem using the click event in a web browser control. I have a control called CIEBrowser that implements a Web control. Here a message_map:
Code:
IMPLEMENT_DYNCREATE(CIEBrowser, CWnd)
BEGIN_MESSAGE_MAP(CIEBrowser, CWnd)
ON_COMMAND_RANGE(ID_IEHOME,ID_IESTOP, OnToolBarCmd)
ON_UPDATE_COMMAND_UI_RANGE(ID_IEHOME,ID_IESTOP, OnUpdateToolBarCmd)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
END_MESSAGE_MAP()
I want to implement a derived class called CFulltextCtrl.
Code:
IMPLEMENT_DYNCREATE(CFulltextCtrl, CIEBrowser)
BEGIN_MESSAGE_MAP(CFulltextCtrl, CIEBrowser)
ON_WM_PAINT()
ON_WM_HELPINFO()
END_MESSAGE_MAP()
I have a dialog with a control using this CFulltextCtrl. I can create and show the html perfectly inside the form. But all links inside this control don't work (scenario 1). If I create a form who have a control of the type CIEBrowser, the EXACTLY same html code works perfectly (scenario 2).
In particular, I need that when I click in one link, execute a method called OnClick, who performs all that I need, just like in scenario 2.
This is my DISPATCH_MAP in the derived class (CFulltextCtrl):
Code:
BEGIN_DISPATCH_MAP(CFulltextCtrl, CIEBrowser)
DISP_FUNCTION_ID(CFulltextCtrl,"HTMLELEMENTEVENTS2_ONCLICK", DISPID_HTMLELEMENTEVENTS2_ONCLICK,
OnClick, VT_EMPTY, VTS_DISPATCH)
DISP_FUNCTION_ID(CFulltextCtrl,"HTMLELEMENTEVENTS2_ONKEYDOWN", DISPID_HTMLELEMENTEVENTS2_ONKEYDOWN,
OnKeyDown, VT_EMPTY, VTS_DISPATCH)
DISP_FUNCTION_ID(CFulltextCtrl,"HTMLELEMENTEVENTS2_ONKEYUP", DISPID_HTMLELEMENTEVENTS2_ONKEYUP,
OnKeyUp, VT_EMPTY, VTS_DISPATCH)
END_DISPATCH_MAP()
View 5 Replies
View Related