Visual C++ :: Windows 8 Title Bars Inconsistent In Embedded Dialogs?
Nov 13, 2013
I have an SDI app created with VC2012. Main view is a CFormView and it's the parent to four embedded dialogs. All four dialogs have title bars. On three of them, the title bars looks as I'd expect. Normal size, text left justified. On the fourth, the title bar is noticeably thicker and the text is centered. All styles are the same as far as I can tell. The main difference is the one that's acting up has a browser control on it, the others just standard controls. It looks normal on Windows 7.
View 8 Replies
ADVERTISEMENT
Apr 27, 2013
I have written a MFC dll to interact with an API and it is run by the target program. the first 100 bars are drawn properly but then the program ceases to operate. I am guessing I have a memory leak but I probably just dont understand what I am doing as I am quite new to programming MFC GDI. Here is my code that causes the trouble...
The variables coming in are commented out to facilitate testing and so it would be displaying the same bars over and over because of this. it worrks for 100 bars, then crashes.
void MainDlg::SS_UpdateChart() {
// the chart plot is completely recalculated each time a new bar is shown
// 300 is plottable height
// 400 is plottable width, 39 bars
int displayChartHeight = 300;
[Code] .....
View 11 Replies
View Related
May 17, 2014
any easy way to resize property sheet/page dialogs automatically or semi automatically?. have tried too many stuff, but none were fruitful.
View 5 Replies
View Related
Jul 19, 2013
I have a main dialog which has (DDX?) controls for the user. eg a slider, and a combo box.
Previously, an image adjusted by these controls was in the same dialog.
I need to put this image in a New, separate dialog but it still must be controlled by the slider and combo box on the main dialog.
My question is how can I pass the control's variables between the dialogs? I have, say,
Code:
//MainDlg.cpp
DDX_Control(pDX, IDC_ComboBrightness, m_Brightness
I was told that I could do something like:
Code:
//ImageDlg.h
public:
ImageDlg(CWnd* pParent = NULL, CComboBox m_Brightness); // standard constructor
But I get errors including: Missing default parameter for parameter 2
I also need to pass the image array, is that perhaps the same method?
View 6 Replies
View Related
Apr 14, 2014
In my class:
Code:
class SettingsDialog : public CDialogEx
I have:
Code:
enum { IDD = IDD_SETTINGS_DIALOG };
I have a very similar dialog called IDD_SETTINGS2_DIALOG with all the exact same variables. Is it possible to conditionally load either of those dialogs in that class through a variable pass into the constructor? If so, how do I edit that enum type to add both?
View 2 Replies
View Related
Sep 17, 2013
My earlier attempt to get an answer didn't work, so i want to make my question more straight forward.
Is it possible to create a C++ DLL with Web Browser like CDHtmlDialog embedded in it?
View 1 Replies
View Related
May 1, 2014
Visual Studio 2013. C++.
Created a blank, SDI MFC app.
I added a new CMFCToolBar (by hand, didn't use a wizard)
It docks OK. The commands work OK. It renders OK. No problems there.
In the code, attempting to set the window text of this toolbar has no effect. The title bar text is always "Standard". I triple triple triple checked to make sure I don't have any resource ID conflicts. In a small app as this, it was pretty easy to verify this.
The toolbar also does not show in the menu illustrated in the screenshot. (The bottom, undocked toolbar should be titled "My Page Bar" and I think it should show up in the popup menu.)
I know I'm probably missing a simple step somewhere, but I haven't seen it. It looks like its getting mixed up with the Standard Toolbar resource ID somewhere but I could see nothing in the .rc or resource.h files.
View 9 Replies
View Related
Apr 1, 2015
I referred Auto-close message box.
But i like to view the message box with out title bar and buttons. Is it possible?
View 4 Replies
View Related
Apr 27, 2013
I've just integrated the Windows SDK V7.0A into my VS2005 application, and I'm getting the dreaded "Application configuration error" when I try to run it on an XP machine.
It runs fine on the development machine, and some customer machines (Win7 and Win8), but will not run on XP due to missing/incorrect version dlls.
I've rebuilt all my libraries, but still no joy.
So, my first question is - If I upgrade the Windows SDK to V7.0A, do I also need to use MFC 10 and msvcrt10, or can I stick with MFC 8?
The next question is, how do I find out which dlls are missing, and which libraries or other dlls are requesting the missing versions?
View 11 Replies
View Related
Apr 17, 2013
In my application I have some type of windows showed in an instance of time, and an action shows a new one that i want have the focus all the time , in the way that i can't works with no one of the others. They all are windows, child windows an modeless dialogs, but i don't know how to do. I try use EnableWindow(FALSE) that all the others windows and dialogs, but not works.
View 2 Replies
View Related
Sep 23, 2012
I used to retrieve IP and NIC information by querying windows registry. Now I'm trying to use GetAdapterAddresses() API. Using GetAdapterAddresses() to get IP is not that easy, I need to dig a long deep as I check some examples so far, anyways my question is: Calling this API will return success on all versions of Windows ie: 32bits & 64bits ?
Though Microsoft has not opened any source, where this API is actually retrieving Windows IP information.?. Is it reading Registry or some windows file.
View 6 Replies
View Related
Jul 1, 2013
I want to connect to an SQL Server database using ADO with VC++.
In order to do that you need to import an external dll, like so:
#import "C:Program Files (x86)Common FilesSystemadomsado15.dll"
What if the OS is not 64 bit? That would mean the (x86)-suffix would be incorrect.
how to work around this using certain preprocessor directives?
Something like this, maybe?:
#if 64bit
#import "C:Program Files (x86)Common FilesSystemadomsado15.dll"
#else
#import "C:Program FilesCommon FilesSystemadomsado15.dll"
#endif
View 9 Replies
View Related
Nov 24, 2014
My goal is to know if Windows is installed on an active disk partition.
View 8 Replies
View Related
Apr 21, 2013
I am looking windows slideshow screen saver source code.
View 5 Replies
View Related
Nov 9, 2013
I am new in Visual C++ and I have to make an MFC application with "child" windows. Here is what i need to achieve - [URL] ..... As you can observe when you click on the cross of popup window or child window 2 both are closing.
View 2 Replies
View Related
Jan 29, 2015
How can I hide titlebar ( not borders ) ? And how can I have autohide with animation for Notebook like in Edit fiddle - JSFiddle ?
View 5 Replies
View Related
Feb 27, 2014
1.I wanted to create my own title bar in winform.
2.I have created for one form and i want to apply it for all form.
3.Are there any Styling winform package available for free.
View 5 Replies
View Related
Oct 14, 2014
I have 10 or so .sql scripts (the number is likely to rise) which are required to be kept with a C# application.
For the most part the embedded resources seem to work fine , however I require a way in which to guarantee the ordering in which the files are run.
What I do currently:
Retrieve the details of the embedded resources using : Assembly.GetManifestResourceNames()
(and a bit of linq to filter based upon my requirements) which I pass to a list, I then later on use the list to grab the physical resource when its needed.
The files are named such as:
1_ScriptDescription.sql
2_ScriptDescription.sql
3_ScriptDescription.sql
10_ScriptDescription.sql <--- Here's my problem! This will come after 1_ScriptDescription.sql
Ideally I need a way in which to order the list or some kind of ordering when I pull from
Assembly.GetManifestResourceNames()
But I'm not really sure of a practical way to do this, I did consider manipulating the string .....
View 3 Replies
View Related
Aug 16, 2014
I don't know how to get window title text of same process without setting a foreground window.
My code:
Using it, I get window handle.
struct handle_data {
unsigned long process_id;
HWND best_handle;
};
BOOL is_main_window(HWND handle) {
return GetWindow(handle, GW_OWNER) == (HWND)0 && IsWindowVisible(handle);
[Code] ....
This part doesn't work unless I use it with GetForegroundWindow(). But before using it, I have to set it. Is there any way to get window name without setting a foreground window?
unsigned long id = GetCurrentProcessId();
//HANDLE h = GetCurrentProcess();
HWND wind = find_main_window(id);
char window_title[256];
GetWindowText(wind, window_title, 256);
std::string txtt(window_title);
View 4 Replies
View Related
Sep 24, 2014
Alright I no longer have compiler errors. I require writing code for selling a record. How would I go about that?
#include <iostream>
#include <cstdlib>
#include <string>
#include <fstream>
#include <cctype>
#include <conio.h>
using namespace std;
//declare variables
void Add();
[Code] ...
View 9 Replies
View Related
Jan 3, 2015
I'm trying to remove the title bar from an external app. The reason is I don't want anyone to be able to move it.
But my code below doesn't remove the title bar. Could this be because it's not removable? I read somewhere title bars of external apps may be not removable if the app doesn't allow it.
So, I'm not sure why my code doesn't work - either it's wrong or the app doesn't permit it?
My app is a winform.
int style = GetWindowLong(app1Win, GWL_STYLE);
style = style & ~WS_BORDER;
SetWindowLong(app1Win, GWL_STYLE, style);
SetWindowPos(app1Win, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
View 1 Replies
View Related
May 2, 2012
Actually i am using one timer, in that timer i am trying to displaying one dialog box nane as ABC, for if condition is success, there in the same condition i need to put one more query like for the perticular application is active then only display this dialog box ABC, i need which API is using for getting active application in c++.
View 2 Replies
View Related
Feb 3, 2013
I designed an app for work that lets you enter data in a much more efficient way, then it needs to paste this data into the very curmudgeonly interface we use for work. I designed this app a long time ago while at a different company, and I used VC++ 6. I'm still using VC++ 6, but in a vbox with windows XP.
The code is being called as part of a bigger function that determines what exactly needs to be pasted into the work app spreadsheet. I have to call each item separately because the work app does not take copied tabs the way Excel would or whatever, it just ignores them. And it also pops up boxes and such that need to be handled in other ways.
The result works just fine under Windows XP, but when I do it under my regular Win7 box or on the Win7 boxes at work, it does not work properly.
This sets the data up, Text being the data to be pasted:
Code:
while (1) {
if (OpenClipboard() == FALSE) {
::Sleep(1);
continue;
}
HGLOBAL clipbuffer;
char * buffer;
EmptyClipboard();
[Code] ....
No infinite loops yet, again was just testing if it was OpenClipboard failing because it was being called again too quickly or something (and it did happen occasionally).
Then testing that the clipboard data is correct (this is always true), and pasting with keybd_event. SendInput is not available with VC++ 6.
Code:
HGLOBAL hglb;
LPTSTR lptstr;
LPTSTR buf = Text.GetBuffer(0);
while (OpenClipboard() == FALSE)
::Sleep(1);
[Code] .....
If the ::Sleeps are commented out, it will paste the wrong data almost every time under win7. It seems like it pretty much uses the last thing to be copied in the function and pastes it over and over (but not *always*). If I uncomment them, it will work as expected, but it obviously takes longer. With ::Sleep(50), it works about 80-90% of the time. Obviously I can't have the wrong data being pasted, and I'd prefer not to have to wait like this--and perhaps on a slower system or a system that is doing other things it may take longer and paste the wrong thing. It works fine on XP even without the sleeps.
Did keybd_event become a separate thread or something? Am I doing something wrong with the buffers? (I've tried using CSharedFile too with GMEM_MOVEABLE | GMEM_SHARE | GMEM_ZEROINIT settings, exact same thing.) Why does it work fine under XP but not under 7?
View 10 Replies
View Related
Jan 28, 2013
The following code it taken from msdn library but it is failing to compile.
the following code has a header where all the variables used here are stored in header App.h.
The following lines are giving trouble:
Code:
DialogBox(pApp->getInstance(), MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, pApp->About);
error: 'App::About': function call missing argument list; use '&App::About' to create a pointer to member
Code:
wcex.lpfnWndProc= &App::WndProc;
error: '=' : cannot convert from 'LRESULT (__stdcall App::* )(HWND,UINT,WPARAM,LPARAM)' to 'WNDPROC'
There is no context in which this conversion is possible
Here is the complete code:
#include "stdafx.h"
#include "App.h"
App::App(void) {
}
App::~App(void) {
[Code] .....
View 4 Replies
View Related
Oct 31, 2014
Is it possible to show a console window in a Win32 DLL?
View 3 Replies
View Related
Jan 26, 2013
I have struggled to send email from my MFC applications using severl methods:
1) http via my server - works but limited
2) M$ Outlook automation - works but not easily interchangeable between machines
3) Windows Sockets - available information simply too complicated
4) Purchase an ActiveX control - I hate black box solutions and am too cheap
I have looked at P. J. Naughter's class
CPJNSMTPConnection v2.99
An MFC class to encapsulate the SMTP protocol
[URL]
This approach requires the implementation of OpenSSL which turns out to be nothing short of a nightmare to install (so I never got it to run). I am looking for an example of an application that utilizes SMTP via Windows sockets api.
View 6 Replies
View Related